|
|
|
OpenSSL: openssl/crypto/evp/ evp_enc.c
|
Previous Topic
Next Topic
|
| Message |
Author |
Posted: Wed Jul 28, 2010 12:08 pm Subject: OpenSSL: openssl/crypto/evp/ evp_enc.c |
|
|
Dr. Stephen Henson
|
|
OpenSSL CVS Repository
http://cvs.openssl.org/
____________________________________________________________________________
Server: cvs.openssl.org Name: Dr. Stephen Henson
Root: /v/openssl/cvs Email: steve@openssl.org
Module: openssl Date: 28-Jul-2010 18:53:28
Branch: HEAD Handle: 2010072817532800
Modified files:
openssl/crypto/evp evp_enc.c
Log:
Fix ctr mode properly this time....
Summary:
Revision Changes Path
1.52 +6 -3 openssl/crypto/evp/evp_enc.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openssl/crypto/evp/evp_enc.c
============================================================================
$ cvs diff -u -r1.51 -r1.52 evp_enc.c
--- openssl/crypto/evp/evp_enc.c 28 Jul 2010 11:03:09 -0000 1.51
+++ openssl/crypto/evp/evp_enc.c 28 Jul 2010 16:53:28 -0000 1.52
@@ -206,14 +206,17 @@
ctx->num = 0;
case EVP_CIPH_CBC_MODE:
- case EVP_CIPH_CTR_MODE:
OPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <=
(int)sizeof(ctx->iv));
if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx));
+ memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
+ break;
+
+ case EVP_CIPH_CTR_MODE:
/* Don't reuse IV for CTR mode */
- if (EVP_CIPHER_CTX_mode(ctx) != EVP_CIPH_CTR_MODE)
- memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
+ if(iv)
+ memcpy(ctx->iv, iv, EVP_CIPHER_CTX_iv_length(ctx));
break;
default:
@@ . |
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|