]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: Enforce that version and cipher match on resume.
authorDavid Benjamin <davidben@google.com>
Mon, 15 Feb 2016 16:51:54 +0000 (11:51 -0500)
committerAdam Langley <agl@golang.org>
Tue, 12 Apr 2016 01:07:46 +0000 (01:07 +0000)
commit73a0185ad390761f21a3407858fcccc6a11c0858
treeb054a721c00db66ba55cf0cc3a7dd7129aafb0ad
parentc9b66bb355ebbc6a26ee511e996cba4da3e1d644
crypto/tls: Enforce that version and cipher match on resume.

Per RFC 5246, 7.4.1.3:

   cipher_suite
      The single cipher suite selected by the server from the list in
      ClientHello.cipher_suites.  For resumed sessions, this field is
      the value from the state of the session being resumed.

The specifications are not very clearly written about resuming sessions
at the wrong version (i.e. is the TLS 1.0 notion of "session" the same
type as the TLS 1.1 notion of "session"?). But every other
implementation enforces this check and not doing so has some odd
semantics.

Change-Id: I6234708bd02b636c25139d83b0d35381167e5cad
Reviewed-on: https://go-review.googlesource.com/21153
Reviewed-by: Adam Langley <agl@golang.org>
src/crypto/tls/handshake_client.go