From 194db7e84479632a5e4885ab3fb06a19a50054f2 Mon Sep 17 00:00:00 2001 From: Marco Oliverio Date: Thu, 27 Feb 2025 19:36:45 +0000 Subject: [PATCH] tests: gate ocsp test on SM2 || SM3 we don't properly support SM2 and SM3 hash algo id properly yet --- tests/api.c | 3 ++- tests/api/test_ocsp.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/api.c b/tests/api.c index c5e9ca8ec..6f1f5a335 100644 --- a/tests/api.c +++ b/tests/api.c @@ -71324,7 +71324,8 @@ static int test_wolfSSL_OCSP_id_get0_info(void) { EXPECT_DECLS; #if (defined(OPENSSL_ALL) || defined(WOLFSSL_HAPROXY)) && \ - defined(HAVE_OCSP) && !defined(NO_FILESYSTEM) && !defined(NO_RSA) + defined(HAVE_OCSP) && !defined(NO_FILESYSTEM) && !defined(NO_RSA) && \ + !defined(WOLFSSL_SM2) && !defined(WOLFSSL_SM3) X509* cert = NULL; X509* issuer = NULL; OCSP_CERTID* id = NULL; diff --git a/tests/api/test_ocsp.c b/tests/api/test_ocsp.c index 3f4175c7d..7d2c9fddf 100644 --- a/tests/api/test_ocsp.c +++ b/tests/api/test_ocsp.c @@ -593,7 +593,8 @@ int test_ocsp_status_callback(void) !defined(WOLFSSL_NO_TLS12) \ && defined(OPENSSL_ALL) */ -#if !defined (NO_SHA) && defined(OPENSSL_ALL) && defined(HAVE_OCSP) +#if !defined(NO_SHA) && defined(OPENSSL_ALL) && defined(HAVE_OCSP) && \ + !defined(WOLFSSL_SM3) && !defined(WOLFSSL_SM2) int test_ocsp_certid_enc_dec(void) { EXPECT_DECLS; @@ -653,7 +654,7 @@ int test_ocsp_certid_enc_dec(void) return EXPECT_SUCCESS(); } -#else +#else /* !NO_SHA && OPENSSL_ALL && HAVE_OCSP && !WOLFSSL_SM3 && !WOLFSSL_SM2 */ int test_ocsp_certid_enc_dec(void) { return TEST_SKIPPED;