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 244d0955ad)
This commit is contained in:
Matt Caswell
2014-11-18 12:56:26 +00:00
parent 3b12515180
commit 6ff76b3347
4 changed files with 6 additions and 5 deletions

View File

@@ -241,7 +241,8 @@ int dtls1_enc(SSL *s, int send)
return 0;
}
EVP_Cipher(ds,rec->data,rec->input,l);
if(EVP_Cipher(ds,rec->data,rec->input,l) < 1)
return -1;
#ifdef KSSL_DEBUG
{