diff options
Diffstat (limited to 'src/net/http/server.go')
| -rw-r--r-- | src/net/http/server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go index b9a6edd7ad..190f565013 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -3370,7 +3370,8 @@ func (srv *Server) Serve(l net.Listener) error { // // Files containing a certificate and matching private key for the // server must be provided if neither the [Server]'s -// TLSConfig.Certificates nor TLSConfig.GetCertificate are populated. +// TLSConfig.Certificates, TLSConfig.GetCertificate nor +// config.GetConfigForClient are populated. // If the certificate is signed by a certificate authority, the // certFile should be the concatenation of the server's certificate, // any intermediates, and the CA's certificate. @@ -3389,7 +3390,7 @@ func (srv *Server) ServeTLS(l net.Listener, certFile, keyFile string) error { config.NextProtos = append(config.NextProtos, "http/1.1") } - configHasCert := len(config.Certificates) > 0 || config.GetCertificate != nil + configHasCert := len(config.Certificates) > 0 || config.GetCertificate != nil || config.GetConfigForClient != nil if !configHasCert || certFile != "" || keyFile != "" { var err error config.Certificates = make([]tls.Certificate, 1) |
