From: Andy Polyakov Date: Thu, 27 Feb 2014 16:47:23 +0000 (+0100) Subject: evp/e_aes.c: harmonize with 1.0.1. X-Git-Tag: OpenSSL_1_0_2-beta2~301 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd2c85f6ae0367eee6ead14f6c8acf0353156ec2;p=openssl evp/e_aes.c: harmonize with 1.0.1. --- diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index 77e4bead71..46c5757af3 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -56,14 +56,10 @@ #include #include #include "evp_locl.h" +#ifndef OPENSSL_FIPS #include "modes_lcl.h" #include -#ifndef OPENSSL_FIPSCANISTER -#undef EVP_CIPH_FLAG_FIPS -#define EVP_CIPH_FLAG_FIPS 0 -#endif - typedef struct { union { double align; AES_KEY ks; } ks; @@ -1140,7 +1136,7 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) 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; @@ -1707,7 +1703,7 @@ static int aes_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, return 0; if (!out || !in || lenflags & EVP_CIPH_FLAG_NON_FIPS_ALLOW) && (len > (1UL<<20)*16)) @@ -1891,6 +1887,7 @@ BLOCK_CIPHER_custom(NID_aes,128,1,12,ccm,CCM,EVP_CIPH_FLAG_FIPS|CUSTOM_FLAGS) 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;