From b40cd46c1146ac8a7cf18f79ace3c64aa4b6962e Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 18 Jun 2024 15:44:23 -0700 Subject: [PATCH] Set proper JOSE algorithm for Ed25519 keys This commit fixes a typo in the JOSE algorithm specified for Ed25519 keys when a kms is used. Fixes #1207 --- internal/cryptoutil/cryptoutil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cryptoutil/cryptoutil.go b/internal/cryptoutil/cryptoutil.go index 4082402ce..ea025aee6 100644 --- a/internal/cryptoutil/cryptoutil.go +++ b/internal/cryptoutil/cryptoutil.go @@ -135,7 +135,7 @@ func LoadJSONWebKey(kms, name string, opts ...jose.Option) (*jose.JSONWebKey, er case *rsa.PublicKey: jwk.Algorithm = jose.RS256 case ed25519.PublicKey: - jwk.Algorithm = jose.XEdDSA + jwk.Algorithm = jose.EdDSA default: return nil, fmt.Errorf("unsupported key type %T", pub) }