test,crypto: make tests work for BoringSSL

Ref https://github.com/nodejs/node/pull/56559

PR-URL: https://github.com/nodejs/node/pull/57021
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
Shelley Vohr 2025-02-15 10:08:02 +01:00 committed by GitHub
parent cc7018ec51
commit 59cdd4f1c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -258,11 +258,11 @@ for (const checks of [-(2 ** 31), -1, 2 ** 31, 2 ** 32 - 1, 2 ** 32, 2 ** 50]) {
bytes[0] = 0x1;
assert.throws(() => checkPrime(bytes, common.mustNotCall()), {
code: 'ERR_OSSL_BN_BIGNUM_TOO_LONG',
message: /bignum too long/
message: /bignum[_ ]too[_ ]long/i
});
assert.throws(() => checkPrimeSync(bytes), {
code: 'ERR_OSSL_BN_BIGNUM_TOO_LONG',
message: /bignum too long/
message: /bignum[_ ]too[_ ]long/i
});
}