transport/tls: clarify docs & error message language

This commit is contained in:
Christian Schwarz
2019-03-15 17:17:25 +01:00
parent 5595cff6a6
commit a7993d18c6
2 changed files with 11 additions and 8 deletions

View File

@@ -84,7 +84,7 @@ func (l *ClientAuthListener) Accept() (tcpConn *net.TCPConn, tlsConn *tls.Conn,
peerCerts = tlsConn.ConnectionState().PeerCertificates
if len(peerCerts) < 1 {
err = errors.New("unexpected number of certificates presented by TLS client")
err = errors.New("client must present full RFC5246:7.4.2 TLS client certificate chain")
goto CloseAndErr
}
cn = peerCerts[0].Subject.CommonName