diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2017-05-07 04:22:25 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2017-05-07 04:22:25 +0000 |
commit | 6a371680c0fa9728391e83c9a0afd40217fde50e (patch) | |
tree | 5b8579c555aabf86a174ddf686a101863c52d3c1 /lib/libssl/d1_pkt.c | |
parent | 98e5dc90ab7c1b350e23cfd9aa174c8868d984fd (diff) |
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 'lib/libssl/d1_pkt.c')
-rw-r--r-- | lib/libssl/d1_pkt.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libssl/d1_pkt.c b/lib/libssl/d1_pkt.c index 5fdd1768002..9f670fadfdc 100644 --- a/lib/libssl/d1_pkt.c +++ b/lib/libssl/d1_pkt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_pkt.c,v 1.62 2017/02/07 02:08:38 beck Exp $ */ +/* $OpenBSD: d1_pkt.c,v 1.63 2017/05/07 04:22:24 beck Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -685,7 +685,7 @@ start: * so process data buffered during the last handshake * in advance, if any. */ - if (s->internal->state == SSL_ST_OK && rr->length == 0) { + if (S3I(s)->hs.state == SSL_ST_OK && rr->length == 0) { pitem *item; item = pqueue_pop(D1I(s)->buffered_app_data.q); if (item) { @@ -1028,9 +1028,9 @@ start: goto start; } - if (((s->internal->state&SSL_ST_MASK) == SSL_ST_OK) && + if (((S3I(s)->hs.state&SSL_ST_MASK) == SSL_ST_OK) && !(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)) { - s->internal->state = s->server ? SSL_ST_ACCEPT : SSL_ST_CONNECT; + S3I(s)->hs.state = s->server ? SSL_ST_ACCEPT : SSL_ST_CONNECT; s->internal->renegotiate = 1; s->internal->new_session = 1; } @@ -1089,12 +1089,12 @@ start: */ if (S3I(s)->in_read_app_data && (S3I(s)->total_renegotiations != 0) && - (((s->internal->state & SSL_ST_CONNECT) && - (s->internal->state >= SSL3_ST_CW_CLNT_HELLO_A) && - (s->internal->state <= SSL3_ST_CR_SRVR_HELLO_A)) || ( - (s->internal->state & SSL_ST_ACCEPT) && - (s->internal->state <= SSL3_ST_SW_HELLO_REQ_A) && - (s->internal->state >= SSL3_ST_SR_CLNT_HELLO_A)))) { + (((S3I(s)->hs.state & SSL_ST_CONNECT) && + (S3I(s)->hs.state >= SSL3_ST_CW_CLNT_HELLO_A) && + (S3I(s)->hs.state <= SSL3_ST_CR_SRVR_HELLO_A)) || ( + (S3I(s)->hs.state & SSL_ST_ACCEPT) && + (S3I(s)->hs.state <= SSL3_ST_SW_HELLO_REQ_A) && + (S3I(s)->hs.state >= SSL3_ST_SR_CLNT_HELLO_A)))) { S3I(s)->in_read_app_data = 2; return (-1); } else { |