Commit Graph

3 Commits (main)

Author SHA1 Message Date
Aydin Mercan a7afee7530
internal/publickey: add eddsa tests
Added tests for EdDSA keys. Subsequently, some fixes were introduced.
Also, ECDSA's test names were fixed to avoid collusions.

As a bonus some unused code were removed.
2021-12-05 12:38:31 +03:00
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