Fix getSSLClietnDN returns DN instead CN

This commit is contained in:
Héctor Hurtado
2020-09-11 11:18:11 +02:00
parent a17cc4838d
commit c7567fb4cc
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1237,8 +1237,8 @@ func TestGetSSLClientDNReturnsCorrectDN(t *testing.T) {
res := w.Result()
if body, _ := ioutil.ReadAll(res.Body); string(body) != h.Request.TLS.VerifiedChains[0][0].Subject.CommonName {
t.Errorf("Body mismatch. Expected: %q, got: %q", h.Request.TLS.VerifiedChains[0][0].Subject.CommonName, string(body))
if body, _ := ioutil.ReadAll(res.Body); string(body) != h.Request.TLS.VerifiedChains[0][0].Subject.String() {
t.Errorf("Body mismatch. Expected: %q, got: %q", h.Request.TLS.VerifiedChains[0][0].Subject.String(), string(body))
}
}