summaryrefslogtreecommitdiff
path: root/ext/crypto/00_crypto.js
diff options
context:
space:
mode:
authorColin Ihrig <cjihrig@gmail.com>2022-09-30 09:18:30 -0400
committerGitHub <noreply@github.com>2022-09-30 09:18:30 -0400
commit636b448f3c9eaa29ac0452547f6e16e8fb1fb0f6 (patch)
treed5a49b4ca8fca0a22550394ade87d4e4189340b7 /ext/crypto/00_crypto.js
parent20c7300412bdb487fc758577d6256bbcf96efd12 (diff)
fix(ext/crypto): use correct handle for public keys (#16099)
When storing public and private keys in the key store, use a different handle for each key so that they can be looked up in the future. Refs: https://github.com/denoland/deno/pull/14119 Refs: https://github.com/denoland/deno_std/issues/2631
Diffstat (limited to 'ext/crypto/00_crypto.js')
-rw-r--r--ext/crypto/00_crypto.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js
index 41c85bdd1..9134f486b 100644
--- a/ext/crypto/00_crypto.js
+++ b/ext/crypto/00_crypto.js
@@ -1983,7 +1983,7 @@
WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData);
const publicHandle = {};
- WeakMapPrototypeSet(KEY_STORE, handle, publicKeyData);
+ WeakMapPrototypeSet(KEY_STORE, publicHandle, publicKeyData);
const algorithm = {
name: algorithmName,
@@ -2031,7 +2031,7 @@
WeakMapPrototypeSet(KEY_STORE, handle, privateKeyData);
const publicHandle = {};
- WeakMapPrototypeSet(KEY_STORE, handle, publicKeyData);
+ WeakMapPrototypeSet(KEY_STORE, publicHandle, publicKeyData);
const algorithm = {
name: algorithmName,