summaryrefslogtreecommitdiffstats
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2014-11-18 12:56:26 +0000
committerMatt Caswell <matt@openssl.org>2014-11-27 21:53:02 +0000
commit244d0955adc027c0f41a3251e55d145bf940f9ce (patch)
tree63651fb25221470b925809bc66b1faa6881bc8b4 /ssl/s3_pkt.c
parent061e68c554a29ea30152d1c34e96abeca2f9652c (diff)
Add checks to the return value of EVP_Cipher to prevent silent encryption failure.
PR#1767 Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 4c9285f355..d1cd752209 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -856,8 +856,7 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
wr->length += eivlen;
}
- /* ssl3_enc can only have an error on read */
- s->method->ssl3_enc->enc(s,1);
+ if(s->method->ssl3_enc->enc(s,1)<1) goto err;
/* record length after mac and block padding */
s2n(wr->length,plen);