OSDN Git Service

new repo
[bytom/vapor.git] / vendor / golang.org / x / net / http2 / go17_not18.go
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 }