diff options
author | Richard Levitte <levitte@openssl.org> | 2020-03-10 23:08:59 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-03-15 19:42:05 +0100 |
commit | 2292c8e17f0b870b48bb7a5f8ed8c37dfb36580f (patch) | |
tree | a1cc84c4ddd4f8eb4850c75f46b815ac0d7e81e7 /apps/pkeyutl.c | |
parent | aba9bca31cc2507671e25f7ca8e642fce5e38671 (diff) |
APPS: Remove all traces of special SM2 treatment.
SM2 IDs are now passed entirely as '-pkeyopt', '-sigopt' or '-vfyopt'
values, just like any other valid option.
Fixes #11293
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
(Merged from https://github.com/openssl/openssl/pull/11302)
Diffstat (limited to 'apps/pkeyutl.c')
-rw-r--r-- | apps/pkeyutl.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/apps/pkeyutl.c b/apps/pkeyutl.c index 7f11b168f5..7dc558b13a 100644 --- a/apps/pkeyutl.c +++ b/apps/pkeyutl.c @@ -550,22 +550,6 @@ static EVP_PKEY_CTX *init_ctx(const char *kdfalg, int *pkeysize, if (pkey == NULL) goto end; -#ifndef OPENSSL_NO_EC - /* SM2 needs a special treatment */ - if (EVP_PKEY_id(pkey) == EVP_PKEY_EC) { - EC_KEY *eckey = NULL; - const EC_GROUP *group = NULL; - int nid; - - if ((eckey = EVP_PKEY_get0_EC_KEY(pkey)) == NULL - || (group = EC_KEY_get0_group(eckey)) == NULL - || (nid = EC_GROUP_get_curve_name(group)) == 0) - goto end; - if (nid == NID_sm2 - && !EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2)) - goto end; - } -#endif *pkeysize = EVP_PKEY_size(pkey); ctx = EVP_PKEY_CTX_new(pkey, impl); if (ppkey != NULL) |