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/srp/srptest.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 'crypto/srp/srptest.c')
-rw-r--r-- | crypto/srp/srptest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/srp/srptest.c b/crypto/srp/srptest.c index 17a8256f86..1d463cd782 100644 --- a/crypto/srp/srptest.c +++ b/crypto/srp/srptest.c @@ -59,7 +59,7 @@ static int run_srp(const char *username, const char *client_pass, showbn("Verifier", v); /* Server random */ - RAND_pseudo_bytes(rand_tmp, sizeof(rand_tmp)); + RAND_bytes(rand_tmp, sizeof(rand_tmp)); b = BN_bin2bn(rand_tmp, sizeof(rand_tmp), NULL); /* TODO - check b != 0 */ showbn("b", b); @@ -74,7 +74,7 @@ static int run_srp(const char *username, const char *client_pass, } /* Client random */ - RAND_pseudo_bytes(rand_tmp, sizeof(rand_tmp)); + RAND_bytes(rand_tmp, sizeof(rand_tmp)); a = BN_bin2bn(rand_tmp, sizeof(rand_tmp), NULL); /* TODO - check a != 0 */ showbn("a", a); |