summaryrefslogtreecommitdiffstats
path: root/apps/pkeyutl.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-08-03 00:45:49 +0100
committerDr. Stephen Henson <steve@openssl.org>2017-08-03 02:18:44 +0100
commitb15d5ab617e3caed0489588a33eb804824b2f7d6 (patch)
tree5eebc9a79d46bacef0a7cd3594007791be3f37b2 /apps/pkeyutl.c
parent3f4af53c22ba02cb197a79cd791637ef1b9c3520 (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/pkeyutl.c')
-rw-r--r--apps/pkeyutl.c8
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)