From 92658d136f77dbb1cf4028e8a69e9c1402155ef9 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 13 Nov 2022 11:36:39 -0800 Subject: ref: print succinct or detailed information about a cert Most of the time, all I want is to know when the certificate is going to expire. In some cases, I might want to see more details. This change introduce a new argument to the CLI to select what level of information to print. The new option (`--format`) will by default print the short summary, like this: ``` > ./target/debug/x509-info twitter.com twitter.com is valid until Mon, 12 Dec 2022 15:59:59 -0800 (29 days left) ``` While with `--format long` we get the following: ``` > ./target/debug/x509-info --format long twitter.com certificate version: V3 serial: 0d:e1:52:69:6b:2f:96:70:d6:c7:db:18:ce:1c:71:a0 subject: C=US, ST=California, L=San Francisco, O=Twitter, Inc., CN=twitter.com issuer: C=US, O=DigiCert Inc, CN=DigiCert TLS RSA SHA256 2020 CA1 validity not before : Sun, 12 Dec 2021 16:00:00 -0800 not after : Mon, 12 Dec 2022 15:59:59 -0800 validity days : 364 remaining days: 29 SANs: DNS:twitter.com DNS:www.twitter.com ``` --- src/x509-info/.drone.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'src/x509-info/.drone.yml') diff --git a/src/x509-info/.drone.yml b/src/x509-info/.drone.yml index f3ec80f..7c469a4 100644 --- a/src/x509-info/.drone.yml +++ b/src/x509-info/.drone.yml @@ -33,6 +33,7 @@ steps: - nix develop --command cargo test - nix build . - nix run . -- fcuny.net + - nix run . -- --format long fcuny.net --- kind: pipeline type: docker -- cgit v1.2.3