Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-9145: Fix openssl version detection in encryption_udf_digest_table.inc #5261

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions mysql-test/include/have_openssl_binary_version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
# The condition has the same form as expressions evaluated by include/eval.inc
# ==== Usage ====
#
# --let $openssl_binary_version = 1\\.1\\..*
# --let $openssl_binary_version_do_not_skip = 1 (optional)
# --let $openssl_binary_version = 1.1.*
# --source include/have_openssl_binary_version.inc
#
# result (if $openssl_binary_version_do_not_skip was set to 1):
# $openssl_binary_version_match = 0 | 1

--disable_query_log
--disable_result_log
Expand Down Expand Up @@ -49,24 +45,19 @@ EOF

--source $OPENSSL_CONFIG_INC

--error 0,1
--remove_file $OPENSSL_VERSION_INFO
--error 0,1
--remove_file $OPENSSL_CONFIG_INC

if ($STATUS_VAR)
{
if (!$openssl_binary_version_do_not_skip)
{
--skip Test requires openssl version to be $openssl_binary_version
}
--let $openssl_binary_version_match = 0
--error 0,1
--remove_file $OPENSSL_VERSION_INFO
--error 0,1
--remove_file $OPENSSL_CONFIG_INC
--skip Test requires openssl version to be $openssl_binary_version
}

if (!$STATUS_VAR)
{
--let $openssl_binary_version_match = 1
}
--error 0,1
--remove_file $OPENSSL_VERSION_INFO
--error 0,1
--remove_file $OPENSSL_CONFIG_INC

--enable_query_log
--enable_result_log
Expand Down
18 changes: 5 additions & 13 deletions mysql-test/include/percona_encryption_udf_digest_table.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ CREATE TEMPORARY TABLE digest_type(
--enable_query_log
--enable_result_log

--let $openssl_binary_version_do_not_skip = 1
let $ssl_ver = query_get_value(show status like "Tls_library_version", Value, 1);

--let $openssl_binary_version = 1\\.0\\.2
--source include/have_openssl_binary_version.inc
if ($openssl_binary_version_match)
if (`select "$ssl_ver" like "OpenSSL 1.0.2%"`)
{
--disable_query_log
--disable_result_log
Expand All @@ -40,9 +38,7 @@ if ($openssl_binary_version_match)
--enable_result_log
}

--let $openssl_binary_version = 1\\.1\\.0
--source include/have_openssl_binary_version.inc
if ($openssl_binary_version_match)
if (`select "$ssl_ver" like "OpenSSL 1.1.0%"`)
{
--disable_query_log
--disable_result_log
Expand All @@ -68,9 +64,7 @@ if ($openssl_binary_version_match)
--enable_result_log
}

--let $openssl_binary_version = 1\\.1\\.1
--source include/have_openssl_binary_version.inc
if ($openssl_binary_version_match)
if (`select "$ssl_ver" like "OpenSSL 1.1.1%"`)
{
--disable_query_log
--disable_result_log
Expand Down Expand Up @@ -105,9 +99,7 @@ if ($openssl_binary_version_match)
--enable_result_log
}

--let $openssl_binary_version = 3\\.0\\.\\d+
--source include/have_openssl_binary_version.inc
if ($openssl_binary_version_match)
if (`select "$ssl_ver" like "OpenSSL 3.%"`)
{
--disable_query_log
--disable_result_log
Expand Down
Loading