Commit 6b900330 authored by Sergei Golubchik's avatar Sergei Golubchik

show in mariadb cli whether server cert was verified

parent 853bdf57
...@@ -5049,8 +5049,8 @@ com_status(String *buffer __attribute__((unused)), ...@@ -5049,8 +5049,8 @@ com_status(String *buffer __attribute__((unused)),
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if ((status_str= mysql_get_ssl_cipher(&mysql))) if ((status_str= mysql_get_ssl_cipher(&mysql)))
tee_fprintf(stdout, "SSL:\t\t\tCipher in use is %s\n", tee_fprintf(stdout, "SSL:\t\t\tCipher in use is %s, cert is %s\n",
status_str); status_str, opt_ssl_verify_server_cert ? "OK" : "UNKNOWN");
else else
#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ #endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
tee_puts("SSL:\t\t\tNot in use", stdout); tee_puts("SSL:\t\t\tNot in use", stdout);
......
...@@ -640,3 +640,18 @@ WARNING: option --enable-cleartext-plugin is obsolete. ...@@ -640,3 +640,18 @@ WARNING: option --enable-cleartext-plugin is obsolete.
# #
# MDEV-30327 Client crashes in print_last_query_cost # MDEV-30327 Client crashes in print_last_query_cost
# #
#
# show whether server cert was verified
#
create user ser@localhost identified by "ass";
MYSQL --disable-ssl-verify-server-cert -e "\s"
SSL: Cipher in use is XXX, cert is UNKNOWN
MYSQL --ssl-verify-server-cert -e "\s"
SSL: Cipher in use is XXX, cert is OK
drop user ser@localhost;
...@@ -725,3 +725,15 @@ drop table t1; ...@@ -725,3 +725,15 @@ drop table t1;
--exec $MYSQL --show-query-costs --port=$MASTER_MYPORT -e "show tables in mysql like 'foo'" --exec $MYSQL --show-query-costs --port=$MASTER_MYPORT -e "show tables in mysql like 'foo'"
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
--echo #
--echo # show whether server cert was verified
--echo #
create user ser@localhost identified by "ass";
--echo MYSQL --disable-ssl-verify-server-cert -e "\\s"
--replace_regex /^.[^S].*// /\b[-A-Z_0-9]+,/XXX,/
--exec $MYSQL -user -pass --disable-ssl-verify-server-cert -e "\\s"
--echo MYSQL --ssl-verify-server-cert -e "\\s"
--replace_regex /^.[^S].*// /\b[-A-Z_0-9]+,/XXX,/
--exec $MYSQL -user -pass --ssl-verify-server-cert -e "\\s"
drop user ser@localhost;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment