Commit graph

54 commits

Author SHA1 Message Date
Filip Skokan
a96b570c89 refactor: explicit encrypt/decrypt switch, getCipher cache 2021-07-27 13:00:14 +02:00
Filip Skokan
0fc9793904 chore: update @types/node 2021-07-15 11:06:33 +02:00
Filip Skokan
e091f0f245 fix(typescript): remove file extensions from .d.ts files
resolves #222
2021-07-02 15:46:54 +02:00
Filip Skokan
0727a427d0 chore: upgrade @types/node 2021-07-02 12:47:37 +02:00
Filip Skokan
df56b942c6 feat: add verbose key type error messages 2021-07-01 14:48:53 +02:00
Filip Skokan
df304c7629 refactor: src/runtime/node/sign.ts 2021-06-22 12:25:13 +02:00
Filip Skokan
35496ccff5 refactor: src/runtime/node/verify.ts 2021-06-22 12:25:13 +02:00
Filip Skokan
b0b1adf9fb refactor: src/runtime/node/get_named_curve.ts 2021-06-22 11:52:04 +02:00
Cody Ebberson
13fa3d8ae0 feat(typescript): export consume module interface types (#213)
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
2021-06-22 11:21:21 +02:00
Filip Skokan
d36311d516 perf(node): use util.types.is* helpers when available 2021-05-18 12:00:24 +02:00
Filip Skokan
e0ce916a3c chore: upgrade eslint-plugin-import 2021-05-17 10:34:00 +02:00
Alessandro (Ale) Segala
b2c6273ecc
fix(browser): avoid global-conflicting variable name fetch (#199)
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
2021-05-14 11:37:38 +02:00
Filip Skokan
afae428f39 feat(webcrypto): allow generate* modules extractable: false override 2021-05-12 14:07:26 +02:00
Filip Skokan
34d7f3fee7 refactor: key instance detection refactor 2021-05-11 13:40:47 +02:00
Filip Skokan
26bdb732a5 style: run prettier 2021-05-06 17:00:01 +02:00
Filip Skokan
da5c5d78ac refactor: unified "unsupported" error messages 2021-05-05 15:26:28 +02:00
Filip Skokan
1fba40ed45 refactor: update aes unsupported error message 2021-05-05 14:42:11 +02:00
Filip Skokan
d512ede073 fix: swallow promisified crypto.verify errors 2021-04-29 14:19:01 +02:00
Filip Skokan
7b1d98bb79 chore: update @types/node 2021-04-29 14:18:00 +02:00
Filip Skokan
579485cb80 fix: defer AES CBC w/ HMAC decryption after tag verification passes 2021-04-09 22:04:46 +02:00
Filip Skokan
d0a26bdb37 refactor(node,webcrypto): remove unnecessary workaround 2021-04-07 10:33:45 +02:00
Filip Skokan
dab4b2f03e fix(node): check CryptoKey algorithm & usage before exporting KeyObject 2021-04-02 00:01:57 +02:00
Filip Skokan
373b83024c refactor: ecdh re-using existing APIs 2021-04-01 13:34:44 +02:00
Filip Skokan
edb83a846a fix: assert KeyLike input types, change "any" types to "unknown" 2021-03-30 17:53:53 +02:00
Filip Skokan
d3d4acd8be fix(node): crypto.verify callback invocation with a private keyobject 2021-03-26 14:48:34 +01:00
Filip Skokan
ae9a7f4186 feat(node): use libuv threadpool to verify in node >= 15.12.0 2021-03-17 14:11:47 +01:00
Filip Skokan
cf5074e7e1 feat(node): use libuv threadpool to sign in node >= 15.12.0 2021-03-17 14:11:15 +01:00
Filip Skokan
7f3cc44bd0 feat(node): use native JWK export in node >= 15.9.0 2021-03-17 14:10:50 +01:00
Filip Skokan
f0c2a64728 feat(node): use native JWK import in node >= 15.12.0 2021-03-17 14:10:11 +01:00
Filip Skokan
e0adf49e57 fix: swallow invalid signature encoding errors 2021-03-11 14:56:57 +01:00
Filip Skokan
484e04ca8e refactor: use nullish coalescing instead of logical OR 2021-03-03 10:55:22 +01:00
Filip Skokan
433f020246 fix(electron): properly ASN.1 encode [0x00] when converting RSA JWKs 2021-03-03 00:00:39 +01:00
Filip Skokan
a5a6c4dc9f fix(electron): only call (de)cipher.setAAD() when aad is not empty 2021-03-02 23:58:48 +01:00
Filip Skokan
fc584b2efd fix: node runtime json fetch handles connection errors properly 2021-02-10 13:36:29 +01:00
Filip Skokan
e8d41a9335 feat: allow CryptoKey instances in a regular non-webcrypto node runtime 2021-02-04 17:39:28 +01:00
Filip Skokan
bd1b7c4812 refactor(typescript): dont mess with the node types 2021-01-28 16:25:08 +01:00
Filip Skokan
69a7edea0a refactor: explicit new uint8array arg 2021-01-28 16:16:12 +01:00
Filip Skokan
d2a574818a refactor: remove checking for secure context 2021-01-28 16:13:53 +01:00
Filip Skokan
c068e46c68 refactor: src/runtime/node/fetch.ts 2021-01-21 18:16:14 +01:00
Filip Skokan
2e5800535a fix: workaround downstream dependency issues messing with http
ref #154
2021-01-20 17:07:03 +01:00
Filip Skokan
ad88ee2cd5 perf: use KeyObject.prototype asymmetricKeyDetails when available 2021-01-18 13:50:42 +01:00
Filip Skokan
808f06cd08 perf: use 'base64url' encoding when available in Node.js runtime 2021-01-18 13:50:37 +01:00
Filip Skokan
626d91f201 refactor: iv and cek generators are not async 2020-12-17 19:02:07 +01:00
Filip Skokan
6abd2ef962 lint: lint with upgraded deps 2020-12-17 13:42:02 +01:00
Filip Skokan
55e8bfed32 style: use <> type casting syntax 2020-12-16 11:11:34 +01:00
Filip Skokan
175f273819 fix(typescript): ref dom lib via triple-slash to fix some compile issues
closes #126
2020-12-14 16:41:59 +01:00
Filip Skokan
e72af2742e test: add coverage for generate key pair options 2020-12-01 12:12:24 +01:00
Filip Skokan
5f7a0e9055 feat: allow specifying modulusLength when generating RSA Key Pairs
resolves #121
2020-12-01 12:12:24 +01:00
Filip Skokan
29373633bc fix(typescript): refactored how types are published
resolves #119
2020-11-26 18:53:01 +01:00
Filip Skokan
38494a8882 feat: allow http.Agent and https.Agent passed in remote JWK Set 2020-11-22 14:53:25 +01:00