Go through SSL_PROTOCOL_METHOD in the handshake.

The handshake should be generic between TLS and DTLS.

Change-Id: I6feb2f013dd5d771f206750653ab9d117d7ea716
Reviewed-on: https://boringssl-review.googlesource.com/21348
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
This commit is contained in:
David Benjamin 2017-10-06 18:45:16 -04:00
parent 31640931e6
commit 666d16e262
2 changed files with 3 additions and 3 deletions

View File

@ -357,7 +357,7 @@ static enum ssl_hs_wait_t do_process_change_cipher_spec(SSL_HANDSHAKE *hs) {
// If not sending early data, set client traffic keys now so that alerts are
// encrypted.
if ((ssl_is_resumption_client_ccs_experiment(ssl->version) &&
!ssl3_add_change_cipher_spec(ssl)) ||
!ssl->method->add_change_cipher_spec(ssl)) ||
!tls13_set_traffic_key(ssl, evp_aead_seal, hs->client_handshake_secret,
hs->hash_len)) {
return ssl_hs_error;
@ -565,7 +565,7 @@ static enum ssl_hs_wait_t do_send_end_of_early_data(SSL_HANDSHAKE *hs) {
if (hs->early_data_offered) {
if ((ssl_is_resumption_client_ccs_experiment(ssl->version) &&
!ssl3_add_change_cipher_spec(ssl)) ||
!ssl->method->add_change_cipher_spec(ssl)) ||
!tls13_set_traffic_key(ssl, evp_aead_seal, hs->client_handshake_secret,
hs->hash_len)) {
return ssl_hs_error;

View File

@ -552,7 +552,7 @@ static enum ssl_hs_wait_t do_send_server_hello(SSL_HANDSHAKE *hs) {
}
if (ssl_is_resumption_experiment(ssl->version) &&
!ssl3_add_change_cipher_spec(ssl)) {
!ssl->method->add_change_cipher_spec(ssl)) {
return ssl_hs_error;
}