Skip to content

Commit

Permalink
Set proper JOSE algorithm for Ed25519 keys
Browse files Browse the repository at this point in the history
This commit fixes a typo in the JOSE algorithm specified for Ed25519
keys when a kms is used.

Fixes #1207
  • Loading branch information
maraino committed Jun 18, 2024
1 parent d02d826 commit b40cd46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cryptoutil/cryptoutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 138 in internal/cryptoutil/cryptoutil.go

View check run for this annotation

Codecov / codecov/patch

internal/cryptoutil/cryptoutil.go#L138

Added line #L138 was not covered by tests
default:
return nil, fmt.Errorf("unsupported key type %T", pub)
}
Expand Down

0 comments on commit b40cd46

Please sign in to comment.