The cross-platform tool to get certificate info (including self-signed).
Project description
Certificate
The cross-platform tool to get certificate info (including self-signed).
Installation
For most users, the recommended method to install is via pip:
pip install pycert
Import
from pycert import CertClient
Usage
Command from usual user:
from pycert import CertClient
client = CertClient(host="172.16.0.124")
print(client.get_all_info())
from pprint import pprint
from pycert import CertClient
cert = CertClient('pypi.org')
pprint(cert.get_all_info())
{
"version": "v3",
"valid_from": "2021-10-22T18:41:11",
"valid_to": "2022-11-23T18:41:10",
"is_valid": true,
"is_self_signed": false,
"issuer": {
"C": "BE",
"O": "GlobalSign nv-sa",
"CN": "GlobalSign Atlas R3 DV TLS CA H2 2021"
},
"subject": {
"CN": "www.python.org"
},
"signature_algorithm": "sha256",
"serial_number": "1B7C6CD03E8E071BE48C2B1A7994075",
"alternative_name": [
"DNS:www.python.org",
"DNS:*.python.org",
"DNS:docs.python.org",
"DNS:downloads.python.org",
"DNS:pypi.python.org"
],
"fingerprint": "CE1F8748D2DA0265B329F1DFD70047DCEF6CD8FB"
}
Useful links
Changelog:
unreleased
1.0.3 (4.06.2022)
- Log name changed to
CertClient
- Log format changed according other modules
1.0.2 (17.04.2022)
- External logger added
1.0.1 (14.12.2021)
- refactored "get_all_info": not it gets issuer and subject dynamically
- get_serial_number: returns upper hexadecimal without first bit now
- is_self_signed: preliminary method added (can be changed in future)
- get_all_methods fixed: now it returns CertClient methods
- get_alt_name refactored to get extension using oid
1.0.0 (8.12.2021)
- New method added: get_fingerprint()
- get_all_info() extended with thumbprint, added params (fp_brief=True, signature_algorithm_brief=True)
- get_signature_algorithm() updated to return full or brief signature info
0.0.12 (30.11.2021)
- example added
0.0.1 (30.11.2021)
- initial commit
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycert-1.0.4.tar.gz
(17.3 kB
view details)
Built Distribution
pycert-1.0.4-py3-none-any.whl
(17.5 kB
view details)
File details
Details for the file pycert-1.0.4.tar.gz
.
File metadata
- Download URL: pycert-1.0.4.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71fa4fc67929baf4a1e4c86d661c41fffb59373936aec4e622058b7b410771e4 |
|
MD5 | 17f134a2d13dcf2866b95c5d3d0fd6c0 |
|
BLAKE2b-256 | e5e2ba40b635cb3bce6f74c0e20aea3db5415fb737125255ef09e51ee54b3421 |
File details
Details for the file pycert-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: pycert-1.0.4-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2b4b26ca268b408ffe4159b067320f7006fa39b796ffa37e366d2a44279036e |
|
MD5 | 6feabacc95c64d7238aa8212301f65e1 |
|
BLAKE2b-256 | 62de313a1a90a3af654439c4b9572156528a169bda4a74d270f42c913d3469bc |