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:44:03 +0000
commitca88bd4112e53599c90488370a638c55fa4d33d6 (patch)
tree9208d765594f4b235998c438115631def2eb9495 /ssl/s3_pkt.c
parent1e7b4891cb373027eede00cdaa312899d2386272 (diff)
Add checks to the return value of EVP_Cipher to prevent silent encryption failure.
PR#1767 Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit fe78f08d1541211566a5656395186bfbdc61b6f8)
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 3103b54619..0804d556a1 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -1040,8 +1040,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);