From: Richard Levitte Date: Wed, 23 Sep 2020 04:18:06 +0000 (+0200) Subject: TEST: Remove use of EVP_PKEY_set_alias_type() in test/evp_extra_test.c X-Git-Tag: openssl-3.0.0-alpha7~121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a288609b12488b5e2dbca28ea54c3dd2c0de15b;p=thirdparty%2Fopenssl.git 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. Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/12920) --- diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index b26dfb6be32..afb9966bfa9 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -34,14 +34,6 @@ #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()))