Commit graph

10 commits

Author SHA1 Message Date
Filip Skokan
9e7444b7d2 refactor: removed asn1.js in favor of slimmer @panva/asn1.js
resolves #61
2020-02-18 16:12:10 +01:00
Filip Skokan
eae01b57ab fix: actually remove the base64url proper encoding check
This should've landed with 470b4c7
2020-02-03 14:07:28 +01:00
Filip Skokan
93068a63c8 refactor: improve performance when decoding base64url values
When creating a Buffer from a string, this encoding will also correctly
accept "URL and Filename Safe Alphabet".
2020-01-28 16:41:03 +01:00
Filip Skokan
6bb66d4f0b feat: add JWS.verify encoding and parsing options 2019-11-05 20:09:34 +01:00
Filip Skokan
1db9fc9cd1 refactor: don't swallow invalid encoding errors 2019-09-25 22:18:47 +02:00
Filip Skokan
5b53cb0155 fix: limit calculation of missing RSA private components
- this deprecates the use of `JWK.importKey` in favor of
`JWK.asKey`
- this deprecates the use of `JWKS.KeyStore.fromJWKS` in favor of
`JWKS.asKeyStore`

Both `JWK.importKey` and `JWKS.KeyStore.fromJWKS` could have resulted
in the process getting blocked when large bitsize RSA private keys
were missing their components and could also result in an endless
calculation loop when the private key's private exponent was outright
invalid or tampered with.

The new methods still allow to import private RSA keys with these
optimization key parameters missing but its disabled by default and one
should choose to enable it when working with keys from trusted sources

It is recommended not to use @panva/jose versions with this feature in
its original on-by-default form - v1.1.0 and v1.2.0 These will
2019-06-20 23:32:13 +02:00
Filip Skokan
12357f8ae1 refactor: source in asn1.js to remove some transitive dependencies 2019-03-26 18:24:10 +01:00
Filip Skokan
6453e1ffc9 refactor: require order and base64url split encode buffer/string 2019-03-06 22:12:43 +01:00
Filip Skokan
c1db0702a0 feat: add hmac 2018-11-03 13:21:42 +01:00
Filip Skokan
b8709756f0 chore: initial commit 2018-11-03 12:30:32 +01:00