We already test EVP_PKEY_set_alias_type() quite thoroughly in
test/ecdsatest.c, that should be enough.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12920)
#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;
/*
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()))