Add a standard exception for unverified SSL certificates.

Review Request #13256 — Created Sept. 5, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This introduces CertificateVerificationError, which represents an
unverified certificate, and VerificationFailureCode, which is an enum
of handled error codes. These will be used product-wide to represent
verification failures, replacing the now-deprecated
reviewboard.scmtools.errors.UnverifiedCertificateError.

The new error class provides default error messages for different error
codes, and allows for some custom formatting containing certificate
information.

Unit tests passed.

Made use of this in in-progress code.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Add a standard exception for unverified SSL certificates.
This introduces `CertificateVerificationError`, which represents an unverified certificate, and `VerificationFailureCode`, which is an enum of handled error codes. These will be used product-wide to represent verification failures, replacing the now-deprecated `reviewboard.scmtools.errors.UnverifiedCertificateError`. The new error class provides default error messages for different error codes, and allows for some custom formatting containing certificate information.
0819d07c8579b6dcf26a7a51883e0731abe8da45 Christian Hammond
reviewboard/deprecation.py
reviewboard/certs/errors.py
reviewboard/certs/tests/test_certificate_verification_error.py
reviewboard/scmtools/errors.py
Loading...