Skip to content

Commit

Permalink
ec.h: Explain use of strstr() for EVP_EC_gen() and add #include <stri…
Browse files Browse the repository at this point in the history
…ng.h>

Fixes openssl#17362

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#17380)
  • Loading branch information
DDvO committed Jan 3, 2022
1 parent 352a0bc commit 1d8f18d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/openssl/ec.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# include <openssl/opensslconf.h>
# include <openssl/types.h>

# include <string.h>

# ifdef __cplusplus
extern "C" {
# endif
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 1d8f18d

Please sign in to comment.