Commit 068fc255 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

only call FIPS_cipherinit in FIPS mode

parent cc8f2fb9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
#endif

#ifdef OPENSSL_FIPS
		if (FIPS_mode())
			return FIPS_cipherinit(ctx, cipher, key, iv, enc);
#else
		ctx->cipher=cipher;
@@ -207,6 +208,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
skip_to_init:
#endif
#ifdef OPENSSL_FIPS
	if (FIPS_mode())
		return FIPS_cipherinit(ctx, cipher, key, iv, enc);
#else
	/* we assume block size is a power of 2 in *cryptUpdate */