diff --git a/signature/json.go b/signature/json.go index 12d14c020e..60a0bb4b03 100644 --- a/signature/json.go +++ b/signature/json.go @@ -50,7 +50,7 @@ func stringField(m map[string]interface{}, fieldName string) (string, error) { } v, ok := untyped.(string) if !ok { - return "", jsonFormatError(fmt.Sprintf("Field %s is not a JSON object", fieldName)) + return "", jsonFormatError(fmt.Sprintf("Field %s is not a string", fieldName)) } return v, nil } diff --git a/signature/signature.go b/signature/signature.go index b2705a6d03..22588771fc 100644 --- a/signature/signature.go +++ b/signature/signature.go @@ -159,7 +159,7 @@ func (s privateSignature) sign(mech SigningMechanism, keyIdentity string) ([]byt // signatureAcceptanceRules specifies how to decide whether an untrusted signature is acceptable. // We centralize the actual parsing and data extraction in verifyAndExtractSignature; this supplies // the policy. We use an object instead of supplying func parameters to verifyAndExtractSignature -// because all of the functions have the same type, so there is a risk of exchanging the functions; +// because the functions have the same or similar types, so there is a risk of exchanging the functions; // named members of this struct are more explicit. type signatureAcceptanceRules struct { validateKeyIdentity func(string) error