Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-12-05 00:31:44 +0300
committerAdam Langley <agl@google.com>2014-12-05 20:30:13 +0300
commit129992360a0aca71536bb59217106c4d901fa2f3 (patch)
tree0f3268f856304d376445354b042b992a479d9b28 /ssl/s3_enc.c
parent8278184631424eaf0365d54fb81fd228af2dce38 (diff)
Check EVP_Cipher return values.
PR#1767 (Imported from upstream's fe78f08d1541211566a5656395186bfbdc61b6f8) Not sure this is reachable (upstream's PR references custom engines), but better be tidy. Note this is slightly different from upstream's: EVP_Cipher is documented to return -1 on failure, not 0. Change-Id: I836f12b73c6912a8ae8cbd37cfd3d33466acbc9e Reviewed-on: https://boringssl-review.googlesource.com/2478 Reviewed-by: Adam Langley <agl@google.com>
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 393db773..69d274d4 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -469,7 +469,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) < 0)
+ return -1;
if (EVP_MD_CTX_md(s->read_hash) != NULL)
mac_size = EVP_MD_CTX_size(s->read_hash);