certdump: only close connection if Dial succeeds.
This commit is contained in:
@@ -240,10 +240,10 @@ func displayAllCertsWeb(uri string, leafOnly bool) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
state = conn.ConnectionState()
|
state = conn.ConnectionState()
|
||||||
}
|
}
|
||||||
|
conn.Close()
|
||||||
} else {
|
} else {
|
||||||
Warn(err, "TLS verification error with server name %s", ci.Host)
|
Warn(err, "TLS verification error with server name %s", ci.Host)
|
||||||
}
|
}
|
||||||
conn.Close()
|
|
||||||
|
|
||||||
if len(state.PeerCertificates) == 0 {
|
if len(state.PeerCertificates) == 0 {
|
||||||
Warnx("no certificates found")
|
Warnx("no certificates found")
|
||||||
|
|||||||
Reference in New Issue
Block a user