diff options
author | jsing <> | 2014-10-22 13:54:03 +0000 |
---|---|---|
committer | jsing <> | 2014-10-22 13:54:03 +0000 |
commit | 85b016137f0bd9cf3b15129668f9d794a71c6d34 (patch) | |
tree | 5182be1e2bb99eb4ec60a5c42f2f953b4c1cadf1 /src/usr.bin/openssl/speed.c | |
parent | e931cb809e30a11ec87c1f47536227dc2f58dbdb (diff) | |
download | openbsd-85b016137f0bd9cf3b15129668f9d794a71c6d34.tar.gz openbsd-85b016137f0bd9cf3b15129668f9d794a71c6d34.tar.bz2 openbsd-85b016137f0bd9cf3b15129668f9d794a71c6d34.zip |
Use arc4random_buf() instead of RAND(_pseudo)?_bytes().
ok bcook@
Diffstat (limited to 'src/usr.bin/openssl/speed.c')
-rw-r--r-- | src/usr.bin/openssl/speed.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/usr.bin/openssl/speed.c b/src/usr.bin/openssl/speed.c index 82a0f90f05..ccaef15f68 100644 --- a/src/usr.bin/openssl/speed.c +++ b/src/usr.bin/openssl/speed.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: speed.c,v 1.1 2014/08/26 17:47:25 jsing Exp $ */ | 1 | /* $OpenBSD: speed.c,v 1.2 2014/10/22 13:54:03 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -98,7 +98,6 @@ | |||
98 | #include <openssl/evp.h> | 98 | #include <openssl/evp.h> |
99 | #include <openssl/modes.h> | 99 | #include <openssl/modes.h> |
100 | #include <openssl/objects.h> | 100 | #include <openssl/objects.h> |
101 | #include <openssl/rand.h> | ||
102 | #include <openssl/x509.h> | 101 | #include <openssl/x509.h> |
103 | 102 | ||
104 | #ifndef OPENSSL_NO_AES | 103 | #ifndef OPENSSL_NO_AES |
@@ -1471,7 +1470,7 @@ speed_main(int argc, char **argv) | |||
1471 | print_result(D_EVP, j, count, d); | 1470 | print_result(D_EVP, j, count, d); |
1472 | } | 1471 | } |
1473 | } | 1472 | } |
1474 | RAND_pseudo_bytes(buf, 36); | 1473 | arc4random_buf(buf, 36); |
1475 | for (j = 0; j < RSA_NUM; j++) { | 1474 | for (j = 0; j < RSA_NUM; j++) { |
1476 | int ret; | 1475 | int ret; |
1477 | if (!rsa_doit[j]) | 1476 | if (!rsa_doit[j]) |
@@ -1543,7 +1542,7 @@ speed_main(int argc, char **argv) | |||
1543 | } | 1542 | } |
1544 | } | 1543 | } |
1545 | 1544 | ||
1546 | RAND_pseudo_bytes(buf, 20); | 1545 | arc4random_buf(buf, 20); |
1547 | for (j = 0; j < DSA_NUM; j++) { | 1546 | for (j = 0; j < DSA_NUM; j++) { |
1548 | unsigned int kk; | 1547 | unsigned int kk; |
1549 | int ret; | 1548 | int ret; |