Commit Graph

2 Commits (e4dc97a0ec23c9d8468e4b30cd6648bdbd830048)

Author SHA1 Message Date
Aydin Mercan 67699f4a7c
jwk, internal/publickey: unmarshal -> decode
Currently encoding/json accepts duplicate fields in the json.
Since https://github.com/golang/go/issues/48298 got accepted,
we should use the decoder interface with Decoder.DisallowDuplicateFields
turned on when available. Its exact behavior will determine whether
json.RawMessage's will be re-unmarshaled or will follow the byte reader
path.
2021-12-04 10:55:00 +03:00
Aydin Mercan 82785c70eb internal/publickey: move from public jwk add tests
Moving algorithm specific jwk code to an internal module.
Not caring about it should be fine(?) to the end user as long
as the library remains vigilantic about it. Also, the crypto.PublicKey
in JWK isn't meant to be used directly anyway.
2021-11-03 20:41:03 +03:00