dd9309c15e
Initial vendor list validated with empty $GOPATH and only master checked out; followed by `make` and verified that all binaries build properly. Updates require github.com/LK4D4/vndr tool. Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
37 lines
1.4 KiB
Go
37 lines
1.4 KiB
Go
// Copyright 2016 Apcera Inc. All rights reserved.
|
|
// +build go1.7
|
|
|
|
package util
|
|
|
|
import (
|
|
"crypto/tls"
|
|
)
|
|
|
|
// CloneTLSConfig returns a copy of c. Only the exported fields are copied.
|
|
// This is temporary, until this is provided by the language.
|
|
// https://go-review.googlesource.com/#/c/28075/
|
|
func CloneTLSConfig(c *tls.Config) *tls.Config {
|
|
return &tls.Config{
|
|
Rand: c.Rand,
|
|
Time: c.Time,
|
|
Certificates: c.Certificates,
|
|
NameToCertificate: c.NameToCertificate,
|
|
GetCertificate: c.GetCertificate,
|
|
RootCAs: c.RootCAs,
|
|
NextProtos: c.NextProtos,
|
|
ServerName: c.ServerName,
|
|
ClientAuth: c.ClientAuth,
|
|
ClientCAs: c.ClientCAs,
|
|
InsecureSkipVerify: c.InsecureSkipVerify,
|
|
CipherSuites: c.CipherSuites,
|
|
PreferServerCipherSuites: c.PreferServerCipherSuites,
|
|
SessionTicketsDisabled: c.SessionTicketsDisabled,
|
|
SessionTicketKey: c.SessionTicketKey,
|
|
ClientSessionCache: c.ClientSessionCache,
|
|
MinVersion: c.MinVersion,
|
|
MaxVersion: c.MaxVersion,
|
|
CurvePreferences: c.CurvePreferences,
|
|
DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled,
|
|
Renegotiation: c.Renegotiation,
|
|
}
|
|
}
|