mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 16:58:41 -05:00
Fix build with non-FIPS capable OpenSSL
This commit is contained in:
parent
c5f6ad5766
commit
1d5ed36e7c
@ -40,8 +40,12 @@ int openssl_digest_vector(const EVP_MD *type, int non_fips, size_t num_elem,
|
|||||||
unsigned int mac_len;
|
unsigned int mac_len;
|
||||||
|
|
||||||
EVP_MD_CTX_init(&ctx);
|
EVP_MD_CTX_init(&ctx);
|
||||||
|
#ifdef CONFIG_FIPS
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
if (non_fips)
|
if (non_fips)
|
||||||
EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
|
EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
|
||||||
|
#endif /* OPENSSL_FIPS */
|
||||||
|
#endif /* CONFIG_FIPS */
|
||||||
if (!EVP_DigestInit_ex(&ctx, type, NULL)) {
|
if (!EVP_DigestInit_ex(&ctx, type, NULL)) {
|
||||||
wpa_printf(MSG_ERROR, "OpenSSL: EVP_DigestInit_ex failed: %s",
|
wpa_printf(MSG_ERROR, "OpenSSL: EVP_DigestInit_ex failed: %s",
|
||||||
ERR_error_string(ERR_get_error(), NULL));
|
ERR_error_string(ERR_get_error(), NULL));
|
||||||
|
Loading…
Reference in New Issue
Block a user