Skip to main content

certvalidator

This library started as a fork of wbond/certvalidator with patches for pyHanko, but has since diverged considerably from its parent repository.

GitHub issues are disabled on this repository. Bug reports regarding this library should be submitted to the pyHanko issue tracker. Similarly, questions regarding this library's usage can be asked in the pyHanko discussion forum.

pyhanko-certvalidator is a Python library for validating X.509 certificates paths. It supports various options, including: validation at a specific moment in time, whitelisting and revocation checks.

Features

  • X.509 path building
  • X.509 basic path validation
    • Signatures
      • RSA (including PSS padding), DSA, ECDSA and EdDSA algorithms.
    • Name chaining
    • Validity dates
    • Basic constraints extension
      • CA flag
      • Path length constraint
    • Key usage extension
    • Extended key usage extension
    • Certificate policies
      • Policy constraints
      • Policy mapping
      • Inhibit anyPolicy
    • Failure on unknown/unsupported critical extensions
  • Blacklisting hash algorithms
  • Revocation checks
    • CRLs
      • Indirect CRLs
      • Delta CRLs
    • OCSP checks
      • Delegated OCSP responders
    • Disable, require or allow soft failures
    • Caching of CRLs/OCSP responses
  • CRL and OCSP HTTP clients
  • Point-in-time validation
  • Name constraints
  • Attribute certificate support

Current Release

pypi

Dependencies

  • asn1crypto
  • cryptography
  • uritools
  • oscrypto
  • requests or aiohttp (use the latter for more efficient asyncio, requires resource management)
  • Python 3.7 or higher

Note on compatibility

Starting with pyhanko-certvalidator version 0.17.0, the library has been refactored to use asynchronous I/O as much as possible. Most high-level API entrypoints can still be used synchronously, but have been deprecated in favour of their asyncio equivalents. As part of this move, the OCSP and CRL clients now have two separate implementations: a requests-based one, and an aiohttp-based one. The latter is probably more performant, but requires more resource management efforts on the caller's part, which was impossible to implement without making major breaking changes to the public API that would make the migration path more complicated. Therefore, the requests-based fetcher will remain the default for the time being.

Installation

pip install pyhanko-certvalidator

License

certvalidator is licensed under the terms of the MIT license. See the LICENSE file for the exact license text.

Testing

Test framework

Tests are written using pytest and require an asynchronous test case backend such as pytest-asyncio.

Test cases

The test cases for the library are comprised of:

Existing releases can be found at https://pypi.org/project/pyhanko-certvalidator.

Release files for pyhanko-certvalidator 0.32.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhanko-certvalidator 0.32.1
File Size Uploaded
pyhanko_certvalidator-0.32.1.tar.gz 597.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyhanko-certvalidator 0.32.1
File Interpreter ABI Platform
pyhanko_certvalidator-0.32.1-py3-none-any.whl Python 3 none any Details

Total release size: 712.9 kB

Release files / pyhanko_certvalidator-0.32.1.tar.gz

Download URL pyhanko_certvalidator-0.32.1.tar.gz
Size 597.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4780e5697f9d8a02fb4648a1b8f2cd0df67615cae491298491467ca53c0fc08d
BLAKE2b-256 checksum
How to use checksums
2d94559f4ffadb51fbc33d0ce8cee34f1a32f1ee6d4ada3495d6e7ef1c9d1a0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / pyhanko_certvalidator-0.32.1-py3-none-any.whl

Download URL pyhanko_certvalidator-0.32.1-py3-none-any.whl
Size 115.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76100cdda13bd085beaa94d4b9080fe6f4ee67248976ec9a19c4d58642558a2b
BLAKE2b-256 checksum
How to use checksums
f44981f92016547077d004a883864da9148e725741f365064a1c9dfe5558f49a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.32.1 This release

2 release files

0.32.0

2 release files

0.31.4

2 release files

0.31.3

2 release files

0.31.2

2 release files

0.30.2

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.8

2 release files

0.26.7

2 release files

0.26.6

2 release files

0.26.5

2 release files

0.26.4

2 release files

0.26.3

2 release files

0.26.2

2 release files

0.26.1

2 release files

0.26.0

2 release files

0.24.1

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.2

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.19.8

2 release files

0.19.7

2 release files

0.19.6

2 release files

0.19.4

2 release files

0.19.2

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.4

2 release files

0.17.3

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.1

1 release file

0.12.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page