]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ec.h: Explain use of strstr() for EVP_EC_gen() and add #include <string.h>
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Thu, 30 Dec 2021 08:30:18 +0000 (09:30 +0100)
committerDr. David von Oheimb <dev@ddvo.net>
Mon, 3 Jan 2022 11:43:19 +0000 (12:43 +0100)
Fixes #17362

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17380)

include/openssl/ec.h

index f59b4f9288521616988067c9f7061478075a00c0..4e65d84c451c11b7a8a613b4ab6353848b9c6fce 100644 (file)
@@ -20,6 +20,8 @@
 # include <openssl/opensslconf.h>
 # include <openssl/types.h>
 
+# include <string.h>
+
 # ifdef  __cplusplus
 extern "C" {
 # endif
@@ -1548,6 +1550,7 @@ OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_verify
 
 #  define EVP_EC_gen(curve) \
     EVP_PKEY_Q_keygen(NULL, NULL, "EC", (char *)(strstr(curve, "")))
+    /* strstr is used to enable type checking for the variadic string arg */
 #  define ECParameters_dup(x) ASN1_dup_of(EC_KEY, i2d_ECParameters, \
                                           d2i_ECParameters, x)