Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8218cb44
Commit
8218cb44
authored
Dec 13, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate ssl arguments only if ssl is supported
parent
516a843b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
mysql-test/lib/My/ConfigFactory.pm
mysql-test/lib/My/ConfigFactory.pm
+16
-6
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-4
No files found.
mysql-test/lib/My/ConfigFactory.pm
View file @
8218cb44
...
@@ -139,27 +139,37 @@ sub fix_std_data {
...
@@ -139,27 +139,37 @@ sub fix_std_data {
return
"
$basedir
/mysql-test/std_data
";
return
"
$basedir
/mysql-test/std_data
";
}
}
sub
ssl_supported
{
my
(
$self
)
=
@_
;
return
$self
->
{
ARGS
}
->
{
ssl
};
}
sub
fix_ssl_ca
{
sub
fix_ssl_ca
{
return
if
!
ssl_supported
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
return
"
$std_data
/cacert.pem
"
return
"
$std_data
/cacert.pem
"
}
}
sub
fix_ssl_server_cert
{
sub
fix_ssl_server_cert
{
return
if
!
ssl_supported
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
return
"
$std_data
/server-cert.pem
"
return
"
$std_data
/server-cert.pem
"
}
}
sub
fix_ssl_client_cert
{
sub
fix_ssl_client_cert
{
return
if
!
ssl_supported
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
return
"
$std_data
/client-cert.pem
"
return
"
$std_data
/client-cert.pem
"
}
}
sub
fix_ssl_server_key
{
sub
fix_ssl_server_key
{
return
if
!
ssl_supported
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
return
"
$std_data
/server-key.pem
"
return
"
$std_data
/server-key.pem
"
}
}
sub
fix_ssl_client_key
{
sub
fix_ssl_client_key
{
return
if
!
ssl_supported
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
my
$std_data
=
fix_std_data
(
@_
);
return
"
$std_data
/client-key.pem
"
return
"
$std_data
/client-key.pem
"
}
}
...
@@ -188,9 +198,9 @@ my @mysqld_rules=
...
@@ -188,9 +198,9 @@ my @mysqld_rules=
{
'
server-id
'
=>
\&
fix_server_id
,
},
{
'
server-id
'
=>
\&
fix_server_id
,
},
# By default, prevent the started mysqld to access files outside of vardir
# By default, prevent the started mysqld to access files outside of vardir
{
'
secure-file-priv
'
=>
sub
{
return
shift
->
{
ARGS
}
->
{
vardir
};
}
},
{
'
secure-file-priv
'
=>
sub
{
return
shift
->
{
ARGS
}
->
{
vardir
};
}
},
{
'
loose-
ssl-ca
'
=>
\&
fix_ssl_ca
},
{
'
ssl-ca
'
=>
\&
fix_ssl_ca
},
{
'
loose-
ssl-cert
'
=>
\&
fix_ssl_server_cert
},
{
'
ssl-cert
'
=>
\&
fix_ssl_server_cert
},
{
'
loose-
ssl-key
'
=>
\&
fix_ssl_server_key
},
{
'
ssl-key
'
=>
\&
fix_ssl_server_key
},
);
);
...
@@ -268,9 +278,9 @@ my @client_rules=
...
@@ -268,9 +278,9 @@ my @client_rules=
#
#
my
@mysqltest_rules
=
my
@mysqltest_rules
=
(
(
{
'
loose-
ssl-ca
'
=>
\&
fix_ssl_ca
},
{
'
ssl-ca
'
=>
\&
fix_ssl_ca
},
{
'
loose-
ssl-cert
'
=>
\&
fix_ssl_client_cert
},
{
'
ssl-cert
'
=>
\&
fix_ssl_client_cert
},
{
'
loose-
ssl-key
'
=>
\&
fix_ssl_client_key
},
{
'
ssl-key
'
=>
\&
fix_ssl_client_key
},
);
);
...
...
mysql-test/mysql-test-run.pl
View file @
8218cb44
...
@@ -2235,6 +2235,7 @@ sub run_testcase ($) {
...
@@ -2235,6 +2235,7 @@ sub run_testcase ($) {
#hosts => [ 'host1', 'host2' ],
#hosts => [ 'host1', 'host2' ],
user
=>
$opt_user
,
user
=>
$opt_user
,
password
=>
'',
password
=>
'',
ssl
=>
$opt_ssl_supported
,
}
}
);
);
...
@@ -3198,10 +3199,6 @@ sub start_mysqltest ($) {
...
@@ -3198,10 +3199,6 @@ sub start_mysqltest ($) {
# Turn on SSL for _all_ test cases if option --ssl was used
# Turn on SSL for _all_ test cases if option --ssl was used
mtr_add_arg
(
$args
,
"
--ssl
");
mtr_add_arg
(
$args
,
"
--ssl
");
}
}
elsif
(
$opt_ssl_supported
)
{
mtr_add_arg
(
$args
,
"
--skip-ssl
");
}
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# export MYSQL_TEST variable containing <path>/mysqltest <args>
# export MYSQL_TEST variable containing <path>/mysqltest <args>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment