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.9 (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-2.0.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocsp_checker-2.0.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ocsp_checker-2.0.1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ocsp_checker-2.0.1.tar.gz
Algorithm Hash digest
SHA256 52e10d181d314b5c86e3f94fd7cf985d3450e82a0674c62327cabe031ec28372
MD5 a63f8988c24dc1b80d50589dd109919a
BLAKE2b-256 c858d20f3c4a4c6969a795cbe36ecd1e1a65163d4a922310fc1445b1713f3a60

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocsp_checker-2.0.1.tar.gz:

Publisher: main.yml on gattjoe/OCSPChecker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: ocsp_checker-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ocsp_checker-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f77d00d3436eec9ee4e73fc2e2fa9fcc35f0c7463f1ad3c035741cc3c3aa746a
MD5 6d6f4aae9c57b8ec32a9716e8abbbfa2
BLAKE2b-256 fc8781faa9bcd25b1f15076993f059117db914f9431bbbb46d96e4e07ccb5fbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocsp_checker-2.0.1-py3-none-any.whl:

Publisher: main.yml on gattjoe/OCSPChecker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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