Skip to content

Commit a7e32a3

Browse files
authored
Merge branch 'master' into bytestreamproducer-readcloser
2 parents d538bde + 4c4e27b commit a7e32a3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

client/runtime.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ type TLSClientOptions struct {
8686
// the verifiedChains argument will always be nil.
8787
VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
8888

89+
// SessionTicketsDisabled may be set to true to disable session ticket and
90+
// PSK (resumption) support. Note that on clients, session ticket support is
91+
// also disabled if ClientSessionCache is nil.
92+
SessionTicketsDisabled bool
93+
94+
// ClientSessionCache is a cache of ClientSessionState entries for TLS
95+
// session resumption. It is only used by clients.
96+
ClientSessionCache tls.ClientSessionCache
97+
8998
// Prevents callers using unkeyed fields.
9099
_ struct{}
91100
}
@@ -133,6 +142,8 @@ func TLSClientAuth(opts TLSClientOptions) (*tls.Config, error) {
133142
cfg.InsecureSkipVerify = opts.InsecureSkipVerify
134143

135144
cfg.VerifyPeerCertificate = opts.VerifyPeerCertificate
145+
cfg.SessionTicketsDisabled = opts.SessionTicketsDisabled
146+
cfg.ClientSessionCache = opts.ClientSessionCache
136147

137148
// When no CA certificate is provided, default to the system cert pool
138149
// that way when a request is made to a server known by the system trust store,

0 commit comments

Comments
 (0)