}
#endif
-#ifndef OPENSSL_NO_SM2
+#if !defined(OPENSSL_NO_SM2) && !defined(FIPS_MODE)
static int test_EVP_SM2_verify(void)
{
|| !TEST_int_eq(EVP_MD_block_size(md), SHA256_CBLOCK))
goto err;
- /* Also test EVP_MD_upref() while we're doing this */
- if (!TEST_true(EVP_MD_upref(md)))
+ /* Also test EVP_MD_up_ref() while we're doing this */
+ if (!TEST_true(EVP_MD_up_ref(md)))
goto err;
/* Ref count should now be 2. Release both */
EVP_MD_meth_free(md);
md = NULL;
/*
- * Explicitly asking for the default implementation should succeeed except
+ * Explicitly asking for the default implementation should succeed except
* in test 4 where the default provider is not loaded.
*/
md = EVP_MD_fetch(ctx, "SHA256", "default=yes");
EVP_MD_meth_free(md);
OSSL_PROVIDER_unload(defltprov);
OSSL_PROVIDER_unload(fipsprov);
+ /* Not normally needed, but we would like to test that
+ * OPENSSL_thread_stop_ex() behaves as expected.
+ */
+ if (ctx != NULL)
+ OPENSSL_thread_stop_ex(ctx);
OPENSSL_CTX_free(ctx);
return ret;
}
#ifndef OPENSSL_NO_EC
ADD_TEST(test_EVP_PKCS82PKEY);
#endif
-#ifndef OPENSSL_NO_SM2
+#if !defined(OPENSSL_NO_SM2) && !defined(FIPS_MODE)
ADD_TEST(test_EVP_SM2);
ADD_TEST(test_EVP_SM2_verify);
#endif