diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2019-04-22 09:18:56 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-05-03 17:52:50 +0200 |
commit | d2ba812343a62b1f86a15ae09bdeafec6d82f43a (patch) | |
tree | e37b3953dae069a3ea00ebdd321f68a29761d627 /test/evp_test.c | |
parent | Add documentation for running unit tests under Valgrind (diff) | |
download | openssl-d2ba812343a62b1f86a15ae09bdeafec6d82f43a.tar.xz openssl-d2ba812343a62b1f86a15ae09bdeafec6d82f43a.zip |
Added EVP_KDF (similiar to the EVP_MAC)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8808)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r-- | test/evp_test.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/evp_test.c b/test/evp_test.c index 0563986a82..1836ddb103 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -1938,7 +1938,7 @@ 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); + const EVP_KDF *kdf; #ifdef OPENSSL_NO_SCRYPT if (strcmp(name, "scrypt") == 0) { @@ -1947,12 +1947,13 @@ static int kdf_test_init(EVP_TEST *t, const char *name) } #endif - if (kdf_nid == NID_undef) - kdf_nid = OBJ_ln2nid(name); + kdf = EVP_get_kdfbyname(name); + if (kdf == NULL) + return 0; if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata)))) return 0; - kdata->ctx = EVP_KDF_CTX_new_id(kdf_nid); + kdata->ctx = EVP_KDF_CTX_new(kdf); if (kdata->ctx == NULL) { OPENSSL_free(kdata); return 0; |