diff options
author | Andy Polyakov <appro@openssl.org> | 2014-02-27 17:47:23 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-02-27 17:47:23 +0100 |
commit | fd2c85f6ae0367eee6ead14f6c8acf0353156ec2 (patch) | |
tree | 00da51e2c1feda1fb6783091e168bd3f470c8cb6 /crypto/evp | |
parent | 41977c2e04d541ae51d366c7db86c25946f3df15 (diff) |
evp/e_aes.c: harmonize with 1.0.1.
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/e_aes.c | 11 |
1 files changed, 4 insertions, 7 deletions
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 <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; @@ -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 || 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)) @@ -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; |