Browse Source

pkg: Remove stray printfs

John Millikin 6 years ago
parent
commit
91472797ff
2 changed files with 0 additions and 5 deletions
  1. 0 3
      pkg/transport/listener.go
  2. 0 2
      pkg/transport/listener_tls.go

+ 0 - 3
pkg/transport/listener.go

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

+ 0 - 2
pkg/transport/listener_tls.go

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