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 /test/evp_test.c | |
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 'test/evp_test.c')
-rw-r--r-- | test/evp_test.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/evp_test.c b/test/evp_test.c index 6fcf3c6077..8fd082f30c 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -1623,10 +1623,14 @@ typedef struct kdf_data_st { static int kdf_test_init(EVP_TEST *t, const char *name) { KDF_DATA *kdata; + int kdf_nid = OBJ_sn2nid(name); + + if (kdf_nid == NID_undef) + kdf_nid = OBJ_ln2nid(name); if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata)))) return 0; - kdata->ctx = EVP_PKEY_CTX_new_id(OBJ_sn2nid(name), NULL); + kdata->ctx = EVP_PKEY_CTX_new_id(kdf_nid, NULL); if (kdata->ctx == NULL) { OPENSSL_free(kdata); return 0; |