mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-16266 - New command FLUSH SSL to reload server's SSL certificate(private key,CRL,etc)
This commit is contained in:
26
mysql-test/main/flush_ssl.result
Normal file
26
mysql-test/main/flush_ssl.result
Normal file
@ -0,0 +1,26 @@
|
||||
# Kill the server
|
||||
connect ssl_con,localhost,root,,,,,SSL;
|
||||
SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
|
||||
# Use a different certificate ("Not after" certificate field changed)
|
||||
FLUSH SSL;
|
||||
# Check new certificate used by new connection
|
||||
Result
|
||||
OK
|
||||
# Check that existing SSL connection still works, and uses old certificate, even if new one is loaded in FLUSH SSL
|
||||
connection ssl_con;
|
||||
SELECT IF(VARIABLE_VALUE=@ssl_not_after,'OK','FAIL') as Result FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
|
||||
Result
|
||||
OK
|
||||
disconnect ssl_con;
|
||||
connection default;
|
||||
SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
|
||||
NAME VALUE
|
||||
SSL_ACCEPTS 1
|
||||
SSL_FINISHED_ACCEPTS 1
|
||||
FLUSH SSL;
|
||||
SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
|
||||
NAME VALUE
|
||||
SSL_ACCEPTS 0
|
||||
SSL_FINISHED_ACCEPTS 0
|
||||
# Cleanup
|
||||
# Kill the server
|
Reference in New Issue
Block a user