mariadb/mysql-test/main/ssl_7937.result
2022-08-09 09:47:16 +02:00

22 lines
634 B
Text

create procedure have_ssl()
select if(variable_value > '','yes','no') as 'have_ssl'
from information_schema.session_status
where variable_name='ssl_cipher';
mysql --ssl-ca=cacert.pem -e "call test.have_ssl()"
have_ssl
yes
mysql --ssl -e "call test.have_ssl()"
have_ssl
yes
mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
have_ssl
yes
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
ERROR 2026 (HY000): TLS/SSL error: Failed to verify the server certificate
#
# MDEV-27105 --ssl option set as default for mariadb CLI
#
mysql -e "call test.have_ssl()"
have_ssl
yes
drop procedure have_ssl;