From a10ff54e00bc6e833bf549e04ae976f0fe8ea2fd Mon Sep 17 00:00:00 2001 From: Cedric Staub Date: Sat, 5 Jun 2021 13:43:59 -0700 Subject: [PATCH] Fix EC thumbprint template --- jwk.go | 2 +- jwk_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jwk.go b/jwk.go index e14a9d0a..222e260c 100644 --- a/jwk.go +++ b/jwk.go @@ -332,7 +332,7 @@ func (s *JSONWebKeySet) Key(kid string) []JSONWebKey { const rsaThumbprintTemplate = `{"e":"%s","kty":"RSA","n":"%s"}` const ecThumbprintTemplate = `{"crv":"%s","kty":"EC","x":"%s","y":"%s"}` -const edThumbprintTemplate = `{"crv":"%s","kty":"OKP",x":"%s"}` +const edThumbprintTemplate = `{"crv":"%s","kty":"OKP","x":"%s"}` func ecThumbprintInput(curve elliptic.Curve, x, y *big.Int) (string, error) { coordLength := curveSize(curve) diff --git a/jwk_test.go b/jwk_test.go index 0f928798..1df650e5 100644 --- a/jwk_test.go +++ b/jwk_test.go @@ -760,7 +760,7 @@ var cookbookJWKs = []string{ // SHA-256 thumbprints of the above keys, hex-encoded var cookbookJWKThumbprints = []string{ "747ae2dd2003664aeeb21e4753fe7402846170a16bc8df8f23a8cf06d3cbe793", - "f6934029a341ddf81dceb753e91d17efe16664f40d9f4ed84bc5ea87e111f29d", + "90facafea9b1556698540f70c0117a22ea37bd5cf3ed3c47093c1707282b4b89", "747ae2dd2003664aeeb21e4753fe7402846170a16bc8df8f23a8cf06d3cbe793", "f63838e96077ad1fc01c3f8405774dedc0641f558ebb4b40dccf5f9b6d66a932", "0fc478f8579325fcee0d4cbc6d9d1ce21730a6e97e435d6008fb379b0ebe47d4",