rhbz#1964854 - Fix check across alpha1 vs alpha17 - Change default alg for PEM_get_string_PrivateKey() - Different order in CA chain in some versions - Changed API of CTX_set_ciphersuites() and set_ciphersuites(), ignore unknown ciphers - Disable TLSv1 and TLSv1_1 usage in test
43 lines
1.9 KiB
Diff
43 lines
1.9 KiB
Diff
diff -ru Net-SSLeay-1.90.orig/t/local/43_misc_functions.t Net-SSLeay-1.90/t/local/43_misc_functions.t
|
|
--- Net-SSLeay-1.90.orig/t/local/43_misc_functions.t 2021-01-21 16:14:11.000000000 +0100
|
|
+++ Net-SSLeay-1.90/t/local/43_misc_functions.t 2021-06-04 17:30:29.508947419 +0200
|
|
@@ -245,6 +245,20 @@
|
|
|
|
my $ciphersuites = join(':', keys(%tls_1_3_aead_cipher_to_keyblock_size));
|
|
|
|
+ # In OpenSSL 3.0.0 alpha 11 (commit c1e8a0c66e32b4144fdeb49bd5ff7acb76df72b9) was
|
|
+ # changed api of set_ciphersuites to ignore unknown ciphers.
|
|
+ my $ret_partially_bad_ciphersuites;
|
|
+ my $ssleay_version = Net::SSLeay::SSLeay_version( Net::SSLeay::SSLEAY_VERSION() );
|
|
+ my $openssl_alpha_version;
|
|
+ if (Net::SSLeay::SSLeay == 0x30000000 && $ssleay_version =~ /-alpha(\d+)\ /) {
|
|
+ $openssl_alpha_version = $1;
|
|
+ }
|
|
+ if (Net::SSLeay::SSLeay >= 0x30000000 && defined $openssl_alpha_version && $openssl_alpha_version > 10) {
|
|
+ $ret_partially_bad_ciphersuites = 1;
|
|
+ } else {
|
|
+ $ret_partially_bad_ciphersuites = 0;
|
|
+ }
|
|
+
|
|
my ($ctx, $rv, $ssl);
|
|
$ctx = Net::SSLeay::CTX_new();
|
|
$rv = Net::SSLeay::CTX_set_ciphersuites($ctx, $ciphersuites);
|
|
@@ -257,7 +271,7 @@
|
|
};
|
|
is($rv, 1, 'CTX set undef ciphersuites');
|
|
$rv = Net::SSLeay::CTX_set_ciphersuites($ctx, 'nosuchthing:' . $ciphersuites);
|
|
- is($rv, 0, 'CTX set partially bad ciphersuites');
|
|
+ is($rv, $ret_partially_bad_ciphersuites, 'CTX set partially bad ciphersuites');
|
|
$rv = Net::SSLeay::CTX_set_ciphersuites($ctx, 'nosuchthing:');
|
|
is($rv, 0, 'CTX set bad ciphersuites');
|
|
|
|
@@ -272,7 +286,7 @@
|
|
};
|
|
is($rv, 1, 'SSL set undef ciphersuites');
|
|
$rv = Net::SSLeay::set_ciphersuites($ssl, 'nosuchthing:' . $ciphersuites);
|
|
- is($rv, 0, 'SSL set partially bad ciphersuites');
|
|
+ is($rv, $ret_partially_bad_ciphersuites, 'SSL set partially bad ciphersuites');
|
|
$rv = Net::SSLeay::set_ciphersuites($ssl, 'nosuchthing:');
|
|
is($rv, 0, 'SSL set bad ciphersuites');
|
|
|