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-15 11:59:02 +0300
committerAdam Langley <agl@google.com>2014-12-16 04:51:55 +0300
commit4841ce49a015237096e280fbacd1f4e2555df744 (patch)
tree82320feb95d9f54bbcd5dddab672b9512687fab0 /ssl/s3_enc.c
parentef5885e4101867e2b54135cdb4f6a7e83df35f8a (diff)
Fix EVP_Cipher error-handling.
Turns out the EVP_CIPH_FLAG_CUSTOM_CIPHER ciphers (i.e. legacy EVP_CIPHER AES-GCM) have a completely different return value setup than the normal ones which are the standard one/zero. (Except that they never return zero; see TODO.) Fix checks in ssl/ and remove remnants of EVP_CIPH_FLAG_CUSTOM_CIPHER in ssl/ as we're using EVP_AEAD now. See CHANGES entry added in upstream's 3da0ca796cae6625bd26418afe0a1dc47bf5a77f. Change-Id: Ia4d0ff59b03c35fab3a08141c60b9534cb7172e2 Reviewed-on: https://boringssl-review.googlesource.com/2606 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r--ssl/s3_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 69d274d4..d4789251 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -469,7 +469,7 @@ int ssl3_enc(SSL *s, int send)
/* otherwise, rec->length >= bs */
}
- if (EVP_Cipher(ds,rec->data, rec->input, l) < 0)
+ if (!EVP_Cipher(ds, rec->data, rec->input, l))
return -1;
if (EVP_MD_CTX_md(s->read_hash) != NULL)