mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(ext/node): fix error type in DiffieHellman constructor (#29721)
This commit is contained in:
parent
e5b96243ac
commit
b979c886e6
3 changed files with 9 additions and 6 deletions
|
@ -117,7 +117,10 @@ export class DiffieHellmanImpl {
|
|||
// The supplied parameter is our primeLength, generate a suitable prime.
|
||||
this.#primeLength = sizeOrKey as number;
|
||||
if (this.#primeLength < 2) {
|
||||
throw new NodeError("ERR_OSSL_BN_BITS_TOO_SMALL", "bits too small");
|
||||
throw new NodeError(
|
||||
"ERR_OSSL_DH_MODULUS_TOO_SMALL",
|
||||
"modulus too small",
|
||||
);
|
||||
}
|
||||
|
||||
this.#prime = Buffer.from(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue