diff options
author | beck <> | 2017-05-07 04:22:24 +0000 |
---|---|---|
committer | beck <> | 2017-05-07 04:22:24 +0000 |
commit | 3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5 (patch) | |
tree | 9f980ffff8490ca0af628971a6d8ceb4a23d3b99 /src/lib/libssl/d1_pkt.c | |
parent | 2145114fc4f04a6a75134ef92bc551a976292150 (diff) | |
download | openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.tar.gz openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.tar.bz2 openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.zip |
Move state from ssl->internal to the handshake structure.
while we are at it, convert SSLerror to use a function
internally, so that we may later allocate the handshake
structure and check for it
ok jsing@
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 5fdd176800..9f670fadfd 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.62 2017/02/07 02:08:38 beck Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.63 2017/05/07 04:22:24 beck 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. |
@@ -685,7 +685,7 @@ start: | |||
685 | * so process data buffered during the last handshake | 685 | * so process data buffered during the last handshake |
686 | * in advance, if any. | 686 | * in advance, if any. |
687 | */ | 687 | */ |
688 | if (s->internal->state == SSL_ST_OK && rr->length == 0) { | 688 | if (S3I(s)->hs.state == SSL_ST_OK && rr->length == 0) { |
689 | pitem *item; | 689 | pitem *item; |
690 | item = pqueue_pop(D1I(s)->buffered_app_data.q); | 690 | item = pqueue_pop(D1I(s)->buffered_app_data.q); |
691 | if (item) { | 691 | if (item) { |
@@ -1028,9 +1028,9 @@ start: | |||
1028 | goto start; | 1028 | goto start; |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | if (((s->internal->state&SSL_ST_MASK) == SSL_ST_OK) && | 1031 | if (((S3I(s)->hs.state&SSL_ST_MASK) == SSL_ST_OK) && |
1032 | !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)) { | 1032 | !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)) { |
1033 | s->internal->state = s->server ? SSL_ST_ACCEPT : SSL_ST_CONNECT; | 1033 | S3I(s)->hs.state = s->server ? SSL_ST_ACCEPT : SSL_ST_CONNECT; |
1034 | s->internal->renegotiate = 1; | 1034 | s->internal->renegotiate = 1; |
1035 | s->internal->new_session = 1; | 1035 | s->internal->new_session = 1; |
1036 | } | 1036 | } |
@@ -1089,12 +1089,12 @@ start: | |||
1089 | */ | 1089 | */ |
1090 | if (S3I(s)->in_read_app_data && | 1090 | if (S3I(s)->in_read_app_data && |
1091 | (S3I(s)->total_renegotiations != 0) && | 1091 | (S3I(s)->total_renegotiations != 0) && |
1092 | (((s->internal->state & SSL_ST_CONNECT) && | 1092 | (((S3I(s)->hs.state & SSL_ST_CONNECT) && |
1093 | (s->internal->state >= SSL3_ST_CW_CLNT_HELLO_A) && | 1093 | (S3I(s)->hs.state >= SSL3_ST_CW_CLNT_HELLO_A) && |
1094 | (s->internal->state <= SSL3_ST_CR_SRVR_HELLO_A)) || ( | 1094 | (S3I(s)->hs.state <= SSL3_ST_CR_SRVR_HELLO_A)) || ( |
1095 | (s->internal->state & SSL_ST_ACCEPT) && | 1095 | (S3I(s)->hs.state & SSL_ST_ACCEPT) && |
1096 | (s->internal->state <= SSL3_ST_SW_HELLO_REQ_A) && | 1096 | (S3I(s)->hs.state <= SSL3_ST_SW_HELLO_REQ_A) && |
1097 | (s->internal->state >= SSL3_ST_SR_CLNT_HELLO_A)))) { | 1097 | (S3I(s)->hs.state >= SSL3_ST_SR_CLNT_HELLO_A)))) { |
1098 | S3I(s)->in_read_app_data = 2; | 1098 | S3I(s)->in_read_app_data = 2; |
1099 | return (-1); | 1099 | return (-1); |
1100 | } else { | 1100 | } else { |