#include <assert.h>
#include <openssl/aes.h>
#include "evp_locl.h"
+#ifndef OPENSSL_FIPS
#include "modes_lcl.h"
#include <openssl/rand.h>
-#ifndef OPENSSL_FIPSCANISTER
-#undef EVP_CIPH_FLAG_FIPS
-#define EVP_CIPH_FLAG_FIPS 0
-#endif
-
typedef struct
{
union { double align; AES_KEY ks; } ks;
case EVP_CTRL_GCM_SET_IVLEN:
if (arg <= 0)
return 0;
-#ifdef OPENSSL_FIPSCANISTER
+#ifdef OPENSSL_FIPS
if (FIPS_module_mode() && !(c->flags & EVP_CIPH_FLAG_NON_FIPS_ALLOW)
&& arg < 12)
return 0;
return 0;
if (!out || !in || len<AES_BLOCK_SIZE)
return 0;
-#ifdef OPENSSL_FIPSCANISTER
+#ifdef OPENSSL_FIPS
/* Requirement of SP800-38E */
if (FIPS_module_mode() && !(ctx->flags & EVP_CIPH_FLAG_NON_FIPS_ALLOW) &&
(len > (1UL<<20)*16))
BLOCK_CIPHER_custom(NID_aes,192,1,12,ccm,CCM,EVP_CIPH_FLAG_FIPS|CUSTOM_FLAGS)
BLOCK_CIPHER_custom(NID_aes,256,1,12,ccm,CCM,EVP_CIPH_FLAG_FIPS|CUSTOM_FLAGS)
+#endif
typedef struct
{
union { double align; AES_KEY ks; } ks;