diff options
author | Matt Caswell <matt@openssl.org> | 2015-02-26 11:57:37 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-25 12:38:07 +0000 |
commit | 266483d2f56b0764849797f31866bfd84f9c3aa8 (patch) | |
tree | 42323d0c8b8cea8da4aff3dfdd4bc2251e34a0db /apps/s_cb.c | |
parent | 8817e2e0c998757d3bd036d7f45fe8d0a49fbe2d (diff) |
RAND_bytes updates
Ensure RAND_bytes return value is checked correctly, and that we no longer
use RAND_pseudo_bytes.
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 8bc4b81710..ea7d35c700 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -949,7 +949,7 @@ int 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; } |