go/src/crypto/tls
Darien Raymond 1350214e41 crypto/tls: cache Leaf certificate during BuildNameToCertificate
I am working on a TLS server program, which issues new TLS certificates
on demand. The new certificates will be added into tls.Config.Certificates.
BuildNameToCertificate will be called to refresh the name table afterwards.
This change will reduce some workload on existing certificates.

Note that you can’t modify the Certificates field (or call BuildNameToCertificate)
on a Config in use by a Server. You can however modify an unused Config that gets
cloned in GetConfigForClient with appropriate locking.

Change-Id: I7bdb7d23fc5d68df83c73f3bfa3ba9181d38fbde
GitHub-Last-Rev: c3788f4116
GitHub-Pull-Request: golang/go#24920
Reviewed-on: https://go-review.googlesource.com/c/107627
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-10-31 14:39:11 +00:00
..
testdata crypto/tls: make ConnectionState.ExportKeyingMaterial a method 2018-08-22 03:48:56 +00:00
alert.go
auth.go crypto/tls,crypto/x509: normalize RFC references 2018-10-17 03:58:03 +00:00
auth_test.go crypto/tls: add RSASSA-PSS support for handshake messages 2018-06-27 23:08:06 +00:00
cipher_suites.go crypto/tls: replace custom *block with standard buffers 2018-10-24 10:03:23 +00:00
common.go crypto/tls: cache Leaf certificate during BuildNameToCertificate 2018-10-31 14:39:11 +00:00
conn.go crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte 2018-10-29 17:05:55 +00:00
conn_test.go crypto/tls: replace net.Pipe in tests with real TCP connections 2018-10-19 12:43:30 +00:00
example_test.go crypto/tls: add examples for [Load]X509KeyPair 2018-04-30 17:25:27 +00:00
generate_cert.go
handshake_client.go crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte 2018-10-29 17:05:55 +00:00
handshake_client_test.go crypto/tls: bump test timeouts from 1s to 1m for slow builders 2018-10-27 22:12:17 +00:00
handshake_messages.go crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte 2018-10-29 17:05:55 +00:00
handshake_messages_test.go crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte 2018-10-29 17:05:55 +00:00
handshake_server.go crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte 2018-10-29 17:05:55 +00:00
handshake_server_test.go crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte 2018-10-29 17:05:55 +00:00
handshake_test.go crypto/tls: replace net.Pipe in tests with real TCP connections 2018-10-19 12:43:30 +00:00
key_agreement.go crypto/tls,crypto/x509: normalize RFC references 2018-10-17 03:58:03 +00:00
prf.go crypto/tls,crypto/x509: normalize RFC references 2018-10-17 03:58:03 +00:00
prf_test.go crypto/tls: make ConnectionState.ExportKeyingMaterial a method 2018-08-22 03:48:56 +00:00
ticket.go crypto/tls: replace custom equal implementations with reflect.DeepEqual 2018-10-25 19:07:36 +00:00
tls.go crypto/tls: remove unneeded calls to bytes.NewReader 2018-10-30 01:43:09 +00:00
tls_test.go crypto/tls: make ConnectionState.ExportKeyingMaterial a method 2018-08-22 03:48:56 +00:00