summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/s_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr.bin/openssl/s_server.c')
-rw-r--r--src/usr.bin/openssl/s_server.c5
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