403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.163.189
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/mysql-test/suite/group_replication/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/group_replication/t/gr_ssl_mode.test
#
# Validate that Group Replication ssl mode works properly.
#
# Steps:
#   1. Start one member with GCS SSL enabled.
#   2. Start a second member with GCS SSL disabled, the member
#      will fail to join the group.
#   3. Start the second member with GCS SSL enabled, the member
#      will be able to join the group.
#   4. Start the second member with GCS SSL enabled and
#      validating server certificate against the CA, the
#      member will be able to join the group.
#   5. Start the second member with GCS SSL enabled and
#      validating server certificate against the CA plus
#      validating that server hostname matches server
#      certificate hostname, the member will be able to join
#      the group.
#   6. Clean up.
#
--source include/big_test.inc
--source include/have_ssl.inc
--source ../inc/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source ../inc/group_replication.inc


--echo
--echo ############################################################
--echo # 1. Start one member with GCS SSL enabled.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode;
SET GLOBAL group_replication_ssl_mode= REQUIRED;
--source ../inc/start_and_bootstrap_group_replication.inc

--let $grep_file= $MYSQLTEST_VARDIR/tmp/group_replication_ssl_mode.1.err
--let $grep_pattern= Group communication SSL configuration: group_replication_ssl_mode: "REQUIRED"
--let $grep_output= print_count
--source include/grep_pattern.inc


--echo
--echo ############################################################
--echo # 2. Start a second member with GCS SSL disabled, the member
--echo #    will fail to join the group.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--disable_query_log
--eval SET GLOBAL group_replication_group_name= '$group_replication_group_name'
--enable_query_log

SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode;
SET GLOBAL group_replication_ssl_mode= DISABLED;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--let $grep_file= $MYSQLTEST_VARDIR/tmp/group_replication_ssl_mode.2.err
--let $grep_pattern= Group communication SSL configuration: group_replication_ssl_mode: "DISABLED"
--let $grep_output= print_count
--source include/grep_pattern.inc


--echo
--echo ############################################################
--echo # 3. Start the second member with GCS SSL enabled, the member
--echo #    will be able to join the group.
SET GLOBAL group_replication_ssl_mode= REQUIRED;
--source include/start_group_replication.inc

--let $group_replication_number_of_members= 2
--source ../inc/gr_wait_for_number_of_members.inc

--let $grep_file= $MYSQLTEST_VARDIR/tmp/group_replication_ssl_mode.2.err
--let $grep_pattern= Group communication SSL configuration: group_replication_ssl_mode: "REQUIRED"
--let $grep_output= print_count
--source include/grep_pattern.inc

--source include/stop_group_replication.inc


--echo
--echo ############################################################
--echo # 4. Start the second member with GCS SSL enabled and
--echo #    validating server certificate against the CA, the
--echo #    member will be able to join the group.
SET GLOBAL group_replication_ssl_mode= VERIFY_CA;
--source include/start_group_replication.inc

--let $group_replication_number_of_members= 2
--source ../inc/gr_wait_for_number_of_members.inc

--let $grep_file= $MYSQLTEST_VARDIR/tmp/group_replication_ssl_mode.2.err
--let $grep_pattern= Group communication SSL configuration: group_replication_ssl_mode: "VERIFY_CA"
--let $grep_output= print_count
--source include/grep_pattern.inc

--source include/stop_group_replication.inc


--echo
--echo ############################################################
--echo # 5. Start the second member with GCS SSL enabled and
--echo #    validating server certificate against the CA plus
--echo #    validating that server hostname matches server
--echo #    certificate hostname, the member will be able to join
--echo #    the group.
SET GLOBAL group_replication_ssl_mode= VERIFY_IDENTITY;
--source include/start_group_replication.inc

--let $group_replication_number_of_members= 2
--source ../inc/gr_wait_for_number_of_members.inc

--let $grep_file= $MYSQLTEST_VARDIR/tmp/group_replication_ssl_mode.2.err
--let $grep_pattern= Group communication SSL configuration: group_replication_ssl_mode: "VERIFY_IDENTITY"
--let $grep_output= print_count
--source include/grep_pattern.inc

--source include/stop_group_replication.inc


--echo
--echo ############################################################
--echo # 6. Clean up.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET GLOBAL group_replication_ssl_mode= @group_replication_ssl_mode_save;

--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET GLOBAL group_replication_ssl_mode= @group_replication_ssl_mode_save;

--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit