File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments