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 ${GOPATH}/bin/ssl-certs-checker --config hosts.yaml
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+-----------------------+ +--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+--------------------+-----------------------+
| Host | Common Name | DNS Names | Not Before | Not After | Issuer | | Host | Common Name | DNS Names | Not Before | Not After | PublicKeyAlgorithm | 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.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 | Microsoft IT TLS CA 4 | | 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 | 2019-09-18 00:00:00 +0000 UTC | 2020-08-23 12:00:00 +0000 UTC | DigiCert Global CA G2 | | 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 | | | | | | | amzn.com | | | | |
| | | uedata.amazon.com | | | | | | | buybox.amazon.com | | | | |
| | | us.amazon.com | | | | | | | corporate.amazon.com | | | | |
| | | www.amazon.com | | | | | | | home.amazon.com | | | | |
| | | www.amzn.com | | | | | | | iphone.amazon.com | | | | |
| | | corporate.amazon.com | | | | | | | konrad-test.amazon.com | | | | |
| | | buybox.amazon.com | | | | | | | mp3recs.amazon.com | | | | |
| | | iphone.amazon.com | | | | | | | p-nt-www-amazon-com-kalias.amazon.com | | | | |
| | | yp.amazon.com | | | | | | | p-y3-www-amazon-com-kalias.amazon.com | | | | |
| | | home.amazon.com | | | | | | | p-yo-www-amazon-com-kalias.amazon.com | | | | |
| | | origin-www.amazon.com | | | | | | | static.amazon.com | | | | |
| | | buckeye-retail-website.amazon.com | | | | | | | test-www.amazon.com | | | | |
| | | huddles.amazon.com | | | | | | | uedata.amazon.com | | | | |
| | | p-nt-www-amazon-com-kalias.amazon.com | | | | | | | us.amazon.com | | | | |
| | | p-yo-www-amazon-com-kalias.amazon.com | | | | | | | www.amazon.com | | | | |
| | | p-y3-www-amazon-com-kalias.amazon.com | | | | | | | www.amzn.com | | | | |
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+-----------------------+ | | | www.cdn.amazon.com | | | | |
| | | www.m.amazon.com | | | | |
| | | yellowpages.amazon.com | | | | |
| | | yp.amazon.com | | | | |
+--------------------+----------------+---------------------------------------+-------------------------------+-------------------------------+--------------------+-----------------------+
# License # License

View File

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