Support for showing "PublicKeyAlgorithm"

This commit is contained in:
guessi 2020-05-10 16:09:50 +08:00
parent 12305b6fe6
commit c21cdd5f3a
2 changed files with 29 additions and 23 deletions

View File

@ -22,29 +22,33 @@ install binary to your ${GOPATH} and run locally
${GOPATH}/bin/ssl-certs-checker --config hosts.yaml
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+-----------------------+
| Host | Common Name | DNS Names | Not Before | Not After | Issuer |
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+-----------------------+
| www.google.com:443 | www.google.com | www.google.com | 2020-02-12 11:47:41 +0000 UTC | 2020-05-06 11:47:41 +0000 UTC | GTS CA 1O1 |
| www.azure.com:443 | *.azure.com | *.azure.com | 2019-12-17 19:51:44 +0000 UTC | 2020-12-17 19:51:44 +0000 UTC | Microsoft IT TLS CA 4 |
| www.amazon.com:443 | www.amazon.com | amazon.com | 2019-09-18 00:00:00 +0000 UTC | 2020-08-23 12:00:00 +0000 UTC | DigiCert Global CA G2 |
| | | amzn.com | | | |
| | | uedata.amazon.com | | | |
| | | us.amazon.com | | | |
| | | www.amazon.com | | | |
| | | www.amzn.com | | | |
| | | corporate.amazon.com | | | |
| | | buybox.amazon.com | | | |
| | | iphone.amazon.com | | | |
| | | yp.amazon.com | | | |
| | | home.amazon.com | | | |
| | | origin-www.amazon.com | | | |
| | | buckeye-retail-website.amazon.com | | | |
| | | huddles.amazon.com | | | |
| | | p-nt-www-amazon-com-kalias.amazon.com | | | |
| | | p-yo-www-amazon-com-kalias.amazon.com | | | |
| | | p-y3-www-amazon-com-kalias.amazon.com | | | |
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+-----------------------+
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+--------------------+-----------------------+
| Host | Common Name | DNS Names | Not Before | Not After | PublicKeyAlgorithm | Issuer |
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+--------------------+-----------------------+
| www.google.com:443 | www.google.com | www.google.com | 2020-04-15 20:25:31 +0000 UTC | 2020-07-08 20:25:31 +0000 UTC | ECDSA | GTS CA 1O1 |
| www.azure.com:443 | *.azure.com | *.azure.com | 2019-12-17 19:51:44 +0000 UTC | 2020-12-17 19:51:44 +0000 UTC | RSA | Microsoft IT TLS CA 4 |
| www.amazon.com:443 | www.amazon.com | amazon.com | 2020-01-23 00:00:00 +0000 UTC | 2020-12-31 12:00:00 +0000 UTC | RSA | DigiCert Global CA G2 |
| | | amzn.com | | | | |
| | | buybox.amazon.com | | | | |
| | | corporate.amazon.com | | | | |
| | | home.amazon.com | | | | |
| | | iphone.amazon.com | | | | |
| | | konrad-test.amazon.com | | | | |
| | | mp3recs.amazon.com | | | | |
| | | p-nt-www-amazon-com-kalias.amazon.com | | | | |
| | | p-y3-www-amazon-com-kalias.amazon.com | | | | |
| | | p-yo-www-amazon-com-kalias.amazon.com | | | | |
| | | static.amazon.com | | | | |
| | | test-www.amazon.com | | | | |
| | | uedata.amazon.com | | | | |
| | | us.amazon.com | | | | |
| | | www.amazon.com | | | | |
| | | www.amzn.com | | | | |
| | | www.cdn.amazon.com | | | | |
| | | www.m.amazon.com | | | | |
| | | yellowpages.amazon.com | | | | |
| | | yp.amazon.com | | | | |
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+--------------------+-----------------------+
# License

View File

@ -74,6 +74,7 @@ func getCells(t table.Writer, host string, port int) {
strings.Join((*c).DNSNames, "\n"),
(*c).NotBefore,
(*c).NotAfter,
(*c).PublicKeyAlgorithm.String(),
(*c).Issuer.CommonName,
}})
}
@ -94,6 +95,7 @@ func prettyPrintCertsInfo(config string) {
"DNS Names",
"Not Before",
"Not After",
"PublicKeyAlgorithm",
"Issuer",
})