Fork of the Go standard TLS library, providing low-level access to the ClientHello for mimicry purposes.
Find a file
Filippo Valsorda 5ca720fc5e crypto/tls: don't reverify but check certificate expiration on resumption
We used to inconsistently run certificate verification on the server on
resumption, but not on the client. This made TLS 1.3 resumption pretty
much useless, as it didn't save bytes, CPU, or round-trips.

This requires serializing the verified chains into the session ticket,
so it's a tradeoff making the ticket bigger to save computation (and for
consistency).

The previous behavior also had a "stickyness" issue: if a ticket
contained invalid certificates, they would be used even if the client
had in the meantime configured valid certificates for a full handshake.

We also didn't check expiration on the client side on resumption if
InsecureSkipVerify was set. Again for consistency, we do that now.

Also, we used to run VerifyPeerCertificates on resumption even if
NoClientCerts was set.

Fixes #31641

Change-Id: Icc88269ea4adb544fa81158114aae76f3c91a15f
Reviewed-on: https://go-review.googlesource.com/c/go/+/497895
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
2023-05-25 00:14:50 +00:00
fipsonly [dev.boringcrypto] all: add boringcrypto build tags 2022-04-29 14:23:22 +00:00
testdata crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00
alert.go crypto/tls: support QUIC as a transport 2023-05-24 22:40:18 +00:00
auth.go [dev.boringcrypto] all: merge commit 9d0819b27c (CL 314609) into dev.boringcrypto 2021-05-13 12:59:22 -04:00
auth_test.go [dev.boringcrypto] all: merge master into dev.boringcrypto 2020-04-08 17:48:41 -04:00
boring.go [dev.boringcrypto] crypto/x509: remove VerifyOptions.IsBoring 2022-04-29 14:23:29 +00:00
boring_test.go crypto/tls: replace all usages of BytesOrPanic 2023-02-14 16:52:30 +00:00
cache.go crypto/tls: use SessionState on the client side 2023-05-24 23:56:41 +00:00
cache_test.go crypto/tls: add a certificate cache implementation 2022-11-07 19:46:27 +00:00
cipher_suites.go crypto/tls: remove unused nonAESGCMAEADCiphers variable 2023-05-24 21:17:41 +00:00
common.go crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00
common_string.go crypto/tls: add {SignatureScheme,CurveID,ClientAuthType}.String() 2020-03-11 20:02:18 +00:00
conn.go crypto/tls: implement Extended Master Secret 2023-05-25 00:13:30 +00:00
conn_test.go crypto/tls: enforce 1.3 record version semantics 2023-05-24 21:35:01 +00:00
example_test.go crypto/tls: replace VerifyPeerCertificate example with VerifyConnection 2020-06-24 20:48:12 +00:00
generate_cert.go crypto/tls: delete unnecessary line of return 2022-08-08 15:22:02 +00:00
handshake_client.go crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00
handshake_client_test.go crypto/tls: add WrapSession and UnwrapSession 2023-05-24 23:56:55 +00:00
handshake_client_tls13.go crypto/tls: implement Extended Master Secret 2023-05-25 00:13:30 +00:00
handshake_messages.go crypto/tls: implement Extended Master Secret 2023-05-25 00:13:30 +00:00
handshake_messages_test.go crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00
handshake_server.go crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00
handshake_server_test.go crypto/tls: replace all usages of BytesOrPanic 2023-02-14 16:52:30 +00:00
handshake_server_tls13.go crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00
handshake_test.go crypto/tls: set default minimum client version to TLS 1.2 2021-11-05 22:03:24 +00:00
handshake_unix_test.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
key_agreement.go crypto/ecdh: move ECDH method to PrivateKey 2022-11-16 14:37:29 +00:00
key_schedule.go crypto/tls: add QUIC 0-RTT APIs 2023-05-25 00:13:28 +00:00
key_schedule_test.go crypto/tls: implement TLS 1.3 cryptographic computations 2018-11-02 21:54:52 +00:00
link_test.go all: use ":" for compiler generated symbols 2022-08-09 11:28:56 +00:00
notboring.go [dev.boringcrypto] crypto/x509: remove VerifyOptions.IsBoring 2022-04-29 14:23:29 +00:00
prf.go crypto/tls: implement Extended Master Secret 2023-05-25 00:13:30 +00:00
prf_test.go crypto/tls: remove SSLv3 support 2019-08-27 22:24:05 +00:00
quic.go crypto/tls: add QUIC 0-RTT APIs 2023-05-25 00:13:28 +00:00
quic_test.go crypto/tls: add QUIC 0-RTT APIs 2023-05-25 00:13:28 +00:00
ticket.go crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00
tls.go crypto/tls: add HandshakeContext method to Conn 2021-03-16 14:05:45 +00:00
tls_test.go crypto/tls: don't reverify but check certificate expiration on resumption 2023-05-25 00:14:50 +00:00