Debian Codegraph @

plugin/auth_mysql_sha2/mysql-test/mysql_sha2/ssl_auto.result

raw
1 call mtr.add_suppression('failed to read private_key.pem: 2 "No such file or directory"');
2 show status like 'caching_sha2_password%';
3 Variable_name Value
4 Caching_sha2_password_rsa_public_key
5 create user test1@'%' identified via caching_sha2_password using PASSWORD('pwd');
6 create user test2@'%' identified via caching_sha2_password;
7 show grants for test2@'%';
8 Grants for test2@%
9 GRANT USAGE ON *.* TO `test2`@`%` IDENTIFIED VIA caching_sha2_password
10 create procedure checkme() sql security invoker
11 select user(), current_user(), variable_value > '' as 'have_ssl'
12 from information_schema.session_status
13 where variable_name='ssl_cipher';
14 grant execute on test.* to test1@'%', test2@'%';
15 # mysql -utest1 -ppwd --disable-ssl-verify-server-cert -e "call test.checkme()"
16 user() current_user() have_ssl
17 test1@localhost test1@% 1
18 # mysql -utest1 -pwrong_pwd --disable-ssl-verify-server-cert -e "call test.checkme()"
19 ERROR 1045 (28000): Access denied for user 'test1'@'localhost' (using password: YES)
20 # mysql -utest2 --disable-ssl-verify-server-cert -e "call test.checkme()"
21 user() current_user() have_ssl
22 test2@localhost test2@% 1
23 # mysql -utest2 -ppwd --disable-ssl-verify-server-cert -e "call test.checkme()"
24 ERROR 1045 (28000): Access denied for user 'test2'@'localhost' (using password: YES)
25 # mysql -utest1 -ppwd --ssl-verify-server-cert -e "call test.checkme()"
26 ERROR 2026 (HY000): TLS/SSL error: Certificate verification failure: The certificate is NOT trusted.
27 drop procedure checkme;
28 drop user test1@'%';
29 drop user test2@'%';