summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_clnt.c
diff options
context:
space:
mode:
authorbeck <>2017-05-06 22:24:58 +0000
committerbeck <>2017-05-06 22:24:58 +0000
commitde2b05d4b4bdc8132abc4507b6d3e48eeba9340b (patch)
tree4bcdcd934dd374037387e49c88e9fc7a9c2362be /src/lib/libssl/d1_clnt.c
parent0e5e712591c7f580f436de535348a0d768707768 (diff)
downloadopenbsd-de2b05d4b4bdc8132abc4507b6d3e48eeba9340b.tar.gz
openbsd-de2b05d4b4bdc8132abc4507b6d3e48eeba9340b.tar.bz2
openbsd-de2b05d4b4bdc8132abc4507b6d3e48eeba9340b.zip
Bring in an SSL_HANDSHAKE structure and commence the great shovelling
ok jsing@, gcc@, regress@
Diffstat (limited to 'src/lib/libssl/d1_clnt.c')
-rw-r--r--src/lib/libssl/d1_clnt.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c
index 8e4c2586a3..802aa5cde0 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.74 2017/02/07 02:08:38 beck Exp $ */ 1/* $OpenBSD: d1_clnt.c,v 1.75 2017/05/06 22:24:57 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.
@@ -268,7 +268,7 @@ dtls1_connect(SSL *s)
268 268
269 if (D1I(s)->send_cookie) { 269 if (D1I(s)->send_cookie) {
270 s->internal->state = SSL3_ST_CW_FLUSH; 270 s->internal->state = SSL3_ST_CW_FLUSH;
271 S3I(s)->tmp.next_state = SSL3_ST_CR_SRVR_HELLO_A; 271 S3I(s)->hs.next_state = SSL3_ST_CR_SRVR_HELLO_A;
272 } else 272 } else
273 s->internal->state = SSL3_ST_CR_SRVR_HELLO_A; 273 s->internal->state = SSL3_ST_CR_SRVR_HELLO_A;
274 274
@@ -324,7 +324,7 @@ dtls1_connect(SSL *s)
324 break; 324 break;
325 } 325 }
326 /* Check if it is anon DH. */ 326 /* Check if it is anon DH. */
327 if (!(S3I(s)->tmp.new_cipher->algorithm_auth & 327 if (!(S3I(s)->hs.new_cipher->algorithm_auth &
328 SSL_aNULL)) { 328 SSL_aNULL)) {
329 ret = ssl3_get_server_certificate(s); 329 ret = ssl3_get_server_certificate(s);
330 if (ret <= 0) 330 if (ret <= 0)
@@ -372,11 +372,11 @@ dtls1_connect(SSL *s)
372 goto end; 372 goto end;
373 dtls1_stop_timer(s); 373 dtls1_stop_timer(s);
374 if (S3I(s)->tmp.cert_req) 374 if (S3I(s)->tmp.cert_req)
375 S3I(s)->tmp.next_state = SSL3_ST_CW_CERT_A; 375 S3I(s)->hs.next_state = SSL3_ST_CW_CERT_A;
376 else 376 else
377 S3I(s)->tmp.next_state = SSL3_ST_CW_KEY_EXCH_A; 377 S3I(s)->hs.next_state = SSL3_ST_CW_KEY_EXCH_A;
378 s->internal->init_num = 0; 378 s->internal->init_num = 0;
379 s->internal->state = S3I(s)->tmp.next_state; 379 s->internal->state = S3I(s)->hs.next_state;
380 break; 380 break;
381 381
382 case SSL3_ST_CW_CERT_A: 382 case SSL3_ST_CW_CERT_A:
@@ -435,7 +435,7 @@ dtls1_connect(SSL *s)
435 s->internal->state = SSL3_ST_CW_FINISHED_A; 435 s->internal->state = SSL3_ST_CW_FINISHED_A;
436 s->internal->init_num = 0; 436 s->internal->init_num = 0;
437 437
438 s->session->cipher = S3I(s)->tmp.new_cipher; 438 s->session->cipher = S3I(s)->hs.new_cipher;
439 if (!tls1_setup_key_block(s)) { 439 if (!tls1_setup_key_block(s)) {
440 ret = -1; 440 ret = -1;
441 goto end; 441 goto end;
@@ -466,7 +466,7 @@ dtls1_connect(SSL *s)
466 /* clear flags */ 466 /* clear flags */
467 s->s3->flags&= ~SSL3_FLAGS_POP_BUFFER; 467 s->s3->flags&= ~SSL3_FLAGS_POP_BUFFER;
468 if (s->internal->hit) { 468 if (s->internal->hit) {
469 S3I(s)->tmp.next_state = SSL_ST_OK; 469 S3I(s)->hs.next_state = SSL_ST_OK;
470 if (s->s3->flags & SSL3_FLAGS_DELAY_CLIENT_FINISHED) { 470 if (s->s3->flags & SSL3_FLAGS_DELAY_CLIENT_FINISHED) {
471 s->internal->state = SSL_ST_OK; 471 s->internal->state = SSL_ST_OK;
472 s->s3->flags |= SSL3_FLAGS_POP_BUFFER; 472 s->s3->flags |= SSL3_FLAGS_POP_BUFFER;
@@ -476,10 +476,10 @@ dtls1_connect(SSL *s)
476 476
477 /* Allow NewSessionTicket if ticket expected */ 477 /* Allow NewSessionTicket if ticket expected */
478 if (s->internal->tlsext_ticket_expected) 478 if (s->internal->tlsext_ticket_expected)
479 S3I(s)->tmp.next_state = 479 S3I(s)->hs.next_state =
480 SSL3_ST_CR_SESSION_TICKET_A; 480 SSL3_ST_CR_SESSION_TICKET_A;
481 else 481 else
482 S3I(s)->tmp.next_state = 482 S3I(s)->hs.next_state =
483 SSL3_ST_CR_FINISHED_A; 483 SSL3_ST_CR_FINISHED_A;
484 } 484 }
485 s->internal->init_num = 0; 485 s->internal->init_num = 0;
@@ -527,14 +527,14 @@ dtls1_connect(SSL *s)
527 /* If the write error was fatal, stop trying */ 527 /* If the write error was fatal, stop trying */
528 if (!BIO_should_retry(s->wbio)) { 528 if (!BIO_should_retry(s->wbio)) {
529 s->internal->rwstate = SSL_NOTHING; 529 s->internal->rwstate = SSL_NOTHING;
530 s->internal->state = S3I(s)->tmp.next_state; 530 s->internal->state = S3I(s)->hs.next_state;
531 } 531 }
532 532
533 ret = -1; 533 ret = -1;
534 goto end; 534 goto end;
535 } 535 }
536 s->internal->rwstate = SSL_NOTHING; 536 s->internal->rwstate = SSL_NOTHING;
537 s->internal->state = S3I(s)->tmp.next_state; 537 s->internal->state = S3I(s)->hs.next_state;
538 break; 538 break;
539 539
540 case SSL_ST_OK: 540 case SSL_ST_OK: