Call expect_flight and received_flight in the 1.3 logic.

This doesn't do anything since they're for DTLS, but we ought to satisfy
the API nonetheless. expect_flight is easy with
ssl_hs_flush_and_read_message. received_flight I think basically needs
to get sprinkled into the state machine.

Change-Id: I406c7f776ad8e5e3cbcafcac6b26a688c6d3caf1
Reviewed-on: https://boringssl-review.googlesource.com/8883
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
David Benjamin 2016-07-22 17:39:29 +02:00
parent a68c118837
commit 613fe3baa5
3 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,7 @@ int tls13_handshake(SSL *ssl) {
if (hs->wait != ssl_hs_flush_and_read_message) { if (hs->wait != ssl_hs_flush_and_read_message) {
break; break;
} }
ssl->method->expect_flight(ssl);
hs->wait = ssl_hs_read_message; hs->wait = ssl_hs_read_message;
/* Fall-through. */ /* Fall-through. */
} }

View File

@ -394,6 +394,7 @@ static enum ssl_hs_wait_t do_process_server_finished(SSL *ssl,
return ssl_hs_error; return ssl_hs_error;
} }
ssl->method->received_flight(ssl);
hs->state = state_certificate_callback; hs->state = state_certificate_callback;
return ssl_hs_ok; return ssl_hs_ok;
} }

View File

@ -215,6 +215,8 @@ static enum ssl_hs_wait_t do_process_client_hello(SSL *ssl, SSL_HANDSHAKE *hs) {
ssl->session->cipher = cipher; ssl->session->cipher = cipher;
ssl->s3->tmp.new_cipher = cipher; ssl->s3->tmp.new_cipher = cipher;
ssl->method->received_flight(ssl);
/* The PRF hash is now known. Set up the key schedule and hash the /* The PRF hash is now known. Set up the key schedule and hash the
* ClientHello. */ * ClientHello. */
size_t hash_len = size_t hash_len =
@ -296,6 +298,7 @@ static enum ssl_hs_wait_t do_process_second_client_hello(SSL *ssl,
return ssl_hs_error; return ssl_hs_error;
} }
ssl->method->received_flight(ssl);
hs->state = state_send_server_hello; hs->state = state_send_server_hello;
return ssl_hs_ok; return ssl_hs_ok;
} }
@ -495,6 +498,7 @@ static enum ssl_hs_wait_t do_process_client_finished(SSL *ssl,
return ssl_hs_error; return ssl_hs_error;
} }
ssl->method->received_flight(ssl);
hs->state = state_done; hs->state = state_done;
return ssl_hs_ok; return ssl_hs_ok;
} }