Skip to content

Exceptions

aia_chaser.exceptions

AiaChaseExhaustedError

Bases: AiaChaserError

Failed to retrieve the issuing CA after exhausting all AIA URLs.

PARAMETER DESCRIPTION
errors

A collection of errors encountered while attempting to fetch the CA.

TYPE: Sequence[CertificateDownloadError | CertificateParseError]

ATTRIBUTE DESCRIPTION
errors

A collection of errors encountered while attempting to fetch the CA.

AiaChaserError

Bases: Exception

Base exception for aia_chaser errors.

AiaChaserWarning

Bases: UserWarning

Base warning for aia_chaser warnings.

CertificateChainError

Bases: AiaChaserError

Error detected in a certificates chain of trust.

CertificateDownloadError

Bases: AiaChaserError

Error downloading a certificate.

CertificateExpiredError

Bases: CertificateVerificationError

Certificate outside its validity period.

PARAMETER DESCRIPTION
not_valid_before

Certificate is not valid before this time.

TYPE: datetime

not_valid_after

Certificate is not valid after this time.

TYPE: datetime

verification_time

When the certificate was validated and validation failed because it’s outside the validity period.

TYPE: datetime

CertificateFingerprintError

Bases: CertificateVerificationError

Certificate fingerprint does not match trusted fingerprint.

CertificateIssuerNameError

Bases: CertificateVerificationError

Certificate issuer name does not match issuer’s subject.

PARAMETER DESCRIPTION
cert_issuer

Certificate’s issuer subject.

TYPE: str

issuer_subject

Issuer’s subject.

TYPE: str

CertificateIssuerNotTrustedError

Bases: CertificateVerificationError

Issuer’s certificate cannot be used to verify signature.

CertificateKeyTypeError

Bases: CertificateVerificationError

Unsupported key type used to sign a certificate.

PARAMETER DESCRIPTION
reason

Message explaining the cause of the error.

TYPE: str

CertificateParseError

Bases: AiaChaserError

Error parsing a certificate.

CertificateSignatureError

Bases: CertificateVerificationError

Issuer’s certificate did not sign the certificate.

PARAMETER DESCRIPTION
certificate

Certificate whose signature is being validated.

TYPE: str

issuer

Certificate that should have signed the certificate.

TYPE: str

CertificateTimeZoneError

Bases: CertificateVerificationError

Cannot compare offset-aware and offset-naive times.

CertificateVerificationError

Bases: AiaChaserError

Base exception for certificate verification errors.

CrlError

Bases: CertificateVerificationError

Base exception for CRL errors.

CrlHttpError

Bases: CrlError

CRL failed due to an HTTP protocol error.

PARAMETER DESCRIPTION
crl_url

CRL endpoint url.

TYPE: str

http_status

HTTP status indicating the type of error.

TYPE: int

CrlParseError

Bases: CrlError

Error parsing a certificate.

CrlRevokedError

Bases: CrlError

Certificate has been revoked by a CRL.

MissingPeerCertificateError

Bases: AiaChaserError

There is no certificate for the peer on the other end.

NoValidAiaCaUrlError

Bases: AiaChaserError

None of the AIA CA URLs is a valid http or https URL.

PARAMETER DESCRIPTION
urls

URLs that were provided to fetch the CA.

TYPE: Sequence[str]

OcspError

Bases: CertificateVerificationError

Base exception for OCSP errors.

OcspHttpError

Bases: OcspError

OCSP failed due to an HTTP protocol error.

PARAMETER DESCRIPTION
ocsp_url

OCSP endpoint url.

TYPE: str

http_status

HTTP status indicating the type of error.

TYPE: int

OcspResponderCertificateError

Bases: OcspError

OCSP responder certificate not issued or signed by issuer.

OcspResponseSignatureError

Bases: OcspError

OCSP responder certificate did not sign the response.

OcspResponseStatusError

Bases: OcspError

OCSP response status is not successful.

PARAMETER DESCRIPTION
status

OCSP response status.

TYPE: OCSPResponseStatus

OcspResponseUnsignedError

Bases: OcspError

OCSP response is unsigned.

OcspRevokedStatusError

Bases: OcspError

OCSP response indicated that certificate has been revoked.

OcspUnknownStatusError

Bases: OcspError

OCSP response indicates that certificate validity is unknown.

RootCertificateNotFoundError

Bases: CertificateVerificationError

Root certificate not in trusted database.

PARAMETER DESCRIPTION
subject

Subject of the certificate not found among the trusted certificates.

TYPE: str