Skip to content

Commit b1d38dd

Browse files
danbevBethGriggs
authored andcommitted
test: update OpenSSL3 error messages for beta-1
This commit updates error messages that have changed while these tests were disabled. PR-URL: #39437 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent db4f802 commit b1d38dd

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

test/parallel/test-crypto-dh-stateless.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ assert.throws(() => {
226226
crypto.generateKeyPairSync('ec', { namedCurve: not256k1 }));
227227
}, common.hasOpenSSL3 ? {
228228
name: 'Error',
229-
code: 'ERR_OSSL_MISMATCHING_SHARED_PARAMETERS'
229+
code: 'ERR_OSSL_MISMATCHING_DOMAIN_PARAMETERS'
230230
} : {
231231
name: 'Error',
232232
code: 'ERR_OSSL_EVP_DIFFERENT_PARAMETERS'

test/parallel/test-crypto-key-objects.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
305305
assert.throws(() => {
306306
createPrivateKey({ key: '' });
307307
}, common.hasOpenSSL3 ? {
308-
message: 'Failed to read private key',
308+
message: 'error:1E08010C:DECODER routines::unsupported',
309309
} : {
310310
message: 'error:0909006C:PEM routines:get_name:no start line',
311311
code: 'ERR_OSSL_PEM_NO_START_LINE',
@@ -519,8 +519,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
519519
// Reading an encrypted key without a passphrase should fail.
520520
assert.throws(() => createPrivateKey(privateDsa), common.hasOpenSSL3 ? {
521521
name: 'Error',
522-
message: 'error:07880109:common libcrypto routines::interrupted or ' +
523-
'cancelled',
522+
message: 'error:1E08010C:DECODER routines::unsupported',
524523
} : {
525524
name: 'TypeError',
526525
code: 'ERR_MISSING_PASSPHRASE',
@@ -546,7 +545,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
546545
passphrase: Buffer.alloc(1024, 'a')
547546
}), {
548547
message: common.hasOpenSSL3 ?
549-
'error:07880109:common libcrypto routines::interrupted or cancelled' :
548+
'error:1E08010C:DECODER routines::unsupported' :
550549
/bad decrypt/
551550
});
552551

test/parallel/test-crypto-keygen.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
549549
// Since the private key is encrypted, signing shouldn't work anymore.
550550
assert.throws(() => testSignVerify(publicKey, privateKey),
551551
common.hasOpenSSL3 ? {
552-
message: 'error:07880109:common libcrypto ' +
553-
'routines::interrupted or cancelled'
552+
message: 'error:1E08010C:DECODER routines::unsupported'
554553
} : {
555554
name: 'TypeError',
556555
code: 'ERR_MISSING_PASSPHRASE',
@@ -587,8 +586,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
587586
// Since the private key is encrypted, signing shouldn't work anymore.
588587
assert.throws(() => testSignVerify(publicKey, privateKey),
589588
common.hasOpenSSL3 ? {
590-
message: 'error:07880109:common libcrypto ' +
591-
'routines::interrupted or cancelled'
589+
message: 'error:1E08010C:DECODER routines::unsupported'
592590
} : {
593591
name: 'TypeError',
594592
code: 'ERR_MISSING_PASSPHRASE',

0 commit comments

Comments
 (0)