]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Silence compiler warning with no-CONFIG_DPP2 and OpenSSL 1.0.2
authorJouni Malinen <j@w1.fi>
Sun, 19 Apr 2020 13:58:59 +0000 (16:58 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 19 Apr 2020 14:42:41 +0000 (17:42 +0300)
EVP_PKEY_get0_EC_KEY() compatibility wrapper is used only within
CONFIG_DPP2 blocks, so define it with matching condition.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/dpp.c

index c4ee9b8abe084aa2f1381d830a34eff96357857a..080c86aab64a40c06274b184de94b1526b7a820b 100644 (file)
@@ -74,12 +74,14 @@ static void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr,
 }
 
 
+#ifdef CONFIG_DPP2
 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_DPP2 */
 
 #endif