aia
AIA chasing through OpenSSL for TLS certificate chain building and verifying
What it is and what it does
AIA is a Python library that solves a specific TLS problem: when a web server doesn't send the complete certificate chain (excluding only the root), standard validation fails. This library fetches the missing intermediate certificates by reading the AIA extension in each certificate and validating the chain through OpenSSL, then caches results in memory to avoid re-validating the same certificates.
It provides multiple integration points: a simple `AIASession` wrapper around `urllib.request.urlopen`, methods to extract validated certificate chains as PEM data, and SSL context objects compatible with `requests`, `httpx`, and other HTTP libraries. The library is intentionally narrow—it handles only the certificate-chain problem, not general HTTP functionality—and works synchronously, though the description shows patterns for wrapping it in async code.
Use it for:
- Validate HTTPS connections to servers with incomplete certificate chains when you cannot modify the server configuration.
- Build a validated certificate chain for use with third-party HTTP libraries like requests or httpx that need explicit certificate verification.
- Cache and reuse validated certificate chains in memory across multiple requests to the same server within a session.
- Work around CPython's lack of automatic AIA chasing in environments where upgrading the server or using a proxy is not an option.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Builds and validates TLS certificate chains by fetching missing intermediate certificates via the AIA (Authority Information Access) extension, working around CPython issue 18617 where servers don't provide the full chain.
Yes, but only if you have a specific server-certificate-chain problem and cannot fix it upstream. The package is narrow, low-friction to install, and has no dependencies beyond OpenSSL. However, its pre-alpha status and dormant maintenance (last release 2021-11-27) mean no active support or updates; use it as a workaround, not a long-term solution. No known vulnerabilities.
Install
aia on PyPI
pip
pip install aiauv
uv add aiapoetry
poetry add aiaInstalling aia
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2021-11-27 and last commit 2024-06-03—so expect no active bug fixes or updates, though the codebase remains archived and available.
License in practice
Licensed under 2-clause BSD (permissive), so you can use, modify, and distribute freely with minimal restrictions, provided you include the license text.
Quickstart
pip install aia
from aia import AIASession
aia_session = AIASession()
response = aia_session.urlopen("https://example.com")
OpenSSL must be installed as an external system dependency; certificate fetching and validation are blocking operations, so async use requires a workaround like asyncio.run_in_executor().
Verify before relying
- Whether the package works reliably with modern Python versions beyond 3.9, given its pre-alpha status and dormant maintenance.
- Whether OpenSSL version requirements or compatibility issues exist that might affect installation on specific systems.
- Real-world success rate when chasing AIA chains for servers with complex or non-standard certificate configurations.
Package facts
| License | 2-clause BSD (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,721 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 218,845/month — #9,333 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aia-0.2.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
certifiCertifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
certvalidatorValidates X.509 certificates and certificate…
permissive · top 15,000 on PyPI
pip-system-certsAutomatically configures Python to use the…
permissive · top 5,000 on PyPI
truststoreTruststore exposes native system certificate…
permissive · top 1,000 on PyPI
secure-smtplibProvides secure SMTP subclasses with TLS/SSL…
unclear · top 15,000 on PyPI
pyhanko-certvalidatorValidates X.509 certificate paths with support…
permissive · top 5,000 on PyPI
python-certifi-win32Patches certifi at runtime to include…
permissive · top 15,000 on PyPI
wassimaWassima provides access to your operating…
permissive · top 5,000 on PyPI
trustmetrustme generates fake TLS certificates and…
permissive · top 5,000 on PyPI
wincertstoreAccesses Windows system certificate stores (CA…
permissive · top 15,000 on PyPI