diff options
| author | jsing <> | 2014-10-22 13:54:03 +0000 |
|---|---|---|
| committer | jsing <> | 2014-10-22 13:54:03 +0000 |
| commit | 5e608739d7bf88c892bfd6731e5aa80b77ce8371 (patch) | |
| tree | 5182be1e2bb99eb4ec60a5c42f2f953b4c1cadf1 /src/usr.bin/openssl/s_server.c | |
| parent | 52a58602e3937304d1798cc129d61e4048e04bd7 (diff) | |
| download | openbsd-5e608739d7bf88c892bfd6731e5aa80b77ce8371.tar.gz openbsd-5e608739d7bf88c892bfd6731e5aa80b77ce8371.tar.bz2 openbsd-5e608739d7bf88c892bfd6731e5aa80b77ce8371.zip | |
Use arc4random_buf() instead of RAND(_pseudo)?_bytes().
ok bcook@
Diffstat (limited to '')
| -rw-r--r-- | src/usr.bin/openssl/s_server.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/usr.bin/openssl/s_server.c b/src/usr.bin/openssl/s_server.c index 9ca13dd335..6f87819d1e 100644 --- a/src/usr.bin/openssl/s_server.c +++ b/src/usr.bin/openssl/s_server.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s_server.c,v 1.2 2014/10/13 02:39:09 bcook Exp $ */ | 1 | /* $OpenBSD: s_server.c,v 1.3 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 | * |
| @@ -166,7 +166,6 @@ | |||
| 166 | #include <openssl/lhash.h> | 166 | #include <openssl/lhash.h> |
| 167 | #include <openssl/ocsp.h> | 167 | #include <openssl/ocsp.h> |
| 168 | #include <openssl/pem.h> | 168 | #include <openssl/pem.h> |
| 169 | #include <openssl/rand.h> | ||
| 170 | #include <openssl/ssl.h> | 169 | #include <openssl/ssl.h> |
| 171 | #include <openssl/x509.h> | 170 | #include <openssl/x509.h> |
| 172 | 171 | ||
| @@ -2130,7 +2129,7 @@ generate_session_id(const SSL * ssl, unsigned char *id, | |||
| 2130 | { | 2129 | { |
| 2131 | unsigned int count = 0; | 2130 | unsigned int count = 0; |
| 2132 | do { | 2131 | do { |
| 2133 | RAND_pseudo_bytes(id, *id_len); | 2132 | arc4random_buf(id, *id_len); |
| 2134 | /* | 2133 | /* |
| 2135 | * Prefix the session_id with the required prefix. NB: If our | 2134 | * Prefix the session_id with the required prefix. NB: If our |
| 2136 | * prefix is too long, clip it - but there will be worse | 2135 | * prefix is too long, clip it - but there will be worse |
