We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbe49a9 commit 9a13145Copy full SHA for 9a13145
1 file changed
go-server-server/go/auth.go
@@ -4,6 +4,7 @@ import (
4
"log"
5
"net/http"
6
"strings"
7
+ "strconv"
8
)
9
10
func CommonNameMatch(r *http.Request) bool {
@@ -44,7 +45,7 @@ func CommonNameMatch(r *http.Request) bool {
44
45
46
commonNames := make([]string, 0)
47
for _, peercert := range r.TLS.PeerCertificates {
- commonNames = append(commonNames, peercert.Subject.CommonName)
48
+ commonNames = append(commonNames, strconv.Quote(peercert.Subject.CommonName))
49
}
50
log.Printf("error: Authentication Failed! None of the common names in the client cert chain" +
51
" matched any of the trusted common names. Client cert common names: %v", commonNames)
0 commit comments