OpenSSL: Fix compilation for version < 1.1.0 without CONFIG_ECC
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>
This commit is contained in:
parent
d675d3b15b
commit
f91680c15f
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
static EC_KEY * EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey)
|
||||||
{
|
{
|
||||||
if (pkey->type != EVP_PKEY_EC)
|
if (pkey->type != EVP_PKEY_EC)
|
||||||
return NULL;
|
return NULL;
|
||||||
return pkey->pkey.ec;
|
return pkey->pkey.ec;
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_ECC */
|
||||||
|
|
||||||
#endif /* OpenSSL version < 1.1.0 */
|
#endif /* OpenSSL version < 1.1.0 */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue