Skip to content

Commit 27a458a

Browse files
authored
Merge pull request #19 from mtojek/6640-hide-warning
chore: hide Lets Encrypt cert warning
2 parents 20a4fc2 + 8babe5b commit 27a458a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/tlsdial/tlsdial.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ func Config(host string, base *tls.Config) *tls.Config {
109109
// detecting SSL MiTM.
110110
opts.Roots = bakedInRoots()
111111
_, bakedErr := cs.PeerCertificates[0].Verify(opts)
112-
if debug() {
112+
if bakedErr != nil && debug() {
113113
log.Printf("tlsdial(bake %q): %v", host, bakedErr)
114-
} else if bakedErr != nil {
115114
if _, loaded := tlsdialWarningPrinted.LoadOrStore(host, true); !loaded {
116115
if errSys == nil {
117116
log.Printf("tlsdial: warning: server cert for %q is not a Let's Encrypt cert", host)

0 commit comments

Comments
 (0)