diff options
author | beck <> | 2017-01-22 07:16:39 +0000 |
---|---|---|
committer | beck <> | 2017-01-22 07:16:39 +0000 |
commit | 2204d5a39055900d89c6f7fbdcc3bb37ec8070db (patch) | |
tree | c03f505a3f0822dbc7a4d9523cfde19318c0d121 /src/lib/libssl/s3_clnt.c | |
parent | 334c9196a27db4244daba48e4ba2118985c535ed (diff) | |
download | openbsd-2204d5a39055900d89c6f7fbdcc3bb37ec8070db.tar.gz openbsd-2204d5a39055900d89c6f7fbdcc3bb37ec8070db.tar.bz2 openbsd-2204d5a39055900d89c6f7fbdcc3bb37ec8070db.zip |
Move most of DTLS1_STATE to internal.
ok jsing@
Diffstat (limited to 'src/lib/libssl/s3_clnt.c')
-rw-r--r-- | src/lib/libssl/s3_clnt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index 74f44dd930..d75ceb9d2d 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_clnt.c,v 1.160 2017/01/22 06:36:49 jsing Exp $ */ | 1 | /* $OpenBSD: s3_clnt.c,v 1.161 2017/01/22 07:16:39 beck 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 | * |
@@ -611,7 +611,7 @@ ssl3_client_hello(SSL *s) | |||
611 | * HelloVerifyRequest, we must retain the original client | 611 | * HelloVerifyRequest, we must retain the original client |
612 | * random value. | 612 | * random value. |
613 | */ | 613 | */ |
614 | if (!SSL_IS_DTLS(s) || s->d1->send_cookie == 0) | 614 | if (!SSL_IS_DTLS(s) || D1I(s)->send_cookie == 0) |
615 | arc4random_buf(s->s3->client_random, SSL3_RANDOM_SIZE); | 615 | arc4random_buf(s->s3->client_random, SSL3_RANDOM_SIZE); |
616 | 616 | ||
617 | d = p = ssl3_handshake_msg_start(s, SSL3_MT_CLIENT_HELLO); | 617 | d = p = ssl3_handshake_msg_start(s, SSL3_MT_CLIENT_HELLO); |
@@ -671,14 +671,14 @@ ssl3_client_hello(SSL *s) | |||
671 | 671 | ||
672 | /* DTLS Cookie. */ | 672 | /* DTLS Cookie. */ |
673 | if (SSL_IS_DTLS(s)) { | 673 | if (SSL_IS_DTLS(s)) { |
674 | if (s->d1->cookie_len > sizeof(s->d1->cookie)) { | 674 | if (D1I(s)->cookie_len > sizeof(D1I(s)->cookie)) { |
675 | SSLerr(SSL_F_DTLS1_CLIENT_HELLO, | 675 | SSLerr(SSL_F_DTLS1_CLIENT_HELLO, |
676 | ERR_R_INTERNAL_ERROR); | 676 | ERR_R_INTERNAL_ERROR); |
677 | goto err; | 677 | goto err; |
678 | } | 678 | } |
679 | *(p++) = s->d1->cookie_len; | 679 | *(p++) = D1I(s)->cookie_len; |
680 | memcpy(p, s->d1->cookie, s->d1->cookie_len); | 680 | memcpy(p, D1I(s)->cookie, D1I(s)->cookie_len); |
681 | p += s->d1->cookie_len; | 681 | p += D1I(s)->cookie_len; |
682 | } | 682 | } |
683 | 683 | ||
684 | /* Ciphers supported */ | 684 | /* Ciphers supported */ |
@@ -743,7 +743,7 @@ ssl3_get_server_hello(SSL *s) | |||
743 | 743 | ||
744 | if (SSL_IS_DTLS(s)) { | 744 | if (SSL_IS_DTLS(s)) { |
745 | if (s->s3->tmp.message_type == DTLS1_MT_HELLO_VERIFY_REQUEST) { | 745 | if (s->s3->tmp.message_type == DTLS1_MT_HELLO_VERIFY_REQUEST) { |
746 | if (s->d1->send_cookie == 0) { | 746 | if (D1I(s)->send_cookie == 0) { |
747 | s->s3->tmp.reuse_message = 1; | 747 | s->s3->tmp.reuse_message = 1; |
748 | return (1); | 748 | return (1); |
749 | } else { | 749 | } else { |