From: Dr. David von Oheimb Date: Thu, 30 Dec 2021 08:30:18 +0000 (+0100) Subject: ec.h: Explain use of strstr() for EVP_EC_gen() and add #include X-Git-Tag: openssl-3.2.0-alpha1~3151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d8f18dce1c8ba99693dfaeb1696d625d9f4b7e0;p=thirdparty%2Fopenssl.git ec.h: Explain use of strstr() for EVP_EC_gen() and add #include Fixes #17362 Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17380) --- diff --git a/include/openssl/ec.h b/include/openssl/ec.h index f59b4f92885..4e65d84c451 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -20,6 +20,8 @@ # include # include +# include + # 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)