diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/crypto/00_crypto.js | 2 | ||||
-rw-r--r-- | ext/node/polyfills/internal/crypto/diffiehellman.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index 5189ea181..c75d3b71d 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -4417,7 +4417,7 @@ async function deriveBits(normalizedAlgorithm, baseKey, length) { publicKey: publicKeyData, algorithm: "ECDH", namedCurve: publicKey[_algorithm].namedCurve, - length, + length: length ?? 0, }); // 8. diff --git a/ext/node/polyfills/internal/crypto/diffiehellman.ts b/ext/node/polyfills/internal/crypto/diffiehellman.ts index a5817d59a..3d76deba4 100644 --- a/ext/node/polyfills/internal/crypto/diffiehellman.ts +++ b/ext/node/polyfills/internal/crypto/diffiehellman.ts @@ -189,7 +189,7 @@ export class DiffieHellman { const generator = this.#checkGenerator(); const [privateKey, publicKey] = ops.op_node_dh_generate2( this.#prime, - this.#primeLength, + this.#primeLength ?? 0, generator, ); |