mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 23:14:37 +08:00
Usages of KDFs converted to use the name macros
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9814)
This commit is contained in:
parent
69333af49d
commit
64115f05ac
@ -39,7 +39,7 @@ int DH_KDF_X9_42(unsigned char *out, size_t outlen,
|
||||
if (oid_sn == NULL)
|
||||
return 0;
|
||||
|
||||
kdf = EVP_KDF_fetch(provctx, SN_x942kdf, NULL);
|
||||
kdf = EVP_KDF_fetch(provctx, OSSL_KDF_NAME_X942KDF, NULL);
|
||||
if ((kctx = EVP_KDF_CTX_new(kdf)) == NULL)
|
||||
goto err;
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
|
@ -24,7 +24,7 @@ int ecdh_KDF_X9_63(unsigned char *out, size_t outlen,
|
||||
EVP_KDF_CTX *kctx = NULL;
|
||||
OSSL_PARAM params[4], *p = params;
|
||||
const char *mdname = EVP_MD_name(md);
|
||||
EVP_KDF *kdf = EVP_KDF_fetch(NULL, SN_x963kdf, NULL);
|
||||
EVP_KDF *kdf = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_X963KDF, NULL);
|
||||
|
||||
if ((kctx = EVP_KDF_CTX_new(kdf)) != NULL) {
|
||||
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
|
||||
|
@ -40,7 +40,7 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
|
||||
if (salt == NULL && saltlen == 0)
|
||||
salt = (unsigned char *)empty;
|
||||
|
||||
kdf = EVP_KDF_fetch(NULL, LN_id_pbkdf2, NULL);
|
||||
kdf = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_PBKDF2, NULL);
|
||||
kctx = EVP_KDF_CTX_new(kdf);
|
||||
EVP_KDF_free(kdf);
|
||||
if (kctx == NULL)
|
||||
|
@ -62,7 +62,7 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen,
|
||||
if (maxmem == 0)
|
||||
maxmem = SCRYPT_MAX_MEM;
|
||||
|
||||
kdf = EVP_KDF_fetch(NULL, SN_id_scrypt, NULL);
|
||||
kdf = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_SCRYPT, NULL);
|
||||
kctx = EVP_KDF_CTX_new(kdf);
|
||||
EVP_KDF_free(kdf);
|
||||
if (kctx == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user