diff --git a/13.go b/13.go index aacb821..f50741d 100644 --- a/13.go +++ b/13.go @@ -532,23 +532,10 @@ func (hs *serverHandshakeState) sendSessionTicket13() error { return nil } -// QuietError is an error wrapper that prevents the verbose handshake log -// dump on errors. Exposed for use by GetCertificate. -type QuietError struct { - Err error -} - -func (e QuietError) Error() string { - return e.Err.Error() + " [quiet]" -} - func (hs *serverHandshakeState) traceErr(err error) { if err == nil { return } - if _, ok := err.(QuietError); ok { - return - } if os.Getenv("TLSDEBUG") == "error" { if hs != nil && hs.clientHello != nil { os.Stderr.WriteString(hex.Dump(hs.clientHello.marshal())) diff --git a/handshake_server.go b/handshake_server.go index 0ba2ac7..32630d8 100644 --- a/handshake_server.go +++ b/handshake_server.go @@ -282,9 +282,7 @@ Curves: hs.cert, err = c.config.getCertificate(hs.clientHelloInfo()) if err != nil { - if _, ok := err.(QuietError); ok { - c.out.traceErr, c.in.traceErr = nil, nil - } + c.out.traceErr, c.in.traceErr = nil, nil // disable tracing c.sendAlert(alertInternalError) return false, err }