Skip to content

Commit

Permalink
Tweak "expires next" phrasing
Browse files Browse the repository at this point in the history
Put the emphasis on what cert in the chain expires next, but
still make the expiration date prominent.
  • Loading branch information
atc0005 committed Jun 7, 2020
1 parent 8aa2778 commit 4dc53e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ and `CRITICAL` age threshold values with somewhat arbitrary numbers.

```ShellSession
.\check_cert.exe --server www.google.com --port 443 --age-critical 50 --age-warning 55
OK: leaf cert "www.google.com" expires next on 2020-08-12 12:08:31 +0000 UTC
OK: leaf cert "www.google.com" expires next (on 2020-08-12 12:08:31 +0000 UTC)

**ERRORS**

Expand Down Expand Up @@ -363,7 +363,7 @@ CERTIFICATES | SUMMARY

- OK: 2 certs found for service running on www.google.com at port 443
- OK: Provided hostname matches discovered certificate
- FYI: leaf cert "www.google.com" expires next on 2020-08-12 12:08:31 +0000 UTC
- FYI: leaf cert "www.google.com" expires next (on 2020-08-12 12:08:31 +0000 UTC)

============================
CERTIFICATES | CHAIN DETAILS
Expand Down Expand Up @@ -405,7 +405,7 @@ CERTIFICATES | SUMMARY
- OK: 2 certs found for service running on www.google.com at port 443
- OK: Provided hostname matches discovered certificate
- WARNING: 1 certificates expiring soon
- FYI: leaf cert "www.google.com" expires next on 2020-08-12 12:08:31 +0000 UTC
- FYI: leaf cert "www.google.com" expires next (on 2020-08-12 12:08:31 +0000 UTC)

============================
CERTIFICATES | CHAIN DETAILS
Expand Down
2 changes: 1 addition & 1 deletion cmd/check_cert/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func main() {

nagiosExitState.LastError = nil
nagiosExitState.ServiceOutput = fmt.Sprintf(
"%s: %s cert %q expires next on %s",
"%s: %s cert %q expires next (on %s)",
"OK",
certs.ChainPosition(nextCertToExpire),
nextCertToExpire.Subject.CommonName,
Expand Down
2 changes: 1 addition & 1 deletion cmd/lscert/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func main() {

nextCertToExpire := certs.NextToExpire(certChain)
fmt.Printf(
"- FYI: %s cert %q expires next on %s",
"- FYI: %s cert %q expires next (on %s)",
certs.ChainPosition(nextCertToExpire),
nextCertToExpire.Subject.CommonName,
nextCertToExpire.NotAfter.Format("2006-01-02 15:04:05 -0700 MST"),
Expand Down

0 comments on commit 4dc53e9

Please sign in to comment.