Usages of KDFs converted to use the name macros
authorPauli <paul.dale@oracle.com>
Mon, 9 Sep 2019 01:42:22 +0000 (11:42 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 11 Sep 2019 00:22:49 +0000 (10:22 +1000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9814)

crypto/dh/dh_kdf.c
crypto/ec/ecdh_kdf.c
crypto/evp/p5_crpt2.c
crypto/evp/pbe_scrypt.c

index 781d34a94ffab7e22c34c4d9ba1e746345525a17..a1bbea30130a3c1b03f9d7f56b9cce35a7013bee 100644 (file)
@@ -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,
index 55e676d20a437bd097c1d646516cef910fbc0043..a19080940a053fe995e6c993299513f583d2e9cb 100644 (file)
@@ -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,
index c12d35c8ab84b851864313ade31800cb83ca744a..96a72730f31de23792dca3110b33bc275ceddc4a 100644 (file)
@@ -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)
index 7a9f6f47a4374ae2a2aa66f3b151e2809daf2e1f..62b9687949903f9b430f9c28569502d400ef121f 100644 (file)
@@ -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)