cloudflare / tls-tris

crypto/tls, now with 100% more 1.3. THE API IS NOT STABLE AND DOCUMENTATION IS NOT GUARANTEED.
Other
292 stars 50 forks source link

Support HelloRetryRequest #40

Open Lekensteyn opened 7 years ago

Lekensteyn commented 7 years ago

Currently the server just closes the connection when no supported groups are available. It should probably send a HRR in this case.

Similarly, the client (PR will be opened "soon") does not expect a HRR, it should retry the CH with appropriate changes (new keyshare for the group).

Important references: https://tools.ietf.org/html/draft-ietf-tls-tls13-18#section-4.1.4 (Hello Retry Request) https://tools.ietf.org/html/draft-ietf-tls-tls13-18#section-4.2.6.1 (PSK Binder)

Note: draft 22 changes the message significantly, requiring different parsing logic.

kriskwiatkowski commented 6 years ago

Draft 24 adds


The value of selected_version in the HelloRetryRequest |  
-- | --
  |   |   | "supported_versions" extension MUST be retained in the ServerHello, |  
  |   |   | and a client MUST abort the handshake with an "illegal_parameter" |  
  |   |   | alert if the value changes.