Skip to main content

AIA Chaser

Poetry License: MIT Linter: Ruff Code style: black Imports: isort pre-commit

PyPI - Version PyPI - Python Version

Read the Docs

This package helps automatically retrieve missing certificates to complete a secure SSL chain of trust. It ensures that even if a server doesn’t provide the full certificate chain, your connection remains secure.

What is AIA Chasing?

AIA (Authority Information Access) is a feature in SSL certificates, defined in RFC 5280, that points to:

  • CA Issuers – To fetch missing issuer certificates.
  • OCSP – To check if a certificate has been revoked.

By following these links, this package helps fill in the gaps, ensuring your SSL connections don’t fail due to missing certificates.

Why Does This Matter?

Sometimes, a website works fine in your browser but fails when using curl or Python’s requests library. That is because browsers often handle AIA chasing automatically, while other tools don’t. If you’ve run into SSL errors like this, this package can help! :guide_dog:.

Examples

The following examples showcase how to use this library with some typical Python HTTP libraries.

  • Standard library's urlopen:
from urllib.request import urlopen
from aia_chaser import AiaChaser

url = "https://..."

chaser = AiaChaser()
context = chaser.make_ssl_context_for_url(url)
response = urlopen(url, context=context)
import requests
from aia_chaser import AiaChaser
from aia_chaser.utils.cert_utils import temp_pem_file

url = "https://..."

chaser = AiaChaser()
ca_chain = chaser.fetch_ca_chain_for_url(url)
with temp_pem_file(ca_chain) as pem_path:
    response = requests.get(url, verify=str(pem_path))
import urllib3
from aia_chaser import AiaChaser

url = "https://..."

chaser = AiaChaser()
context = chaser.make_ssl_context_for_url(url)
with urllib3.PoolManager(ssl_context=context) as pool:
    respone = pool.request("GET", url)
import httpx
from aia_chaser import AiaChaser

url = "https://..."

chaser = AiaChaser()
context = chaser.make_ssl_context_for_url(url)
# Note: httpx does not follow redirects by default
with httpx.Client(verify=context, follow_redirects=True) as client:
    response = client.get(url)
import aiohttp
from aia_chaser import AiaChaser

url = "https://..."

chaser = AiaChaser()
context = chaser.make_ssl_context_for_url(url)
async with aiohttp.ClientSession() as session:
    async with session.get(url, ssl=context) as response:
        data = await response.text()
import pycurl
from aia_chaser import AiaChaser
from aia_chaser.utils.cert_utils import temp_pem_file

url = "https://..."

chaser = AiaChaser()
ca_chain = chaser.fetch_ca_chain_for_url(url)
with temp_pem_file(ca_chain) as pem_path:
    curl = pycurl.Curl()
    curl.setopt(pycurl.URL, url)
    curl.setopt(pycurl.CAINFO, str(pem_path))
    curl.perform()
    curl.close()

Acknowledgments

  • This project is based on aia.

Metadata

Release files for aia-chaser 3.4.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 aia-chaser 3.4.1
File Size Uploaded
aia_chaser-3.4.1.tar.gz 21.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aia-chaser 3.4.1
File Interpreter ABI Platform
aia_chaser-3.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.6 kB

Release files / aia_chaser-3.4.1.tar.gz

Download URL aia_chaser-3.4.1.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cc3a155530278fda5d84d2f0db630e9b58e7cfeb834e0c4b8c90ed5c51953a8
BLAKE2b-256 checksum
How to use checksums
ec61931ebdfe340963e1618fe88f43c44aa07118fe897096597c4cc187c9e505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / aia_chaser-3.4.1-py3-none-any.whl

Download URL aia_chaser-3.4.1-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
714849f01a4550748a0f389ae358ad954d0c0907da7aa93955c85c098d0cf2b9
BLAKE2b-256 checksum
How to use checksums
f04191ea50419dde52f806185e4e93c909a046228e3a1a4269f0789707721253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

3.4.1 This release

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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