From 5c4d3df4f3f6baa6f665283d80025dbf7a799212 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Tue, 28 Jan 2020 12:06:57 +0100 Subject: [PATCH] Fix broken Windows FIPS build --- IDE/WIN/user_settings.h | 2 ++ src/ssl.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/IDE/WIN/user_settings.h b/IDE/WIN/user_settings.h index 406003ed1..d5fc044d4 100644 --- a/IDE/WIN/user_settings.h +++ b/IDE/WIN/user_settings.h @@ -22,6 +22,8 @@ #define NO_RABBIT #define NO_DSA #define NO_MD4 + + #define GCM_NONCE_MID_SZ 12 #else /* Enables blinding mode, to prevent timing attacks */ #define WC_RSA_BLINDING diff --git a/src/ssl.c b/src/ssl.c index f0aef5e57..5d356efdd 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -16632,6 +16632,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md) } } break; +#if !defined(_WIN32) && !defined(HAVE_FIPS) case EVP_CTRL_GCM_IV_GEN: if (ctx->cipher.aes.keylen == 0 || ctx->ivSz == 0) { ret = WOLFSSL_FAILURE; @@ -16645,6 +16646,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md) /* OpenSSL increments the IV. Not sure why */ IncCtr(ctx->iv, ctx->ivSz); break; +#endif case EVP_CTRL_AEAD_SET_TAG: if(arg <= 0 || arg > 16 || (ptr == NULL)) return WOLFSSL_FAILURE;