]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Work around missing EVP_PKEY_CTX_set_ec_param_enc()
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 23 Nov 2017 18:28:57 +0000 (20:28 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 23 Nov 2017 18:31:12 +0000 (20:31 +0200)
This allows compilation with older OpenSSL 1.0.1.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/common/dpp.c

index 987c35e66e8cacb78592fcfcfc69f70e257c1308..07fa9a3dc559f4b4b3ab1b0e5f01a31e24f7e53d 100644 (file)
@@ -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, &params) != 1) {
                wpa_printf(MSG_ERROR,
                           "DPP: Failed to generate EVP_PKEY parameters");