summaryrefslogtreecommitdiff
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2012-04-15 14:14:22 +0000
committerAndy Polyakov <appro@openssl.org>2012-04-15 14:14:22 +0000
commitfc90e42c8623af13308d8ef7e7ada84af0a36509 (patch)
tree4a1e5965220812bd88b366e661908d91305caa8e /ssl/s3_pkt.c
parent26e6bac143f83a0d126a1deaae72f5c5d2413b84 (diff)
downloadopenssl-new-fc90e42c8623af13308d8ef7e7ada84af0a36509.tar.gz
e_aes_cbc_hmac_sha1.c: handle zero-length payload and engage empty frag
countermeasure. PR: 2778
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index b2d9b1683b..ca5412dc2a 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -664,10 +664,14 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
if ( (sess == NULL) ||
(s->enc_write_ctx == NULL) ||
(EVP_MD_CTX_md(s->write_hash) == NULL))
+ {
+#if 1
+ clear=s->enc_write_ctx?0:1; /* must be AEAD cipher */
+#else
clear=1;
-
- if (clear)
+#endif
mac_size=0;
+ }
else
{
mac_size=EVP_MD_CTX_size(s->write_hash);