diff --git a/test/parallel/test-tls-passphrase.js b/test/parallel/test-tls-passphrase.js index 610bbefe46c9c0..c0d0051ff8bbc2 100644 --- a/test/parallel/test-tls-passphrase.js +++ b/test/parallel/test-tls-passphrase.js @@ -224,7 +224,7 @@ server.listen(0, common.mustCall(function() { })).unref(); const errMessagePassword = common.hasOpenSSL3 ? - /processing error/ : /bad decrypt/; + /Error: PEM_read_bio_PrivateKey/ : /bad decrypt/; // Missing passphrase assert.throws(function() { @@ -254,7 +254,8 @@ assert.throws(function() { }); }, errMessagePassword); -const errMessageDecrypt = /bad decrypt/; +const errMessageDecrypt = common.hasOpenSSL3 ? + /Error: PEM_read_bio_PrivateKey/ : /bad decrypt/; // Invalid passphrase assert.throws(function() {