File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ func checkSSLExpiry(domain string, logger *log.Logger) string {
2020 cleanDomain := strings .TrimPrefix (domain , "*." )
2121 certs := conn .ConnectionState ().PeerCertificates
2222
23+ status := "Info"
24+
2325 if len (certs ) > 0 {
2426 cert := certs [0 ]
2527
26- status := "Info"
27-
2828 // checking whether the certificate matches the domain being checked
2929 if err := cert .VerifyHostname (cleanDomain ); err != nil {
3030 status = "Danger"
@@ -65,7 +65,10 @@ func checkSSLExpiry(domain string, logger *log.Logger) string {
6565 expiredDate )
6666 }
6767
68- return fmt .Sprintf ("failed to perform a TLS handshake for the domain: %s\n " , cleanDomain )
68+ status = "Danger"
69+ return fmt .Sprintf ("%s: failed to perform a TLS handshake for the domain: %s\n " ,
70+ status ,
71+ cleanDomain )
6972}
7073
7174func checkSSLExpiryMulti (domains []string , logger * log.Logger ) string {
You can’t perform that action at this time.
0 commit comments