Convert SSL functions to use KDF names not SN_ strings
authorPauli <paul.dale@oracle.com>
Mon, 9 Sep 2019 01:36:48 +0000 (11:36 +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)

ssl/t1_enc.c
ssl/tls13_enc.c

index 6726d8fb7d3caacc2d0bbbe332c046f056776d25..fc082530dbad5b96913cdf0bbb42be39ba0be0d0 100644 (file)
@@ -46,7 +46,7 @@ static int tls1_PRF(SSL *s,
             SSLerr(SSL_F_TLS1_PRF, ERR_R_INTERNAL_ERROR);
         return 0;
     }
-    kdf = EVP_KDF_fetch(NULL, SN_tls1_prf, NULL);
+    kdf = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_TLS1_PRF, NULL);
     if (kdf == NULL)
         goto err;
     kctx = EVP_KDF_CTX_new(kdf);
index f7c472d1fb3dabdd2589b03fa3f06a9dbb80471e..2339a05aadc2fffda91f5155ab4f2575dd5cf828 100644 (file)
@@ -36,7 +36,7 @@ int tls13_hkdf_expand(SSL *s, const EVP_MD *md, const unsigned char *secret,
 #else
     static const unsigned char label_prefix[] = "tls13 ";
 #endif
-    EVP_KDF *kdf = EVP_KDF_fetch(NULL, SN_hkdf, NULL);
+    EVP_KDF *kdf = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_HKDF, NULL);
     EVP_KDF_CTX *kctx;
     OSSL_PARAM params[5], *p = params;
     int mode = EVP_PKEY_HKDEF_MODE_EXPAND_ONLY;
@@ -194,7 +194,7 @@ int tls13_generate_secret(SSL *s, const EVP_MD *md,
 #endif
     unsigned char preextractsec[EVP_MAX_MD_SIZE];
 
-    kdf = EVP_KDF_fetch(NULL, SN_hkdf, NULL);
+    kdf = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_HKDF, NULL);
     kctx = EVP_KDF_CTX_new(kdf);
     EVP_KDF_free(kdf);
     if (kctx == NULL) {