Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: fix tests affected by OpenSSL update
Last OpenSSL 3 update changes behaviour back to be
closer to that of OpenSSL 1.1.1. Remove some instances
where we expected different errors from OpenSSL 3 versus
OpenSSL 1.1.1.

Signed-off-by: Michael Dawson <midawson@redhat.com>
  • Loading branch information
mhdawson authored and hassaanp committed Mar 16, 2022
commit d37dceb29de13b67168844215e45058aa8e87a16
4 changes: 1 addition & 3 deletions test/parallel/test-crypto-key-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
format: 'pem',
passphrase: Buffer.alloc(1024, 'a')
}), {
message: common.hasOpenSSL3 ?
'error:07880109:common libcrypto routines::interrupted or cancelled' :
/bad decrypt/
message: /bad decrypt/
});

const publicKey = createPublicKey(publicDsa);
Expand Down
11 changes: 4 additions & 7 deletions test/parallel/test-tls-passphrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ server.listen(0, common.mustCall(function() {
}, onSecureConnect());
})).unref();

const errMessagePassword = common.hasOpenSSL3 ?
/Error: error:1400006B:UI routines::processing error/ : /bad decrypt/;
const errMessageDecrypt = /bad decrypt/;

// Missing passphrase
assert.throws(function() {
Expand All @@ -234,7 +233,7 @@ assert.throws(function() {
cert: cert,
rejectUnauthorized: false
});
}, errMessagePassword);
}, errMessageDecrypt);

assert.throws(function() {
tls.connect({
Expand All @@ -243,7 +242,7 @@ assert.throws(function() {
cert: cert,
rejectUnauthorized: false
});
}, errMessagePassword);
}, errMessageDecrypt);

assert.throws(function() {
tls.connect({
Expand All @@ -252,9 +251,7 @@ assert.throws(function() {
cert: cert,
rejectUnauthorized: false
});
}, errMessagePassword);

const errMessageDecrypt = /bad decrypt/;
}, errMessageDecrypt);

// Invalid passphrase
assert.throws(function() {
Expand Down