From: Jouni Malinen Date: Thu, 23 Nov 2017 18:28:57 +0000 (+0200) Subject: DPP: Work around missing EVP_PKEY_CTX_set_ec_param_enc() X-Git-Tag: hostap_2_7~788 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=918a2ac40f390c3363e7a59f29c048a5ebc875f5;p=thirdparty%2Fhostap.git DPP: Work around missing EVP_PKEY_CTX_set_ec_param_enc() This allows compilation with older OpenSSL 1.0.1. Signed-off-by: Jouni Malinen --- diff --git a/src/common/dpp.c b/src/common/dpp.c index 987c35e66..07fa9a3dc 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -1054,7 +1054,9 @@ static EVP_PKEY * dpp_gen_keypair(const struct dpp_curve_params *curve) if (!pctx || EVP_PKEY_paramgen_init(pctx) != 1 || EVP_PKEY_CTX_set_ec_paramgen_curve_nid(pctx, nid) != 1 || +#ifdef EVP_PKEY_CTX_set_ec_param_enc EVP_PKEY_CTX_set_ec_param_enc(pctx, OPENSSL_EC_NAMED_CURVE) != 1 || +#endif EVP_PKEY_paramgen(pctx, ¶ms) != 1) { wpa_printf(MSG_ERROR, "DPP: Failed to generate EVP_PKEY parameters");