]> Cypherpunks repositories - gostls13.git/commit
net/http: check GetConfigForClient in server.ServeTLS
authorChance Zibolski <chance.zibolski@gmail.com>
Fri, 7 Jun 2024 15:24:08 +0000 (15:24 +0000)
committerDamien Neil <dneil@google.com>
Fri, 7 Jun 2024 17:57:01 +0000 (17:57 +0000)
commit640067f28a95bbc32aa701ceea204e28e510b04f
tree084c17693538d527ff885999cf57929db6340add
parent0b72631a8229bcb86913f4855e217ddedbfbbb46
net/http: check GetConfigForClient in server.ServeTLS

Just like for tls.Config.GetCertificate the http.Server.ServeTLS method
should be checking tls.Config.GetConfigForClient before trying top open
the specified certFile/keyFile.

This was previously fixed for crypto/tls when using tls.Listen in
CL205059, but the same change for net/http was missed. I've added a
comment src/crypto/tls/tls.go in the relevant section in the hope that
any future changes of a similar nature consider will consider updating
net/http as needed as well.

Change-Id: I312303bc497d92aa2f4627fe2620c70779cbcc99
GitHub-Last-Rev: 6ed29a900816a13690a9f3e26476d9bc1055a6f7
GitHub-Pull-Request: golang/go#66795
Reviewed-on: https://go-review.googlesource.com/c/go/+/578396
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/crypto/tls/tls.go
src/net/http/serve_test.go
src/net/http/server.go