]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/ec/ecdh_kdf.c
Params: change UTF8 construct calls to avoid explicit strlen(3) calls.
[thirdparty/openssl.git] / crypto / ec / ecdh_kdf.c
index 000b12a515a21eae0ed5f0eb9a368476d6434811..80675ccf962cd3888e4b369db749b12d514befda 100644 (file)
@@ -7,6 +7,12 @@
  * https://www.openssl.org/source/license.html
  */
 
+/*
+ * ECDH low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
 #include <string.h>
 #include <openssl/core_names.h>
 #include <openssl/ec.h>
@@ -28,8 +34,7 @@ int ecdh_KDF_X9_63(unsigned char *out, size_t outlen,
 
     if ((kctx = EVP_KDF_CTX_new(kdf)) != NULL) {
         *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
-                                                (char *)mdname,
-                                                strlen(mdname) + 1);
+                                                (char *)mdname, 0);
         *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY,
                                                  (void *)Z, Zlen);
         *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO,