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:41:28 +0000 |
commit | 8f8e4e4f5253085ab673bb74094c3e492c56af44 (patch) | |
tree | 1fb6e32d1f10e7ca77521df3a25f887bf083f7a8 /apps/s_cb.c | |
parent | a20718fa2c0a45e6acb975cf6c0438c3ebd45b13 (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>
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 f6e6bcd765..36e22848f4 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -1012,7 +1012,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; } |