diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-04-03 10:55:16 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-04-03 10:55:16 -0700 |
commit | 6a14926b44504e88488e3715b5b84928d454fb49 (patch) | |
tree | 9cf5f80773922c62ebd9ba07388a1f27354dc516 /libgo/go/crypto/tls/common.go | |
parent | aabd700dee5d71eb0a8180fb3626a23da9a88fdd (diff) | |
parent | 749dea2a0549c126a0e992a6dd8e9b5eb28e1cee (diff) | |
download | gcc-6a14926b44504e88488e3715b5b84928d454fb49.tar.gz |
Merge remote-tracking branch 'origin/master' into hjl/x32/javahjl/x32/java
Diffstat (limited to 'libgo/go/crypto/tls/common.go')
-rw-r--r-- | libgo/go/crypto/tls/common.go | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/libgo/go/crypto/tls/common.go b/libgo/go/crypto/tls/common.go index 25f7a920cd3..4ba0bf87481 100644 --- a/libgo/go/crypto/tls/common.go +++ b/libgo/go/crypto/tls/common.go @@ -198,14 +198,6 @@ func (c *Config) time() time.Time { return t() } -func (c *Config) rootCAs() *x509.CertPool { - s := c.RootCAs - if s == nil { - s = defaultRoots() - } - return s -} - func (c *Config) cipherSuites() []uint16 { s := c.CipherSuites if s == nil { @@ -311,28 +303,16 @@ func defaultConfig() *Config { return &emptyConfig } -var once sync.Once - -func defaultRoots() *x509.CertPool { - once.Do(initDefaults) - return varDefaultRoots -} +var ( + once sync.Once + varDefaultCipherSuites []uint16 +) func defaultCipherSuites() []uint16 { - once.Do(initDefaults) + once.Do(initDefaultCipherSuites) return varDefaultCipherSuites } -func initDefaults() { - initDefaultRoots() - initDefaultCipherSuites() -} - -var ( - varDefaultRoots *x509.CertPool - varDefaultCipherSuites []uint16 -) - func initDefaultCipherSuites() { varDefaultCipherSuites = make([]uint16, len(cipherSuites)) for i, suite := range cipherSuites { |