summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.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_enc.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_enc.c')
-rw-r--r--ssl/s3_enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 73f3e1730c..b55d0da6e8 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -556,7 +556,8 @@ int ssl3_enc(SSL *s, int send)
/* otherwise, rec->length >= bs */
}
- EVP_Cipher(ds,rec->data,rec->input,l);
+ if(EVP_Cipher(ds,rec->data,rec->input,l) < 1)
+ return -1;
if (EVP_MD_CTX_md(s->read_hash) != NULL)
mac_size = EVP_MD_CTX_size(s->read_hash);