aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/ssl/s3_enc.c
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2007-03-15 20:03:30 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2007-03-15 20:03:30 +0000
commit03b688114f278f603d0b73118f8ba646bb8d5fe8 (patch)
treee7e76085d46ef861077be893200a8581676b8160 /crypto/openssl/ssl/s3_enc.c
parent4beb77e6739e921e5369a93e135e71d7044990fb (diff)
parent5471f83ea72e251ea1f0d04428878a74347efa0f (diff)
downloadsrc-03b688114f278f603d0b73118f8ba646bb8d5fe8.tar.gz
src-03b688114f278f603d0b73118f8ba646bb8d5fe8.zip
This commit was generated by cvs2svn to compensate for changes in r167612,
which included commits to RCS files with non-trunk default branches.
Notes
Notes: svn path=/head/; revision=167613
Diffstat (limited to 'crypto/openssl/ssl/s3_enc.c')
-rw-r--r--crypto/openssl/ssl/s3_enc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/s3_enc.c b/crypto/openssl/ssl/s3_enc.c
index 561a9846e974..2859351b001f 100644
--- a/crypto/openssl/ssl/s3_enc.c
+++ b/crypto/openssl/ssl/s3_enc.c
@@ -221,6 +221,9 @@ int ssl3_change_cipher_state(SSL *s, int which)
reuse_dd = 1;
else if ((s->enc_read_ctx=OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)
goto err;
+ else
+ /* make sure it's intialized in case we exit later with an error */
+ EVP_CIPHER_CTX_init(s->enc_read_ctx);
dd= s->enc_read_ctx;
s->read_hash=m;
#ifndef OPENSSL_NO_COMP
@@ -254,6 +257,9 @@ int ssl3_change_cipher_state(SSL *s, int which)
reuse_dd = 1;
else if ((s->enc_write_ctx=OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)
goto err;
+ else
+ /* make sure it's intialized in case we exit later with an error */
+ EVP_CIPHER_CTX_init(s->enc_write_ctx);
dd= s->enc_write_ctx;
s->write_hash=m;
#ifndef OPENSSL_NO_COMP
@@ -279,7 +285,6 @@ int ssl3_change_cipher_state(SSL *s, int which)
if (reuse_dd)
EVP_CIPHER_CTX_cleanup(dd);
- EVP_CIPHER_CTX_init(dd);
p=s->s3->tmp.key_block;
i=EVP_MD_size(m);