From 4dc53e9cb644b4a5c1c5ecb89896cf244bf0eeab Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Sun, 7 Jun 2020 09:10:02 -0500 Subject: [PATCH] Tweak "expires next" phrasing Put the emphasis on what cert in the chain expires next, but still make the expiration date prominent. --- README.md | 6 +++--- cmd/check_cert/main.go | 2 +- cmd/lscert/main.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 96d00e04..69804f68 100644 --- a/README.md +++ b/README.md @@ -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** @@ -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 @@ -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 diff --git a/cmd/check_cert/main.go b/cmd/check_cert/main.go index a5081ba4..ec3bbeef 100644 --- a/cmd/check_cert/main.go +++ b/cmd/check_cert/main.go @@ -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, diff --git a/cmd/lscert/main.go b/cmd/lscert/main.go index 44c36cd0..53d64947 100644 --- a/cmd/lscert/main.go +++ b/cmd/lscert/main.go @@ -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"),