Submitted by: Julia Lawall <julia@diku.dk>

The functions ENGINE_ctrl(), OPENSSL_isservice(), EVP_PKEY_sign(),
CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error fix
so the return code is checked correctly.
This commit is contained in:
Dr. Stephen Henson
2009-09-13 11:29:29 +00:00
parent 94480b57db
commit a25f33d28a
8 changed files with 21 additions and 11 deletions

View File

@@ -155,7 +155,7 @@ int dtls1_enc(SSL *s, int send)
__FILE__, __LINE__);
else if ( EVP_CIPHER_block_size(ds->cipher) > 1)
{
if (!RAND_bytes(rec->input, EVP_CIPHER_block_size(ds->cipher)))
if (RAND_bytes(rec->input, EVP_CIPHER_block_size(ds->cipher)) <= 0)
return -1;
}
}