From be72a73082e1e04f4552440eac0caef08bb38970 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Tue, 17 Nov 2020 12:35:21 -0500 Subject: [PATCH] Fix potential panic --- core/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/service.go b/core/service.go index 0a025d8a..b3caa089 100644 --- a/core/service.go +++ b/core/service.go @@ -169,7 +169,7 @@ func (service *Service) call(result *Result) { result.Errors = append(result.Errors, err.Error()) return } - if response.TLS != nil { + if response.TLS != nil && len(response.TLS.PeerCertificates) > 0 { certificate := response.TLS.PeerCertificates[0] result.CertificateExpiration = certificate.NotAfter.Sub(time.Now()) }