From 4aa2610252d55ec1bc583e96164fab3b2e17b44e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 13 Sep 2021 07:36:02 +0200 Subject: [PATCH] test: update OpenSSL3 error messages for 3.0.0+quic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Richard Lau Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- test/parallel/test-crypto-key-objects.js | 5 +++-- test/parallel/test-crypto-keygen.js | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js index c2c47a9ce72f12..c564c4dcb43fac 100644 --- a/test/parallel/test-crypto-key-objects.js +++ b/test/parallel/test-crypto-key-objects.js @@ -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/ }); diff --git a/test/parallel/test-crypto-keygen.js b/test/parallel/test-crypto-keygen.js index 2647c16a9a906c..f92a1091fc9411 100644 --- a/test/parallel/test-crypto-keygen.js +++ b/test/parallel/test-crypto-keygen.js @@ -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',