1
0
Fork 0

Merge v1.2.1-master

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2017-04-11 17:10:46 +02:00
parent a590155b0b
commit aeb17182b4
No known key found for this signature in database
GPG key ID: D808B4C167352E59
396 changed files with 27271 additions and 9969 deletions

View file

@ -19,6 +19,8 @@ package jose
import (
"fmt"
"strings"
"gopkg.in/square/go-jose.v1/json"
)
// rawJsonWebEncryption represents a raw JWE JSON object. Used for parsing/serializing.
@ -111,7 +113,7 @@ func ParseEncrypted(input string) (*JsonWebEncryption, error) {
// parseEncryptedFull parses a message in compact format.
func parseEncryptedFull(input string) (*JsonWebEncryption, error) {
var parsed rawJsonWebEncryption
err := UnmarshalJSON([]byte(input), &parsed)
err := json.Unmarshal([]byte(input), &parsed)
if err != nil {
return nil, err
}
@ -133,7 +135,7 @@ func (parsed *rawJsonWebEncryption) sanitized() (*JsonWebEncryption, error) {
}
if parsed.Protected != nil && len(parsed.Protected.bytes()) > 0 {
err := UnmarshalJSON(parsed.Protected.bytes(), &obj.protected)
err := json.Unmarshal(parsed.Protected.bytes(), &obj.protected)
if err != nil {
return nil, fmt.Errorf("square/go-jose: invalid protected header: %s, %s", err, parsed.Protected.base64())
}