TEST: Remove use of EVP_PKEY_set_alias_type() in test/evp_extra_test.c
We already test EVP_PKEY_set_alias_type() quite thoroughly in
test/ecdsatest.c, that should be enough.
#include "crypto/evp.h"
#include "../e_os.h" /* strcasecmp */
-#ifndef OPENSSL_NO_SM2
-/*
- * TODO(3.0) remove when provider SM2 keymgmt is implemented and
- * EVP_PKEY_set_alias_type() works with provider-native keys.
- */
-# define TMP_SM2_HACK
-#endif
-
static OPENSSL_CTX *testctx = NULL;
/*
@@ -954,12 +946,7 @@ static int test_EVP_SM2_verify(void)
if (!TEST_true(pkey != NULL))
goto done;
-#ifdef TMP_SM2_HACK
- if (!TEST_ptr(EVP_PKEY_get0(pkey)))
- goto done;
-#endif
-
- if (!TEST_true(EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2)))
+ if (!TEST_true(EVP_PKEY_is_a(pkey, "SM2")))
goto done;
if (!TEST_ptr(mctx = EVP_MD_CTX_new()))
