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 /crypto/rand/randtest.c | |
parent | 8817e2e0c998757d3bd036d7f45fe8d0a49fbe2d (diff) | |
download | openssl-266483d2f56b0764849797f31866bfd84f9c3aa8.tar.gz |
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 'crypto/rand/randtest.c')
-rw-r--r-- | crypto/rand/randtest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rand/randtest.c b/crypto/rand/randtest.c index 267752e4f5..67acf700ee 100644 --- a/crypto/rand/randtest.c +++ b/crypto/rand/randtest.c @@ -77,8 +77,8 @@ int main(int argc, char **argv) */ long d; - i = RAND_pseudo_bytes(buf, 2500); - if (i < 0) { + i = RAND_bytes(buf, 2500); + if (i <= 0) { printf("init failed, the rand method is not properly installed\n"); err++; goto err; |