aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Steinwender <wsteinwender@pcs.com>2021-04-07 14:06:01 (GMT)
committerJouni Malinen <j@w1.fi>2021-04-10 09:48:08 (GMT)
commitf91680c15f80f0b617a0d2c369c8c1bb3dcf078b (patch)
treed0d65b0715ccbf1e55eac47759d9d961c6619d19
parentd675d3b15b407b18e26eb1ed54d3cbe22d473876 (diff)
downloadhostap-master.zip
hostap-master.tar.gz
hostap-master.tar.bz2
OpenSSL: Fix compilation for version < 1.1.0 without CONFIG_ECCHEADpendingmaster
When CONFIG_ECC is not defined, openssl/ec.h is not included and EC_KEY not known. Fix be not defining EVP_PKEY_get0_EC_KEY() when CONFIG_ECC is not defined. Signed-off-by: Wolfgang Steinwender <wsteinwender@pcs.com>
-rw-r--r--src/crypto/crypto_openssl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c
index 72f93c1..a4b1083 100644
--- a/src/crypto/crypto_openssl.c
+++ b/src/crypto/crypto_openssl.c
@@ -81,12 +81,14 @@ static void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
}
+#ifdef CONFIG_ECC
static EC_KEY * EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey)
{
if (pkey->type != EVP_PKEY_EC)
return NULL;
return pkey->pkey.ec;
}
+#endif /* CONFIG_ECC */
#endif /* OpenSSL version < 1.1.0 */