Skip to content

Commit 777df48

Browse files
committed
tlsconfig: rename var that shadowed function
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 7808b91 commit 777df48

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tlsconfig/config.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ func ClientDefault(ops ...func(*tls.Config)) *tls.Config {
8383
func certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) {
8484
// If we should verify the server, we need to load a trusted ca
8585
var (
86-
certPool *x509.CertPool
87-
err error
86+
pool *x509.CertPool
87+
err error
8888
)
8989
if exclusivePool {
90-
certPool = x509.NewCertPool()
90+
pool = x509.NewCertPool()
9191
} else {
92-
certPool, err = SystemCertPool()
92+
pool, err = SystemCertPool()
9393
if err != nil {
9494
return nil, fmt.Errorf("failed to read system certificates: %v", err)
9595
}
@@ -98,10 +98,10 @@ func certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) {
9898
if err != nil {
9999
return nil, fmt.Errorf("could not read CA certificate %q: %v", caFile, err)
100100
}
101-
if !certPool.AppendCertsFromPEM(pemData) {
101+
if !pool.AppendCertsFromPEM(pemData) {
102102
return nil, fmt.Errorf("failed to append certificates from PEM file: %q", caFile)
103103
}
104-
return certPool, nil
104+
return pool, nil
105105
}
106106

107107
// allTLSVersions lists all the TLS versions and is used by the code that validates

0 commit comments

Comments
 (0)