|
@@ -73,21 +73,14 @@ static BIGNUM * get_group5_prime(void)
|
|
|
#define NO_SHA256_WRAPPER
|
|
|
#endif
|
|
|
|
|
|
-static int openssl_digest_vector(const EVP_MD *type, int non_fips,
|
|
|
- size_t num_elem, const u8 *addr[],
|
|
|
- const size_t *len, u8 *mac)
|
|
|
+static int openssl_digest_vector(const EVP_MD *type, size_t num_elem,
|
|
|
+ const u8 *addr[], const size_t *len, u8 *mac)
|
|
|
{
|
|
|
EVP_MD_CTX ctx;
|
|
|
size_t i;
|
|
|
unsigned int mac_len;
|
|
|
|
|
|
EVP_MD_CTX_init(&ctx);
|
|
|
-#ifdef CONFIG_FIPS
|
|
|
-#ifdef OPENSSL_FIPS
|
|
|
- if (non_fips)
|
|
|
- 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)) {
|
|
|
wpa_printf(MSG_ERROR, "OpenSSL: EVP_DigestInit_ex failed: %s",
|
|
|
ERR_error_string(ERR_get_error(), NULL));
|
|
@@ -113,7 +106,7 @@ static int openssl_digest_vector(const EVP_MD *type, int non_fips,
|
|
|
|
|
|
int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
|
|
{
|
|
|
- return openssl_digest_vector(EVP_md4(), 0, num_elem, addr, len, mac);
|
|
|
+ return openssl_digest_vector(EVP_md4(), num_elem, addr, len, mac);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -177,22 +170,13 @@ out:
|
|
|
|
|
|
int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
|
|
{
|
|
|
- return openssl_digest_vector(EVP_md5(), 0, num_elem, addr, len, mac);
|
|
|
+ return openssl_digest_vector(EVP_md5(), num_elem, addr, len, mac);
|
|
|
}
|
|
|
|
|
|
|
|
|
-#ifdef CONFIG_FIPS
|
|
|
-int md5_vector_non_fips_allow(size_t num_elem, const u8 *addr[],
|
|
|
- const size_t *len, u8 *mac)
|
|
|
-{
|
|
|
- return openssl_digest_vector(EVP_md5(), 1, num_elem, addr, len, mac);
|
|
|
-}
|
|
|
-#endif /* CONFIG_FIPS */
|
|
|
-
|
|
|
-
|
|
|
int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
|
|
{
|
|
|
- return openssl_digest_vector(EVP_sha1(), 0, num_elem, addr, len, mac);
|
|
|
+ return openssl_digest_vector(EVP_sha1(), num_elem, addr, len, mac);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -200,8 +184,7 @@ int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
|
|
int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len,
|
|
|
u8 *mac)
|
|
|
{
|
|
|
- return openssl_digest_vector(EVP_sha256(), 0, num_elem, addr, len,
|
|
|
- mac);
|
|
|
+ return openssl_digest_vector(EVP_sha256(), num_elem, addr, len, mac);
|
|
|
}
|
|
|
#endif /* NO_SHA256_WRAPPER */
|
|
|
|