components/openssl/openssl-1.0.1-fips-140/patches/32_aes_cbc_len_check.patch
changeset 4002 95b8f35fcdd5
parent 1606 3c7c8020eda1
--- a/components/openssl/openssl-1.0.1-fips-140/patches/32_aes_cbc_len_check.patch	Thu Mar 19 14:41:20 2015 -0700
+++ b/components/openssl/openssl-1.0.1-fips-140/patches/32_aes_cbc_len_check.patch	Fri Mar 20 15:31:27 2015 -0700
@@ -1,14 +1,18 @@
+#
+# This was developed in house and reported to the upstream.
+#
 --- openssl-1.0.1e/crypto/evp/e_aes.c        Tue Jul  2 11:03:12 2013
 +++ openssl-1.0.1e/crypto/evp/e_aes.c.new    Tue Jul  2 11:04:56 2013
-@@ -574,8 +574,11 @@
- static int aes_cbc_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out,
- 	const unsigned char *in, size_t len)
+@@ -536,8 +536,12 @@
+ static int aes_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+                           const unsigned char *in, size_t len)
  {
-+	size_t	bl = ctx->cipher->block_size;
- 	EVP_AES_KEY *dat = (EVP_AES_KEY *)ctx->cipher_data;
++    size_t	bl = ctx->cipher->block_size;
+     EVP_AES_KEY *dat = (EVP_AES_KEY *) ctx->cipher_data;
  
-+	if (len<bl)	return 1;
++    if (len < bl)
++        return 1;
 +
- 	if (dat->stream.cbc)
- 		(*dat->stream.cbc)(in,out,len,&dat->ks,ctx->iv,ctx->encrypt);
- 	else if (ctx->encrypt)
+     if (dat->stream.cbc)
+         (*dat->stream.cbc) (in, out, len, &dat->ks, ctx->iv, ctx->encrypt);
+     else if (ctx->encrypt)