diff --git a/jwe/jwe.go b/jwe/jwe.go index bf1e410c2..7e40d33ad 100644 --- a/jwe/jwe.go +++ b/jwe/jwe.go @@ -552,7 +552,7 @@ func (dctx *decryptCtx) try(ctx context.Context, recipient Recipient, keyUsed in alg := pair.alg.(jwa.KeyEncryptionAlgorithm) key := pair.key - decrypted, err := dctx.decryptContent(ctx, alg, key, recipient) + decrypted, err := dctx.decryptContent(alg, key, recipient) if err != nil { lastError = err continue @@ -569,7 +569,7 @@ func (dctx *decryptCtx) try(ctx context.Context, recipient Recipient, keyUsed in return nil, fmt.Errorf(`jwe.Decrypt: tried %d keys, but failed to match any of the keys with recipient (last error = %s)`, tried, lastError) } -func (dctx *decryptCtx) decryptContent(ctx context.Context, alg jwa.KeyEncryptionAlgorithm, key interface{}, recipient Recipient) ([]byte, error) { +func (dctx *decryptCtx) decryptContent(alg jwa.KeyEncryptionAlgorithm, key interface{}, recipient Recipient) ([]byte, error) { if jwkKey, ok := key.(jwk.Key); ok { var raw interface{} if err := jwkKey.Raw(&raw); err != nil {