Remove AcmeJWS and move everything over to LE fork of go-jose

This commit is contained in:
Richard Barnes 2015-07-29 12:44:39 -04:00
parent 9e87cef807
commit 4f95f66f98
3 changed files with 4 additions and 28 deletions

View File

@ -240,7 +240,7 @@ type Challenge struct {
TLS *bool `json:"tls,omitempty"`
// Used by dns and dvsni challenges
Validation *AcmeJWS `json:"validation,omitempty"`
Validation *jose.JsonWebSignature `json:"validation,omitempty"`
}
// IsSane checks the sanity of a challenge object before issued to the client
@ -383,30 +383,6 @@ func (jb *JSONBuffer) UnmarshalJSON(data []byte) (err error) {
return
}
// AcmeJWS adds JSON serialization / deserialization to the go-jose JsonWebSignature object
type AcmeJWS jose.JsonWebSignature
// Verify is just passed through to the underlying type
func (jws AcmeJWS) Verify(jwk interface{}) ([]byte, jose.JoseHeader, error) {
return jose.JsonWebSignature(jws).Verify(jwk)
}
// MarshalJSON encodes a JSONBuffer for transmission.
func (jws AcmeJWS) MarshalJSON() (result []byte, err error) {
return []byte(jose.JsonWebSignature(jws).FullSerialize()), nil
}
// UnmarshalJSON decodes a JSONBuffer to an object.
func (jws *AcmeJWS) UnmarshalJSON(data []byte) (err error) {
parsedJWS, err := jose.ParseSigned(string(data))
if err != nil {
return err
}
*jws = AcmeJWS(*parsedJWS)
return
}
// Certificate objects are entirely internal to the server. The only
// thing exposed on the wire is the certificate itself.
type Certificate struct {

View File

@ -10,8 +10,8 @@ import (
"crypto/subtle"
"crypto/tls"
"encoding/hex"
"errors"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
@ -20,8 +20,8 @@ import (
"strings"
"time"
"github.com/letsencrypt/boulder/Godeps/_workspace/src/github.com/letsencrypt/go-jose"
"github.com/letsencrypt/boulder/Godeps/_workspace/src/github.com/miekg/dns"
"github.com/letsencrypt/boulder/Godeps/_workspace/src/github.com/square/go-jose"
"github.com/letsencrypt/boulder/core"
blog "github.com/letsencrypt/boulder/log"

View File

@ -24,7 +24,7 @@ import (
"testing"
"time"
"github.com/letsencrypt/boulder/Godeps/_workspace/src/github.com/square/go-jose"
"github.com/letsencrypt/boulder/Godeps/_workspace/src/github.com/letsencrypt/go-jose"
"github.com/letsencrypt/boulder/core"
"github.com/letsencrypt/boulder/mocks"