Alternative TLS implementation in Go
Go to file
Russ Cox 9c9b97f554 crypto/tls: fix ConnectionState().VerifiedChains for resumed connection
Strengthening VerifyHostname exposed the fact that for resumed
connections, ConnectionState().VerifiedChains was not being saved
and restored during the ClientSessionCache operations.
Do that.

This change just saves the verified chains in the client's session
cache. It does not re-verify the certificates when resuming a
connection.

There are arguments both ways about this: we want fast, light-weight
resumption connections (thus suggesting that we shouldn't verify) but
it could also be a little surprising that, if the verification config
is changed, that would be ignored if the same session cache is used.

On the server side we do re-verify client-auth certificates, but the
situation is a little different there. The client session cache is an
object in memory that's reset each time the process restarts. But the
server's session cache is a conceptual object, held by the clients, so
can persist across server restarts. Thus the chance of a change in
verification config being surprisingly ignored is much higher in the
server case.

Fixes #12024.

Change-Id: I3081029623322ce3d9f4f3819659fdd9a381db16
Reviewed-on: https://go-review.googlesource.com/13164
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2015-08-05 19:59:28 +00:00
testdata crypto/tls: update testing certificates. 2015-08-05 19:06:51 +00:00
alert.go crypto/tls: support TLS_FALLBACK_SCSV as a server. 2014-10-15 17:54:04 -07:00
cipher_suites.go crypto/tls: decouple handshake signatures from the handshake hash. 2015-04-30 03:47:02 +00:00
common.go crypto/tls: fix ConnectionState().VerifiedChains for resumed connection 2015-08-05 19:59:28 +00:00
conn_test.go crypto/tls: Added dynamic alternative to NameToCertificate map for SNI 2014-08-06 11:22:00 -07:00
conn.go crypto/tls: check cert chain during VerifyHostname 2015-07-22 17:32:00 +00:00
example_test.go crypto/x509: add example of using a custom root list. 2014-02-19 11:18:35 -05:00
generate_cert.go crypto/tls: Support ECDSA keys in generate_cert.go 2014-07-28 14:46:34 -07:00
handshake_client_test.go crypto/tls: fix ConnectionState().VerifiedChains for resumed connection 2015-08-05 19:59:28 +00:00
handshake_client.go crypto/tls: fix ConnectionState().VerifiedChains for resumed connection 2015-08-05 19:59:28 +00:00
handshake_messages_test.go crypto/tls: decouple handshake signatures from the handshake hash. 2015-04-30 03:47:02 +00:00
handshake_messages.go crypto/tls: fix parsing of SNI extension. 2015-06-14 17:55:53 +00:00
handshake_server_test.go crypto/tls: update testing certificates. 2015-08-05 19:06:51 +00:00
handshake_server.go crypto/tls: don't require an explicit client-auth EKU. 2015-06-09 15:48:24 +00:00
handshake_test.go crypto/tls: rework reference tests. 2013-12-20 11:37:05 -05:00
key_agreement.go all: fix misprints in comments 2015-06-11 14:18:57 +00:00
prf_test.go crypto/tls: decouple handshake signatures from the handshake hash. 2015-04-30 03:47:02 +00:00
prf.go crypto/tls: decouple handshake signatures from the handshake hash. 2015-04-30 03:47:02 +00:00
ticket.go crypto/tls: add support for session ticket key rotation 2015-04-26 20:57:28 +00:00
tls_test.go crypto/tls: fix ConnectionState().VerifiedChains for resumed connection 2015-08-05 19:59:28 +00:00
tls.go crypto/tls: remove return parameter stutter 2015-01-13 21:35:11 +00:00