What version of Go are you using (go version)?
go version go1.10 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/gre9521/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/gre9521/Documents/projects/gopath"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/1w/rr53y3313fg626_7gcq4cprc0000gn/T/go-build284290677=/tmp/go-build -gno-record-gcc-switches -fno-common"
Feature Request
Currently, because x509.CertPool contains no exported fields, it is impossible to create a deep copy. For performance reasons, it might be desired to compute x509.SystemCertPool() only once and extract of copy of it for each request if dynamic TLS needs to be configured.
As a workaround, I could currently do one of the following:
- copy the code in the
crypto/x509 package that load the cert pool
- use a curated root ca pool and not use the system cert pool
Ideally, I would like to be able to make a deep copy of *x509.CertPool.
What version of Go are you using (
go version)?go version go1.10 darwin/amd64Does this issue reproduce with the latest release?
yesWhat operating system and processor architecture are you using (
go env)?Feature Request
Currently, because
x509.CertPoolcontains no exported fields, it is impossible to create a deep copy. For performance reasons, it might be desired to computex509.SystemCertPool()only once and extract of copy of it for each request if dynamic TLS needs to be configured.As a workaround, I could currently do one of the following:
crypto/x509package that load the cert poolIdeally, I would like to be able to make a deep copy of
*x509.CertPool.