• Darien Raymond's avatar
    crypto/tls: cache Leaf certificate during BuildNameToCertificate · 1350214e
    Darien Raymond authored
    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: c3788f4116be47f2fdb777935c421e7dd694f5c8
    GitHub-Pull-Request: golang/go#24920
    Reviewed-on: https://go-review.googlesource.com/c/107627Reviewed-by: 's avatarFilippo Valsorda <filippo@golang.org>
    1350214e
Name
Last commit
Last update
..
testdata Loading commit data...
alert.go Loading commit data...
auth.go Loading commit data...
auth_test.go Loading commit data...
cipher_suites.go Loading commit data...
common.go Loading commit data...
conn.go Loading commit data...
conn_test.go Loading commit data...
example_test.go Loading commit data...
generate_cert.go Loading commit data...
handshake_client.go Loading commit data...
handshake_client_test.go Loading commit data...
handshake_messages.go Loading commit data...
handshake_messages_test.go Loading commit data...
handshake_server.go Loading commit data...
handshake_server_test.go Loading commit data...
handshake_test.go Loading commit data...
key_agreement.go Loading commit data...
prf.go Loading commit data...
prf_test.go Loading commit data...
ticket.go Loading commit data...
tls.go Loading commit data...
tls_test.go Loading commit data...