Branch: Tag:

2017-12-09

2017-12-09 10:12:14 by Martin Nilsson <nilsson@fastmail.com>

Remove 1.3 logic, as the handshake is completely overhauled.

392:    this, fmt_constant(handshake_state, "STATE"),    fmt_version(version));    -  if (version >= PROTOCOL_TLS_1_3) { -  switch(handshake_state) { -  case STATE_wait_for_hello: // Resume -  case STATE_wait_for_key_share: // Full hello -  session->master_secret = premaster_secret; -  session->master_secret = hash_messages("handshake master secret", 48); -  break; -  case STATE_wait_for_finish: -  session->master_secret = premaster_secret; -  session->master_secret = hash_messages("extended master secret", 48); -  break; -  default: -  error("Unexpected handshake state: %s\n", -  fmt_constant(handshake_state, "STATE")); -  break; -  } -  } else if (!sizeof(premaster_secret)) { +  if (!sizeof(premaster_secret)) {    // Clear text mode.    session->master_secret = "";    } else if (session->extended_master_secret) {
422:    }       new_cipher_states(); -  -  if ((version >= PROTOCOL_TLS_1_3) && -  (handshake_state == STATE_wait_for_finish)) { -  // Generate the resumption premaster secret. -  session->master_secret = premaster_secret; -  session->master_secret = hash_messages("resumption premaster secret", 48); +    } - } +          //! Do handshake processing. Type is one of HANDSHAKE_*, data is the
684:    } else {    error("Invalid Change Cipher Spec.\n");    } -  if (version >= PROTOCOL_TLS_1_3) { -  // The change cipher state packet is not sent on the wire in TLS 1.3. -  return 2; +     } -  } +        packet->send(output);    return 2;