only call FIPS_cipherinit in FIPS mode
This commit is contained in:
parent
9f339d75b5
commit
143619ccf6
@ -170,6 +170,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OPENSSL_FIPS
|
#ifdef OPENSSL_FIPS
|
||||||
|
if (FIPS_mode())
|
||||||
return FIPS_cipherinit(ctx, cipher, key, iv, enc);
|
return FIPS_cipherinit(ctx, cipher, key, iv, enc);
|
||||||
#else
|
#else
|
||||||
ctx->cipher=cipher;
|
ctx->cipher=cipher;
|
||||||
@ -207,6 +208,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
|
|||||||
skip_to_init:
|
skip_to_init:
|
||||||
#endif
|
#endif
|
||||||
#ifdef OPENSSL_FIPS
|
#ifdef OPENSSL_FIPS
|
||||||
|
if (FIPS_mode())
|
||||||
return FIPS_cipherinit(ctx, cipher, key, iv, enc);
|
return FIPS_cipherinit(ctx, cipher, key, iv, enc);
|
||||||
#else
|
#else
|
||||||
/* we assume block size is a power of 2 in *cryptUpdate */
|
/* we assume block size is a power of 2 in *cryptUpdate */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user