Skip to content

Commit f9b63b8

Browse files
richardlaujasnell
authored andcommitted
test: update parallel/test-crypto-keygen for OpenSSL 3
OpenSSL 3 returns a different error code. PR-URL: #38136 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Filip Skokan <[email protected]>
1 parent 4bc8f75 commit f9b63b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: test/parallel/test-crypto-keygen.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,8 @@ if (!common.hasOpenSSL3) {
13251325
if (!getCurves().includes(namedCurve))
13261326
continue;
13271327

1328+
const expectedErrorCode =
1329+
common.hasOpenSSL3 ? 'ERR_OSSL_MISSING_OID' : 'ERR_OSSL_EC_MISSING_OID';
13281330
const params = {
13291331
namedCurve,
13301332
publicKeyEncoding: {
@@ -1336,11 +1338,11 @@ if (!common.hasOpenSSL3) {
13361338
assert.throws(() => {
13371339
generateKeyPairSync('ec', params);
13381340
}, {
1339-
code: 'ERR_OSSL_EC_MISSING_OID'
1341+
code: expectedErrorCode
13401342
});
13411343

13421344
generateKeyPair('ec', params, common.mustCall((err) => {
1343-
assert.strictEqual(err.code, 'ERR_OSSL_EC_MISSING_OID');
1345+
assert.strictEqual(err.code, expectedErrorCode);
13441346
}));
13451347
}
13461348
}

0 commit comments

Comments
 (0)