crl-checker-1.0.7
توضیحات
Check if certificate is revoked using the x509 CRL extension
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | crl-checker-1.0.7 |
| نام | crl-checker |
| نسخه کتابخانه | 1.0.7 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Michal Sadowski |
| ایمیل نویسنده | misad90@gmail.com |
| آدرس صفحه اصلی | https://github.com/fulder/crl-checker |
| آدرس اینترنتی | https://pypi.org/project/crl-checker/ |
| مجوز | MIT |

# crl-checker
This small python library checks if a specific certificate is revoked using the
CRL defined in the x509 CRL distribution points
extension (https://datatracker.ietf.org/doc/html/rfc5280.html#section-4.2.1.13)
# Installation
`pip install crl-checker`
# Usage
Checking revocation using PEM encoded certificate
```python3
from crl_checker import check_revoked, Revoked, Error
cert_pem = """
-----BEGIN CERTIFICATE-----
<CERTIFICATE_PEM_BYTES>
-----END CERTIFICATE-----
"""
try:
check_revoked(cert_pem)
except Revoked as e:
print(f"Certificate revoked: {e}")
except Error as e:
print(f"Revocation check failed. Error: {e}")
raise
```
Checking revocation using an already loaded cryptography [x509.Certificate](https://cryptography.io/en/latest/x509/reference/#cryptography.x509.Certificate):
```python3
from cryptography import x509
from crl_checker import check_revoked_crypto_cert, Revoked, Error
cert : x509.Certificate = ...
try:
check_revoked_crypto_cert(cert)
except Revoked as e:
print(f"Certificate revoked: {e}")
except Error as e:
print(f"Revocation check failed. Error: {e}")
raise
```
نیازمندی
| مقدار | نام |
|---|---|
| >=39.0.1,<41.0.0 | cryptography |
| >=2.28.2,<3.0.0 | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl crl-checker-1.0.7:
pip install crl-checker-1.0.7.whl
نصب پکیج tar.gz crl-checker-1.0.7:
pip install crl-checker-1.0.7.tar.gz