Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Dec 31, 2021
1 parent 9b237ef commit b1352ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ func (l *logger) Crit(message string) {
func (l *logger) Emerg(message string) {
fmt.Print(aurora.Red(message))
}

14 changes: 7 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,21 @@ func main() {
valid = false
}

if ! ok {
if !ok {
valid = false
log.Warning("Failed to verify certificate revocation status")
}

if err != nil {
valid = false
log.Warningf("Failed to verify certificate revocation status: %s", err)
}
valid = false
log.Warningf("Failed to verify certificate revocation status: %s", err)
}

if valid {
fmt.Println(Green("Certificate seems to be valid"))
os.Exit(0)
} else {
fmt.Println(Red("Certificate is invalid"))
} else {
fmt.Println(Red("Certificate is invalid"))
os.Exit(1)
}
}
Expand All @@ -134,7 +134,7 @@ func checkIfCertValid(server, hostname string) error {
func getCert(server, hostname string) (*x509.Certificate, error) {
conf := &tls.Config{
InsecureSkipVerify: true,
ServerName: hostname,
ServerName: hostname,
}

conn, err := tls.Dial("tcp", server, conf)
Expand Down

0 comments on commit b1352ed

Please sign in to comment.