1--disable_query_log
2--disable_result_log
3
4let OPENSSL_VERSION_INFO= $MYSQLTEST_VARDIR/log/openssl_version_info.txt;
5let OPENSSL_CONFIG_INC= $MYSQLTEST_VARDIR/log/openssl_binary_config.inc;
6
7--error 0,1
8--remove_file $OPENSSL_VERSION_INFO
9--error 0,1
10--remove_file $OPENSSL_CONFIG_INC
11
12--error 0,1, 127
13--exec openssl version > $OPENSSL_VERSION_INFO
14
15perl;
16 use strict;
17 my $search_file= $ENV{'OPENSSL_VERSION_INFO'};
18 my $search_pattern_1= "0.9.*";
19 my $search_pattern_2= "1.0.0.*";
20 my $search_pattern_3= "1.0.1.*";
21 my $content= "";
22 my $dir= $ENV{'MYSQLTEST_VARDIR'};
23 open(CONFIG_INC, ">$dir/log/openssl_binary_config.inc");
24 open(FILE, "$search_file") or die("Unable to open '$search_file' : $!\n");
25 read(FILE, $content, 100, 0);
26 close(FILE);
27
28 if ( ($content =~ m{$search_pattern_1}) || ($content =~ m{$search_pattern_2}) ||
29      ($content =~ m{$search_pattern_3}) ) {
30    print CONFIG_INC "let \$STATUS_VAR = 1;\n";
31 }
32 else {
33    print CONFIG_INC "let \$STATUS_VAR = 0;\n";
34 }
35 close(CONFIG_INC);
36EOF
37
38--source $OPENSSL_CONFIG_INC
39
40if ($STATUS_VAR)
41{
42 --error 0,1
43 --remove_file $OPENSSL_VERSION_INFO
44 --error 0,1
45 --remove_file $OPENSSL_CONFIG_INC
46 --skip Test requires openssl version to be 1.0.2+
47}
48
49--error 0,1
50--remove_file $OPENSSL_VERSION_INFO
51--error 0,1
52--remove_file $OPENSSL_CONFIG_INC
53
54--enable_query_log
55--enable_result_log
56