Skip to main content

Library used to check the OCSP revocation status for a x509 digital certificate.

Project description

OCSPChecker

Downloads PyPI Version Python version

Overview

OCSPChecker is a python package based on Alban Diquet's nassl wrapper and the Python Cryptographic Authority's cryptography package. Relying on a web browser to check the revocation status of a x509 digital certificate has been broken from the beginning, and validating certificates outside of the web browser is a manual process. OCSP-Checker aims to solve this by providing an automated means to check the OCSP revocation status for a x509 digital certificate.

Pre-requisites

Python - Python 3.8 (64-bit) and above.

Installation

It is strongly recommended to run ocsp-checker in a virtual environment. This will prevent you from impacting your system python when installing its dependencies. venv is a good option, with an example below:

python -m venv ocsp-checker cd ocsp-checker && source bin/activate

Once your virtual environment is activated, install ocsp-checker as follows:

pip install ocsp-checker

Usage

>>> from ocspchecker import ocspchecker
>>> ocsp_request = ocspchecker.get_ocsp_status("github.com")

Sample Output

Sample output below, let me know if you want to add more fields/information to the output.

['Host: github.com:443', 'OCSP URL: http://ocsp.digicert.com', 'OCSP Status: GOOD']

PLEASE NOTE: If you run this on a network with a MITM SSL proxy, you may receive unintended results (see below):

["Error: Certificate Authority Information Access (AIA) Extension Missing. Possible MITM Proxy."]

Command Line Usage

OCSPChecker can now be used at the command line. The format is:

usage: ocspchecker [-h] --target target [--port port]

Check the OCSP revocation status for a x509 digital certificate.

optional arguments:
  -h, --help            show this help message and exit
  --target target, -t target
                        The target to test
  --port port, -p port  The port to test (default is 443)

For example:

ocspchecker -t github.com

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

ocsp_checker-1.9.14.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

ocsp_checker-1.9.14-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file ocsp_checker-1.9.14.tar.gz.

File metadata

  • Download URL: ocsp_checker-1.9.14.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ocsp_checker-1.9.14.tar.gz
Algorithm Hash digest
SHA256 5e4955adc069e1aa876af98e0b0c94d72d469a125e8a53ffc247c2c0734ddb58
MD5 6a7914b03632e454b6d0dcb17511e85e
BLAKE2b-256 55b104a3de4099b1bfce01cf8bb051a0f4e9a3abc4bdaf96c4f1ce6f19e2207a

See more details on using hashes here.

File details

Details for the file ocsp_checker-1.9.14-py3-none-any.whl.

File metadata

File hashes

Hashes for ocsp_checker-1.9.14-py3-none-any.whl
Algorithm Hash digest
SHA256 3bc0ef9d6d1eb1d748c4a830ef84295be696fc226d1e5d717f629e1ab1e33f12
MD5 07e4aa2af25e2602d4d9fb96fdf6f1c7
BLAKE2b-256 59564b18e08edaac1323f6c6b7f67400b021818b47867060b2ce5af9ba6cf5f4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page