Add checks to the return value of EVP_Cipher to prevent silent encryption failure.

PR#1767

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Matt Caswell
2014-11-18 12:56:26 +00:00
parent 061e68c554
commit 244d0955ad
4 changed files with 6 additions and 5 deletions

View File

@@ -1619,7 +1619,7 @@ int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len,
wr->length += bs;
}
s->method->ssl3_enc->enc(s,1);
if(s->method->ssl3_enc->enc(s,1) < 1) goto err;
/* record length after mac and block padding */
/* if (type == SSL3_RT_APPLICATION_DATA ||