Commit Graph

3 Commits (fa79a9a7bcd07a1dbf492c40e43b5d97244af022)

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
Aydin Mercan 17de1b90f9 initial commit
- Created the JWK definition with parsing key sets, needs more through
  poking for covering invalid state handling.

- Basic parsing tests with CI
2021-11-02 10:43:52 +03:00