mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
test: update OpenSSL3 error messages for beta-1
This commit updates error messages that have changed while these tests were disabled. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
db4f802fba
commit
b1d38ddc8a
3 files changed
+6
-9
No files matched your search
@@ -226,7 +226,7 @@ assert.throws(() => {
|
||||
crypto.generateKeyPairSync('ec', { namedCurve: not256k1 }));
|
||||
}, common.hasOpenSSL3 ? {
|
||||
name: 'Error',
|
||||
code: 'ERR_OSSL_MISMATCHING_SHARED_PARAMETERS'
|
||||
code: 'ERR_OSSL_MISMATCHING_DOMAIN_PARAMETERS'
|
||||
} : {
|
||||
name: 'Error',
|
||||
code: 'ERR_OSSL_EVP_DIFFERENT_PARAMETERS'
|
||||
|
||||
@@ -305,7 +305,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
|
||||
assert.throws(() => {
|
||||
createPrivateKey({ key: '' });
|
||||
}, common.hasOpenSSL3 ? {
|
||||
message: 'Failed to read private key',
|
||||
message: 'error:1E08010C:DECODER routines::unsupported',
|
||||
} : {
|
||||
message: 'error:0909006C:PEM routines:get_name:no start line',
|
||||
code: 'ERR_OSSL_PEM_NO_START_LINE',
|
||||
@@ -519,8 +519,7 @@ 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:07880109:common libcrypto routines::interrupted or ' +
|
||||
'cancelled',
|
||||
message: 'error:1E08010C:DECODER routines::unsupported',
|
||||
} : {
|
||||
name: 'TypeError',
|
||||
code: 'ERR_MISSING_PASSPHRASE',
|
||||
@@ -546,7 +545,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
|
||||
passphrase: Buffer.alloc(1024, 'a')
|
||||
}), {
|
||||
message: common.hasOpenSSL3 ?
|
||||
'error:07880109:common libcrypto routines::interrupted or cancelled' :
|
||||
'error:1E08010C:DECODER routines::unsupported' :
|
||||
/bad decrypt/
|
||||
});
|
||||
|
||||
|
||||
@@ -549,8 +549,7 @@ 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:07880109:common libcrypto ' +
|
||||
'routines::interrupted or cancelled'
|
||||
message: 'error:1E08010C:DECODER routines::unsupported'
|
||||
} : {
|
||||
name: 'TypeError',
|
||||
code: 'ERR_MISSING_PASSPHRASE',
|
||||
@@ -587,8 +586,7 @@ 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:07880109:common libcrypto ' +
|
||||
'routines::interrupted or cancelled'
|
||||
message: 'error:1E08010C:DECODER routines::unsupported'
|
||||
} : {
|
||||
name: 'TypeError',
|
||||
code: 'ERR_MISSING_PASSPHRASE',
|
||||
|
||||
Reference in new issue
Block a user