From 6e59b82417d04c03fba84096b65f498f89ed194f Mon Sep 17 00:00:00 2001 From: Guillaume pelletier Date: Tue, 5 Aug 2025 14:44:56 -0400 Subject: [PATCH] Fixes #4683 - uses X/Y instead of Gx/Gy for thumbprint of ecdsa keys Signed-off-by: Guillaume Pelletier --- registry/auth/token/util.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/registry/auth/token/util.go b/registry/auth/token/util.go index 88079cce7..d1fe6f9c4 100644 --- a/registry/auth/token/util.go +++ b/registry/auth/token/util.go @@ -84,10 +84,9 @@ func getJWKThumbprint(publickey crypto.PublicKey, skipED25519 bool) string { return hashAndEncode(fmt.Sprintf(`{"e":"%s","kty":"RSA","n":"%s"}`, e, n)) case *ecdsa.PublicKey: - params := pubkey.Params() - crv := params.Name - x := base64.RawURLEncoding.EncodeToString(params.Gx.Bytes()) - y := base64.RawURLEncoding.EncodeToString(params.Gy.Bytes()) + crv := pubkey.Params().Name + x := base64.RawURLEncoding.EncodeToString(pubkey.X.Bytes()) + y := base64.RawURLEncoding.EncodeToString(pubkey.Y.Bytes()) return hashAndEncode(fmt.Sprintf(`{"crv":"%s","kty":"EC","x":"%s","y":"%s"}`, crv, x, y)) case ed25519.PublicKey: