diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/d1_clnt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c index 0cc4016d11..4b71f01a6c 100644 --- a/src/lib/libssl/d1_clnt.c +++ b/src/lib/libssl/d1_clnt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_clnt.c,v 1.35 2014/09/07 12:16:23 jsing Exp $ */ | 1 | /* $OpenBSD: d1_clnt.c,v 1.36 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. |
| @@ -116,7 +116,6 @@ | |||
| 116 | #include <stdio.h> | 116 | #include <stdio.h> |
| 117 | #include "ssl_locl.h" | 117 | #include "ssl_locl.h" |
| 118 | #include <openssl/buffer.h> | 118 | #include <openssl/buffer.h> |
| 119 | #include <openssl/rand.h> | ||
| 120 | #include <openssl/objects.h> | 119 | #include <openssl/objects.h> |
| 121 | #include <openssl/evp.h> | 120 | #include <openssl/evp.h> |
| 122 | #include <openssl/md5.h> | 121 | #include <openssl/md5.h> |
| @@ -779,7 +778,7 @@ dtls1_client_hello(SSL *s) | |||
| 779 | for (i = 0; p[i]=='\0' && i < sizeof(s->s3->client_random); i++) | 778 | for (i = 0; p[i]=='\0' && i < sizeof(s->s3->client_random); i++) |
| 780 | ; | 779 | ; |
| 781 | if (i == sizeof(s->s3->client_random)) | 780 | if (i == sizeof(s->s3->client_random)) |
| 782 | RAND_pseudo_bytes(p, sizeof(s->s3->client_random)); | 781 | arc4random_buf(p, sizeof(s->s3->client_random)); |
| 783 | 782 | ||
| 784 | /* Do the message type and length last */ | 783 | /* Do the message type and length last */ |
| 785 | d = p = &(buf[DTLS1_HM_HEADER_LENGTH]); | 784 | d = p = &(buf[DTLS1_HM_HEADER_LENGTH]); |
| @@ -954,8 +953,7 @@ dtls1_send_client_key_exchange(SSL *s) | |||
| 954 | 953 | ||
| 955 | tmp_buf[0] = s->client_version >> 8; | 954 | tmp_buf[0] = s->client_version >> 8; |
| 956 | tmp_buf[1] = s->client_version&0xff; | 955 | tmp_buf[1] = s->client_version&0xff; |
| 957 | if (RAND_bytes(&(tmp_buf[2]), sizeof tmp_buf - 2) <= 0) | 956 | arc4random_buf(&tmp_buf[2], sizeof(tmp_buf) - 2); |
| 958 | goto err; | ||
| 959 | 957 | ||
| 960 | s->session->master_key_length = sizeof tmp_buf; | 958 | s->session->master_key_length = sizeof tmp_buf; |
| 961 | 959 | ||
