test: update OpenSSL3 error messages for 3.0.0+quic

This commit updates two OpenSSL 3.0.0 error messages required for
OpenSSL 3.0.0+quic.

PR-URL: https://github.com/nodejs/node/pull/40093
Refs: https://github.com/nodejs/build/pull/2759
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Daniel Bevenius
2021-09-13 07:36:02 +02:00
committed by Node.js GitHub Bot
parent 5c1adda0ae
commit e016cc79f0
2 changed files with 7 additions and 4 deletions

View File

@@ -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',
@@ -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/
});

View File

@@ -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',
@@ -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',