diff options
Diffstat (limited to '')
| -rw-r--r-- | src/usr.bin/openssl/s_cb.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/usr.bin/openssl/s_cb.c b/src/usr.bin/openssl/s_cb.c index 2e00abe7f1..f7d8a323a6 100644 --- a/src/usr.bin/openssl/s_cb.c +++ b/src/usr.bin/openssl/s_cb.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s_cb.c,v 1.1 2014/08/26 17:47:25 jsing Exp $ */ | 1 | /* $OpenBSD: s_cb.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 | * |
| @@ -121,7 +121,6 @@ | |||
| 121 | #include "apps.h" | 121 | #include "apps.h" |
| 122 | 122 | ||
| 123 | #include <openssl/err.h> | 123 | #include <openssl/err.h> |
| 124 | #include <openssl/rand.h> | ||
| 125 | #include <openssl/ssl.h> | 124 | #include <openssl/ssl.h> |
| 126 | #include <openssl/x509.h> | 125 | #include <openssl/x509.h> |
| 127 | 126 | ||
| @@ -728,11 +727,7 @@ generate_cookie_callback(SSL * ssl, unsigned char *cookie, | |||
| 728 | 727 | ||
| 729 | /* Initialize a random secret */ | 728 | /* Initialize a random secret */ |
| 730 | if (!cookie_initialized) { | 729 | if (!cookie_initialized) { |
| 731 | if (!RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH)) { | 730 | arc4random_buf(cookie_secret, COOKIE_SECRET_LENGTH); |
| 732 | BIO_printf(bio_err, | ||
| 733 | "error setting random cookie secret\n"); | ||
| 734 | return 0; | ||
| 735 | } | ||
| 736 | cookie_initialized = 1; | 731 | cookie_initialized = 1; |
| 737 | } | 732 | } |
| 738 | /* Read peer information */ | 733 | /* Read peer information */ |
