Add SHA-1 fingerprint
This commit is contained in:
parent
4fba7dbabf
commit
e1f7fa0989
|
@ -11,6 +11,7 @@ from urllib.parse import urlparse
|
|||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
from tabulate import tabulate
|
||||
|
||||
SAN_GROUPING = 4
|
||||
|
@ -111,6 +112,10 @@ if __name__ == "__main__":
|
|||
["Valid from", cert.not_valid_before_utc],
|
||||
["Valid to", cert.not_valid_after_utc],
|
||||
["Issuer", cert.issuer.rfc4514_string()],
|
||||
[
|
||||
"SHA1 fingerprint",
|
||||
":".join([format(i, "02x") for i in cert.fingerprint(hashes.SHA1())]),
|
||||
],
|
||||
]
|
||||
|
||||
print(tabulate(table, tablefmt="plain"))
|
||||
|
|
Loading…
Reference in a new issue