From 2cb803f39ace02adf98dcfd80952ddff8e4d9c60 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Fri, 18 Sep 2020 15:53:37 +0200 Subject: [PATCH 2/2] Fix ssl tests to support OpenSSL 3.0.0 Decrypting a key with an incorrect password is now reported as a nested asn1 error. Handle both in the regex. --- src/test/ssl/t/001_ssltests.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index fd2727b568..347113b076 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -428,10 +428,11 @@ test_connect_ok( ); # correct client cert in encrypted PEM with wrong password +# In OpenSSL 3.0.0, the returned error was changed to "nested asn1 error" test_connect_fails( $common_connstr, "user=ssltestuser sslcert=ssl/client.crt sslkey=ssl/client-encrypted-pem_tmp.key sslpassword='wrong'", - qr!\Qprivate key file "ssl/client-encrypted-pem_tmp.key": bad decrypt\E!, + qr!\Qprivate key file "ssl/client-encrypted-pem_tmp.key":\E (bad decrypt|nested asn1 error)!, "certificate authorization fails with correct client cert and wrong password in encrypted PEM format" ); -- 2.21.1 (Apple Git-122.3)