diff options
| author | Franck Cuny <franck@fcuny.net> | 2022-11-13 11:36:39 -0800 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2022-11-13 13:16:37 -0800 |
| commit | 92658d136f77dbb1cf4028e8a69e9c1402155ef9 (patch) | |
| tree | a959e5422544274e13aab44fb747b981f89040db /src/x509-info/Cargo.lock | |
| parent | Merge pull request 'fcuny/minor-changes' (#2) from fcuny/reduce-build-time in... (diff) | |
| download | x-92658d136f77dbb1cf4028e8a69e9c1402155ef9.tar.gz | |
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
```
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
