Since the distros are now shipping with OpenSSL 3, no need to build it. Limit the sm2/sm3 test to OpenSSL 3. Reviewed-by: Stefan Berger <stefanb@xxxxxxxxxxxxx> Signed-off-by: Mimi Zohar <zohar@xxxxxxxxxxxxx> --- tests/sign_verify.test | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/sign_verify.test b/tests/sign_verify.test index 3e9548e1aeb7..2bc365ab408d 100755 --- a/tests/sign_verify.test +++ b/tests/sign_verify.test @@ -416,9 +416,12 @@ sign_verify prime256v1 sha384 0x030205:K:004[345678] sign_verify prime256v1 sha512 0x030206:K:004[345678] # If openssl 3.0 is installed, test the SM2/3 algorithm combination -if [ -x /opt/openssl3/bin/openssl ]; then - PATH=/opt/openssl3/bin:$PATH LD_LIBRARY_PATH=/opt/openssl3/lib \ - sign_verify sm2 sm3 0x030211:K:004[345678] +ssl_major_version=$(openssl version | sed -n 's/^OpenSSL \([^\.]\).*/\1/p') +if [ "${ssl_major_version}" = 3 ]; then + sign_verify sm2 sm3 0x030211:K:004[345678] +else + __skip() { echo "sm2/sm3 tests are skipped (ssl version)"; return $SKIP; } + expect_pass __skip fi # Test v2 signatures with EC-RDSA -- 2.31.1