diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2017-08-03 00:45:49 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2017-08-03 02:18:44 +0100 |
commit | b15d5ab617e3caed0489588a33eb804824b2f7d6 (patch) | |
tree | 5eebc9a79d46bacef0a7cd3594007791be3f37b2 /apps | |
parent | 3f4af53c22ba02cb197a79cd791637ef1b9c3520 (diff) |
Allow use of long name for KDFs
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/4079)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pkeyutl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/pkeyutl.c b/apps/pkeyutl.c index 990375b6ae..07646c8639 100644 --- a/apps/pkeyutl.c +++ b/apps/pkeyutl.c @@ -389,8 +389,12 @@ static EVP_PKEY_CTX *init_ctx(const char *kdfalg, int *pkeysize, if (kdfalg != NULL) { int kdfnid = OBJ_sn2nid(kdfalg); - if (kdfnid == NID_undef) - goto end; + + if (kdfnid == NID_undef) { + kdfnid = OBJ_ln2nid(kdfalg); + if (kdfnid == NID_undef) + goto end; + } ctx = EVP_PKEY_CTX_new_id(kdfnid, impl); } else { if (pkey == NULL) |