diff options
author | Matt Caswell <matt@openssl.org> | 2015-02-26 16:28:59 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-25 12:45:17 +0000 |
commit | 750190567a43d827fa16c58e79ae3ec6ff6c91d3 (patch) | |
tree | 0fdc59036c721536c5968cf78cfb9e7dbbe31156 /apps/s_cb.c | |
parent | 23a9b24aa100cc1c5c7d2c95252f2520680d2e58 (diff) |
Fix RAND_(pseudo_)?_bytes returns
Ensure all calls to RAND_bytes and RAND_pseudo_bytes have their return
value checked correctly
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 8f8e4e4f5253085ab673bb74094c3e492c56af44)
Conflicts:
crypto/evp/e_des3.c
Diffstat (limited to 'apps/s_cb.c')
-rw-r--r-- | apps/s_cb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index 7918500a6c..9ab11cf054 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -747,7 +747,7 @@ int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, /* Initialize a random secret */ if (!cookie_initialized) { - if (!RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH)) { + if (RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH) <= 0) { BIO_printf(bio_err, "error setting random cookie secret\n"); return 0; } |