]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix compilation for version < 1.1.0 without CONFIG_ECC
authorWolfgang Steinwender <wsteinwender@pcs.com>
Wed, 7 Apr 2021 14:06:01 +0000 (16:06 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 10 Apr 2021 09:48:08 +0000 (12:48 +0300)
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>
src/crypto/crypto_openssl.c

index 72f93c19255ad299af2ffee0cb860477a1bfaa07..a4b1083bb4c18eebbaa2f0fa89288a42ffe0a548 100644 (file)
@@ -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 */