summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorJack Lloyd <jack.lloyd@ribose.com>2018-06-18 15:51:56 -0400
committerMatt Caswell <matt@openssl.org>2018-06-19 11:29:44 +0100
commitddb634fe6f9aeea34fe036cf804903b4240d38ac (patch)
tree60501110c68634a55fdc888fcb5598e8ba9c4887 /test/evp_test.c
parent2f2e6b6278bc4cbf670e42ae9f4ff818529df37c (diff)
Move SM2 algos to SM2 specific PKEY method
Use EVP_PKEY_set_alias_type to access Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6443)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index e2274d9632..97239f2260 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2530,6 +2530,11 @@ top:
if (!TEST_ptr(key = OPENSSL_malloc(sizeof(*key))))
return 0;
key->name = take_value(pp);
+
+ /* Hack to detect SM2 keys */
+ if(strstr(key->name, "SM2"))
+ EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2);
+
key->key = pkey;
key->next = *klist;
*klist = key;