cleanup: simplify setting of ssl* options in my.cnf templates
magic--
This commit is contained in:
parent
0636637e37
commit
b8c8405008
@ -20,3 +20,9 @@ default-character-set=latin1
|
|||||||
|
|
||||||
[mysql_upgrade]
|
[mysql_upgrade]
|
||||||
default-character-set=latin1
|
default-character-set=latin1
|
||||||
|
|
||||||
|
[mysqltest]
|
||||||
|
loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
|
||||||
|
loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/client-cert.pem
|
||||||
|
loose-ssl-key=@ENV.MYSQL_TEST_DIR/std_data/client-key.pem
|
||||||
|
loose-skip-ssl
|
||||||
|
@ -108,6 +108,10 @@ binlog-direct-non-transactional-updates
|
|||||||
|
|
||||||
default-storage-engine=myisam
|
default-storage-engine=myisam
|
||||||
|
|
||||||
|
loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
|
||||||
|
loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
|
||||||
|
loose-ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem
|
||||||
|
|
||||||
# here, at the end of [mysqld] group mtr will automatically disable
|
# here, at the end of [mysqld] group mtr will automatically disable
|
||||||
# all optional plugins.
|
# all optional plugins.
|
||||||
|
|
||||||
|
@ -182,55 +182,6 @@ sub fix_log_slow_queries {
|
|||||||
return "$dir/mysqld-slow.log";
|
return "$dir/mysqld-slow.log";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub fix_std_data {
|
|
||||||
my ($self, $config, $group_name, $group)= @_;
|
|
||||||
my $testdir= $self->get_testdir($group);
|
|
||||||
return "$testdir/std_data";
|
|
||||||
}
|
|
||||||
|
|
||||||
sub ssl_supported {
|
|
||||||
my ($self)= @_;
|
|
||||||
return $self->{ARGS}->{ssl};
|
|
||||||
}
|
|
||||||
|
|
||||||
sub fix_skip_ssl {
|
|
||||||
return if !ssl_supported(@_);
|
|
||||||
# Add skip-ssl if ssl is supported to avoid
|
|
||||||
# that mysqltest connects with SSL by default
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub fix_ssl_ca {
|
|
||||||
return if !ssl_supported(@_);
|
|
||||||
my $std_data= fix_std_data(@_);
|
|
||||||
return "$std_data/cacert.pem"
|
|
||||||
}
|
|
||||||
|
|
||||||
sub fix_ssl_server_cert {
|
|
||||||
return if !ssl_supported(@_);
|
|
||||||
my $std_data= fix_std_data(@_);
|
|
||||||
return "$std_data/server-cert.pem"
|
|
||||||
}
|
|
||||||
|
|
||||||
sub fix_ssl_client_cert {
|
|
||||||
return if !ssl_supported(@_);
|
|
||||||
my $std_data= fix_std_data(@_);
|
|
||||||
return "$std_data/client-cert.pem"
|
|
||||||
}
|
|
||||||
|
|
||||||
sub fix_ssl_server_key {
|
|
||||||
return if !ssl_supported(@_);
|
|
||||||
my $std_data= fix_std_data(@_);
|
|
||||||
return "$std_data/server-key.pem"
|
|
||||||
}
|
|
||||||
|
|
||||||
sub fix_ssl_client_key {
|
|
||||||
return if !ssl_supported(@_);
|
|
||||||
my $std_data= fix_std_data(@_);
|
|
||||||
return "$std_data/client-key.pem"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rules to run for each mysqld in the config
|
# Rules to run for each mysqld in the config
|
||||||
# - will be run in order listed here
|
# - will be run in order listed here
|
||||||
@ -255,9 +206,6 @@ my @mysqld_rules=
|
|||||||
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
|
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
|
||||||
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
|
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
|
||||||
{ 'server-id' => \&fix_server_id, },
|
{ 'server-id' => \&fix_server_id, },
|
||||||
{ 'ssl-ca' => \&fix_ssl_ca },
|
|
||||||
{ 'ssl-cert' => \&fix_ssl_server_cert },
|
|
||||||
{ 'ssl-key' => \&fix_ssl_server_key },
|
|
||||||
{ 'bind-address' => \&fix_bind_address },
|
{ 'bind-address' => \&fix_bind_address },
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -284,10 +232,6 @@ my @client_rules=
|
|||||||
#
|
#
|
||||||
my @mysqltest_rules=
|
my @mysqltest_rules=
|
||||||
(
|
(
|
||||||
{ 'ssl-ca' => \&fix_ssl_ca },
|
|
||||||
{ 'ssl-cert' => \&fix_ssl_client_cert },
|
|
||||||
{ 'ssl-key' => \&fix_ssl_client_key },
|
|
||||||
{ 'skip-ssl' => \&fix_skip_ssl },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user