Address David's comments.

pull/23165/head
Matthew Stevenson 5 years ago
parent 048ff29146
commit 9c116d5c03
  1. 11
      src/core/tsi/ssl_transport_security.cc
  2. 4
      test/core/handshake/client_ssl.cc
  3. 5
      test/core/handshake/server_ssl_common.cc

@ -1523,10 +1523,13 @@ static tsi_result ssl_handshaker_next(
if (ssl_handshaker_get_result(impl) == TSI_HANDSHAKE_IN_PROGRESS) {
*handshaker_result = nullptr;
} else {
// In TLS 1.3, the ClientFinished or ServerFinished record may have
// (encrypted) application data appended to the end of the record. In TLS
// 1.2, this is explicitly disallowed by the RFC; application data will
// never be appended to a handshake record.
// In TLS 1.3, the client may send application data records in the same
// flight of messages as the record containing the ClientFinished message.
// In TLS 1.2, this is not allowed; both the client and server must complete
// the handshake before any application data may be sent.
//
// These application data records are removed from the BIO after the
// server-side handshake completes, and set to |unused_bytes|.
unsigned char* unused_bytes = nullptr;
size_t unused_bytes_size = 0;
status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size);

@ -161,9 +161,7 @@ static void server_thread(void* arg) {
// Set the cipher list to match the one expressed in
// src/core/tsi/ssl_transport_security.c.
const char* cipher_list =
"TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_"
"SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-"
"AES256-"
"ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-"
"SHA384:ECDHE-RSA-AES256-GCM-SHA384";
if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) {
ERR_print_errors_fp(stderr);

@ -203,9 +203,8 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len,
// Set the cipher list to match the one expressed in
// src/core/tsi/ssl_transport_security.c.
const char* cipher_list =
"TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_"
"SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-"
"AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384";
"ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-"
"SHA384:ECDHE-RSA-AES256-GCM-SHA384";
if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) {
ERR_print_errors_fp(stderr);
gpr_log(GPR_ERROR, "Couldn't set server cipher list.");

Loading…
Cancel
Save