diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/ssl_7937.test | 10 | ||||
-rw-r--r-- | mysql-test/main/ssl_cipher.test | 2 | ||||
-rw-r--r-- | mysql-test/suite.pm | 9 |
3 files changed, 13 insertions, 8 deletions
diff --git a/mysql-test/main/ssl_7937.test b/mysql-test/main/ssl_7937.test index aa8cd225d7b..264da3a6daa 100644 --- a/mysql-test/main/ssl_7937.test +++ b/mysql-test/main/ssl_7937.test @@ -22,14 +22,14 @@ create procedure have_ssl() --echo mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()" # this is the test where certificate verification fails. -# but yassl doesn't support certificate verification, so -# we fake the test result for yassl -let yassl=`select variable_value='Unknown' from information_schema.session_status where variable_name='Ssl_session_cache_mode'`; -if (!$yassl) { +# but client library may not support certificate verification, so +# we fake the test result for it. We assume client is openssl, when server is openssl +let client_supports_cert_verification =`select variable_value not in('Unknown','OFF') from information_schema.session_status where variable_name='Ssl_session_cache_mode'`; +if ($client_supports_cert_verification) { --replace_result "self signed certificate in certificate chain" "Failed to verify the server certificate" "Error in the certificate." "Failed to verify the server certificate" --exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1 } -if ($yassl) { +if (!$client_supports_cert_verification) { --echo ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate } drop procedure have_ssl; diff --git a/mysql-test/main/ssl_cipher.test b/mysql-test/main/ssl_cipher.test index 27854654a9f..36549d76d02 100644 --- a/mysql-test/main/ssl_cipher.test +++ b/mysql-test/main/ssl_cipher.test @@ -43,7 +43,7 @@ drop user ssl_user1@localhost, ssl_user2@localhost, ssl_user3@localhost, ssl_use # # Bug#21611 Slave can't connect when master-ssl-cipher specified # - Apparently selecting a cipher doesn't work at all -# - Use a cipher that both yaSSL and OpenSSL supports +# - Use a cipher that both WolfSSL and OpenSSL supports # --write_file $MYSQLTEST_VARDIR/tmp/test.sql SHOW STATUS LIKE 'Ssl_cipher'; diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index 76bfab714df..7f9838f645e 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -66,9 +66,14 @@ sub skip_combinations { unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/ and $1 ge "1.0.1d" and $1 lt "1.1.1"; + sub x509v3_ok() { + return ($::mysqld_variables{'version-ssl-library'} =~ /WolfSSL/) || + ($::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/ + and $1 ge "1.0.2"); + } + $skip{'main/ssl_7937.combinations'} = [ 'x509v3' ] - unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/ - and $1 ge "1.0.2"; + unless x509v3_ok(); $skip{'main/ssl_verify_ip.test'} = 'x509v3 support required' unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/ |