Skip to content

Commit 7da10c8

Browse files
authored
Merge pull request docker#29 from dmcgowan/revert-windows-go-18-system-pool
Revert change for windows cert pool access in 1.8
2 parents c972f11 + f652133 commit 7da10c8

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

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)