diff options
| author | jsing <> | 2014-10-22 13:02:04 +0000 |
|---|---|---|
| committer | jsing <> | 2014-10-22 13:02:04 +0000 |
| commit | a2960bc2e14b4c5f7d8f78d2a69ebb537ca4afa8 (patch) | |
| tree | 32d920c77e1ecf12be5fad632b9ae71343194a7c /src/lib/libcrypto/rand/rand_lib.c | |
| parent | 5a6d7fd5a10b0ad084948463b25822d91091b325 (diff) | |
| download | openbsd-a2960bc2e14b4c5f7d8f78d2a69ebb537ca4afa8.tar.gz openbsd-a2960bc2e14b4c5f7d8f78d2a69ebb537ca4afa8.tar.bz2 openbsd-a2960bc2e14b4c5f7d8f78d2a69ebb537ca4afa8.zip | |
Use arc4random_buf() instead of RAND_bytes() or RAND_pseudo_bytes().
arc4random_buf() is guaranteed to always succeed - it is worth noting
that a number of the replaced function calls were already missing return
value checks.
ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/rand/rand_lib.c')
| -rw-r--r-- | src/lib/libcrypto/rand/rand_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rand/rand_lib.c b/src/lib/libcrypto/rand/rand_lib.c index 2b2c827740..8342a55f05 100644 --- a/src/lib/libcrypto/rand/rand_lib.c +++ b/src/lib/libcrypto/rand/rand_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rand_lib.c,v 1.19 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: rand_lib.c,v 1.20 2014/10/22 13:02:04 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> | 3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> |
| 4 | * | 4 | * |
| @@ -15,12 +15,12 @@ | |||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include <stdlib.h> | ||
| 19 | |||
| 18 | #include <openssl/opensslconf.h> | 20 | #include <openssl/opensslconf.h> |
| 19 | 21 | ||
| 20 | #include <openssl/rand.h> | 22 | #include <openssl/rand.h> |
| 21 | 23 | ||
| 22 | #include <stdlib.h> | ||
| 23 | |||
| 24 | /* | 24 | /* |
| 25 | * The useful functions in this file are at the bottom. | 25 | * The useful functions in this file are at the bottom. |
| 26 | */ | 26 | */ |
