aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-03-29 15:56:48 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-29 18:15:16 (GMT)
commit80914e9eb2e451d5b75f786e934b4c078944b5a2 (patch)
treee48de6c4253bbfe2bbb24565649a1cb063b3b28b /src/common
parent478bc00b5f7ae0b90eb070fe865f1e59c4faf360 (diff)
downloadhostap-80914e9eb2e451d5b75f786e934b4c078944b5a2.zip
hostap-80914e9eb2e451d5b75f786e934b4c078944b5a2.tar.gz
hostap-80914e9eb2e451d5b75f786e934b4c078944b5a2.tar.bz2
DPP2: Fix build with OpenSSL 1.0.2 (EVP_PKEY_get0_EC_KEY() wrapper)
EVP_PKEY_get0_EC_KEY() was added in OpenSSL 1.1.0, so add a compatibility wrapper for it when building with OpenSSL 1.0.2. Fixes: c025c2eb5911 ("DPP: DPPEnvelopedData generation for Configurator backup") Fixes: 7d9e3200544c ("DPP: Received Configurator backup processing") Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dpp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/dpp.c b/src/common/dpp.c
index f0636b4..784961d 100644
--- a/src/common/dpp.c
+++ b/src/common/dpp.c
@@ -73,6 +73,14 @@ static void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr,
*ps = sig->s;
}
+
+static EC_KEY * EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey)
+{
+ if (pkey->type != EVP_PKEY_EC)
+ return NULL;
+ return pkey->pkey.ec;
+}
+
#endif