mirror of
https://github.com/golang/go
synced 2024-11-11 22:30:21 -07:00
crypto/tls: explicitly require ExtKeyUsageClientAuth for client certs
If we aren't explicit about the KeyUsages, the verifier will treat the certificate as a server certificate and require it to have a ExtKeyUsageServerAuth key usage. R=golang-dev CC=golang-dev https://golang.org/cl/6453148
This commit is contained in:
parent
58064a7cab
commit
67924c1b60
@ -211,6 +211,7 @@ FindCipherSuite:
|
||||
Roots: c.config.ClientCAs,
|
||||
CurrentTime: c.config.time(),
|
||||
Intermediates: x509.NewCertPool(),
|
||||
KeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
|
||||
}
|
||||
|
||||
for i, cert := range certs {
|
||||
|
Loading…
Reference in New Issue
Block a user