@@ -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