summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-jose
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-jose')
-rw-r--r--vendor/github.com/go-jose/go-jose/v4/shared.go10
-rw-r--r--vendor/github.com/go-jose/go-jose/v4/signing.go2
2 files changed, 10 insertions, 2 deletions
diff --git a/vendor/github.com/go-jose/go-jose/v4/shared.go b/vendor/github.com/go-jose/go-jose/v4/shared.go
index b485e43bd..1ec339612 100644
--- a/vendor/github.com/go-jose/go-jose/v4/shared.go
+++ b/vendor/github.com/go-jose/go-jose/v4/shared.go
@@ -71,6 +71,12 @@ var (
// ErrUnprotectedNonce indicates that while parsing a JWS or JWE object, a
// nonce header parameter was included in an unprotected header object.
ErrUnprotectedNonce = errors.New("go-jose/go-jose: Nonce parameter included in unprotected header")
+
+ // ErrMissingX5cHeader indicates that the JWT header is missing x5c headers.
+ ErrMissingX5cHeader = errors.New("go-jose/go-jose: no x5c header present in message")
+
+ // ErrUnsupportedEllipticCurve indicates unsupported or unknown elliptic curve has been found.
+ ErrUnsupportedEllipticCurve = errors.New("go-jose/go-jose: unsupported/unknown elliptic curve")
)
// Key management algorithms
@@ -199,7 +205,7 @@ type Header struct {
// not be validated with the given verify options.
func (h Header) Certificates(opts x509.VerifyOptions) ([][]*x509.Certificate, error) {
if len(h.certificates) == 0 {
- return nil, errors.New("go-jose/go-jose: no x5c header present in message")
+ return nil, ErrMissingX5cHeader
}
leaf := h.certificates[0]
@@ -501,7 +507,7 @@ func curveName(crv elliptic.Curve) (string, error) {
case elliptic.P521():
return "P-521", nil
default:
- return "", fmt.Errorf("go-jose/go-jose: unsupported/unknown elliptic curve")
+ return "", ErrUnsupportedEllipticCurve
}
}
diff --git a/vendor/github.com/go-jose/go-jose/v4/signing.go b/vendor/github.com/go-jose/go-jose/v4/signing.go
index f0b0294f3..46c9a4d96 100644
--- a/vendor/github.com/go-jose/go-jose/v4/signing.go
+++ b/vendor/github.com/go-jose/go-jose/v4/signing.go
@@ -358,6 +358,8 @@ func (ctx *genericSigner) Options() SignerOptions {
// - *rsa.PublicKey
// - *JSONWebKey
// - JSONWebKey
+// - *JSONWebKeySet
+// - JSONWebKeySet
// - []byte (an HMAC key)
// - Any type that implements the OpaqueVerifier interface.
//