Skip to content

Commit

Permalink
test: update OpenSSL3 error messages for 3.0.0+quic
Browse files Browse the repository at this point in the history
This commit updates two OpenSSL 3.0.0 error messages required for
OpenSSL 3.0.0+quic.

PR-URL: #40093
Refs: nodejs/build#2759
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
danbev authored and nodejs-github-bot committed Sep 13, 2021
1 parent 5c1adda commit e016cc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/parallel/test-crypto-key-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
// Reading an encrypted key without a passphrase should fail.
assert.throws(() => createPrivateKey(privateDsa), common.hasOpenSSL3 ? {
name: 'Error',
message: 'error:1E08010C:DECODER routines::unsupported',
message: 'error:07880109:common libcrypto routines::interrupted or ' +
'cancelled',
} : {
name: 'TypeError',
code: 'ERR_MISSING_PASSPHRASE',
Expand All @@ -545,7 +546,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
passphrase: Buffer.alloc(1024, 'a')
}), {
message: common.hasOpenSSL3 ?
'error:1E08010C:DECODER routines::unsupported' :
'error:07880109:common libcrypto routines::interrupted or cancelled' :
/bad decrypt/
});

Expand Down
6 changes: 4 additions & 2 deletions test/parallel/test-crypto-keygen.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,8 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
// Since the private key is encrypted, signing shouldn't work anymore.
assert.throws(() => testSignVerify(publicKey, privateKey),
common.hasOpenSSL3 ? {
message: 'error:1E08010C:DECODER routines::unsupported'
message: 'error:07880109:common libcrypto ' +
'routines::interrupted or cancelled'
} : {
name: 'TypeError',
code: 'ERR_MISSING_PASSPHRASE',
Expand Down Expand Up @@ -674,7 +675,8 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
// Since the private key is encrypted, signing shouldn't work anymore.
assert.throws(() => testSignVerify(publicKey, privateKey),
common.hasOpenSSL3 ? {
message: 'error:1E08010C:DECODER routines::unsupported'
message: 'error:07880109:common libcrypto ' +
'routines::interrupted or cancelled'
} : {
name: 'TypeError',
code: 'ERR_MISSING_PASSPHRASE',
Expand Down

0 comments on commit e016cc7

Please sign in to comment.