diff options
author | Andy Polyakov <appro@openssl.org> | 2012-04-15 14:23:03 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-04-15 14:23:03 +0000 |
commit | 371056f2b92dcb8c98940e2703a30429bdbaa5e2 (patch) | |
tree | 601d3b3a20e43fafa82d01c8537821b32c9ff49d /ssl/s3_pkt.c | |
parent | 2d613908e863e32e06a00a95accda3a5fe1960f3 (diff) |
e_aes_cbc_hmac_sha1.c: handle zero-length payload and engage empty frag
countermeasure [from HEAD].
PR: 2778
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r-- | ssl/s3_pkt.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 3c56a86933..a0169dcc06 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); |