pkg: Remove stray printfs

release-3.4
John Millikin 2019-07-04 07:13:38 +09:00
parent 5824421f8b
commit 91472797ff
No known key found for this signature in database
GPG Key ID: 1F7686B8DA217791
2 changed files with 0 additions and 5 deletions

View File

@ -278,7 +278,6 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) {
}
if verifyCertificate != nil {
cfg.VerifyPeerCertificate = func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
fmt.Fprintf(os.Stderr, "== VERIFY PEER CERT (%d verified chains)\n", len(verifiedChains))
for _, chains := range verifiedChains {
if len(chains) != 0 {
if verifyCertificate(chains[0]) {
@ -286,7 +285,6 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) {
}
}
}
fmt.Fprintf(os.Stderr, "== VERIFY PEER CERT\n")
return errors.New("client certificate authentication failed")
}
}
@ -364,7 +362,6 @@ func (info TLSInfo) ServerConfig() (*tls.Config, error) {
}
cs := info.cafiles()
fmt.Fprintf(os.Stderr, "== CAFILES: %v\n", cs)
if len(cs) > 0 {
cp, err := tlsutil.NewCertPool(cs)
if err != nil {

View File

@ -21,7 +21,6 @@ import (
"fmt"
"io/ioutil"
"net"
"os"
"strings"
"sync"
)
@ -99,7 +98,6 @@ func checkSAN(ctx context.Context, tlsConn *tls.Conn) error {
st := tlsConn.ConnectionState()
if certs := st.PeerCertificates; len(certs) > 0 {
addr := tlsConn.RemoteAddr().String()
fmt.Fprintf(os.Stderr, "checkSAN(addr=%q, certs=%v)\n", addr, certs)
return checkCertSAN(ctx, certs[0], addr)
}
return nil