diff options
Diffstat (limited to 'vendor/golang.org/x/net/http2/go17_not18.go')
-rw-r--r-- | vendor/golang.org/x/net/http2/go17_not18.go | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/http2/go17_not18.go b/vendor/golang.org/x/net/http2/go17_not18.go new file mode 100644 index 0000000..b4c52ec --- /dev/null +++ b/vendor/golang.org/x/net/http2/go17_not18.go | |||
@@ -0,0 +1,36 @@ | |||
1 | // Copyright 2016 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build go1.7,!go1.8 | ||
6 | |||
7 | package http2 | ||
8 | |||
9 | import "crypto/tls" | ||
10 | |||
11 | // temporary copy of Go 1.7's private tls.Config.clone: | ||
12 | func cloneTLSConfig(c *tls.Config) *tls.Config { | ||
13 | return &tls.Config{ | ||
14 | Rand: c.Rand, | ||
15 | Time: c.Time, | ||
16 | Certificates: c.Certificates, | ||
17 | NameToCertificate: c.NameToCertificate, | ||
18 | GetCertificate: c.GetCertificate, | ||
19 | RootCAs: c.RootCAs, | ||
20 | NextProtos: c.NextProtos, | ||
21 | ServerName: c.ServerName, | ||
22 | ClientAuth: c.ClientAuth, | ||
23 | ClientCAs: c.ClientCAs, | ||
24 | InsecureSkipVerify: c.InsecureSkipVerify, | ||
25 | CipherSuites: c.CipherSuites, | ||
26 | PreferServerCipherSuites: c.PreferServerCipherSuites, | ||
27 | SessionTicketsDisabled: c.SessionTicketsDisabled, | ||
28 | SessionTicketKey: c.SessionTicketKey, | ||
29 | ClientSessionCache: c.ClientSessionCache, | ||
30 | MinVersion: c.MinVersion, | ||
31 | MaxVersion: c.MaxVersion, | ||
32 | CurvePreferences: c.CurvePreferences, | ||
33 | DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled, | ||
34 | Renegotiation: c.Renegotiation, | ||
35 | } | ||
36 | } | ||