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:39:47 +0000
commitfe78f08d1541211566a5656395186bfbdc61b6f8 (patch)
treeaba6eb9f747e25ecbbe344de92db8ffaf4b53d0e /ssl/s3_enc.c
parentfc3968a25ce0c16cab8730ec0d68a59856158029 (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_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 6b7132380d..63774bcc87 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);