diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libssl/d1_enc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_enc.c b/src/lib/libssl/d1_enc.c index fe8df15a94..32fcd333f6 100644 --- a/src/lib/libssl/d1_enc.c +++ b/src/lib/libssl/d1_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_enc.c,v 1.6 2014/07/10 08:51:14 tedu Exp $ */ | 1 | /* $OpenBSD: d1_enc.c,v 1.7 2014/10/18 16:13:16 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -118,7 +118,6 @@ | |||
118 | #include <openssl/evp.h> | 118 | #include <openssl/evp.h> |
119 | #include <openssl/hmac.h> | 119 | #include <openssl/hmac.h> |
120 | #include <openssl/md5.h> | 120 | #include <openssl/md5.h> |
121 | #include <openssl/rand.h> | ||
122 | 121 | ||
123 | /* dtls1_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively. | 122 | /* dtls1_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively. |
124 | * | 123 | * |
@@ -154,8 +153,8 @@ dtls1_enc(SSL *s, int send) | |||
154 | fprintf(stderr, "%s:%d: rec->data != rec->input\n", | 153 | fprintf(stderr, "%s:%d: rec->data != rec->input\n", |
155 | __FILE__, __LINE__); | 154 | __FILE__, __LINE__); |
156 | else if (EVP_CIPHER_block_size(ds->cipher) > 1) { | 155 | else if (EVP_CIPHER_block_size(ds->cipher) > 1) { |
157 | if (RAND_bytes(rec->input, EVP_CIPHER_block_size(ds->cipher)) <= 0) | 156 | arc4random_buf(rec->input, |
158 | return -1; | 157 | EVP_CIPHER_block_size(ds->cipher)); |
159 | } | 158 | } |
160 | } | 159 | } |
161 | } else { | 160 | } else { |