Skip to content

Commit f652133

Browse files
committed
Revert change for windows cert pool access in 1.8
The upstream change to allow access to the windows system cert pool was reverted, reverting and updating messaging. Maybe 1.9....golang/go#18609 Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
1 parent c972f11 commit f652133

3 files changed

Lines changed: 2 additions & 12 deletions

File tree

tlsconfig/certpool_go17.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build go1.7,!go1.8
1+
// +build go1.7
22

33
package tlsconfig
44

tlsconfig/certpool_go18.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

tlsconfig/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func Server(options Options) (*tls.Config, error) {
118118
return nil, fmt.Errorf("Error reading X509 key pair (cert: %q, key: %q): %v. Make sure the key is not encrypted.", options.CertFile, options.KeyFile, err)
119119
}
120120
tlsConfig.Certificates = []tls.Certificate{tlsCert}
121-
if options.ClientAuth >= tls.VerifyClientCertIfGiven {
121+
if options.ClientAuth >= tls.VerifyClientCertIfGiven && options.CAFile != "" {
122122
CAs, err := certPool(options.CAFile)
123123
if err != nil {
124124
return nil, err

0 commit comments

Comments
 (0)