From 0c7b858b3eeb40d281e60e74486c7bf8177c9334 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sat, 18 Aug 2012 15:50:33 -0700 Subject: [PATCH] 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 --- handshake_server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/handshake_server.go b/handshake_server.go index 76adc54..e5049a2 100644 --- a/handshake_server.go +++ b/handshake_server.go @@ -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 {