Handle CertificateVerificationError throughout most of the codebase.

Review Request #13265 — Created Sept. 6, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This updates most of our certificate-related error handlers to catch
CertificateVerificationError and to return information on the
certificate.

Most of this is in the API. We're re-using the UNVERIFIED_HOST_CERT
for the response. Previously, in most cases, SSL errors were treated as
generic SCMErrors, so this will be a change for callers, but is not
considered an API breakage.

There are other places in the codebase that still need to handle this
error, and will be updated as more of the SSL cert code is completed.

All unit tests pass.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Handle CertificateVerificationError throughout most of the codebase.
This updates most of our certificate-related error handlers to catch `CertificateVerificationError` and to return information on the certificate. Most of this is in the API. We're re-using the `UNVERIFIED_HOST_CERT` for the response. Previously, in most cases, SSL errors were treated as generic `SCMError`s, so this will be a change for callers, but is not considered an API breakage. There are other places in the codebase that still need to handle this error, and will be updated as more of the SSL cert code is completed.
cca3209fb0e5c39763532c8095e423e417fda75f Christian Hammond
reviewboard/scmtools/forms.py
reviewboard/webapi/resources/repository_branches.py
reviewboard/webapi/resources/repository_commits.py
reviewboard/webapi/resources/review_request.py
reviewboard/webapi/resources/review_request_draft.py
reviewboard/webapi/resources/validate_diff.py
reviewboard/webapi/resources/validate_diffcommit.py
reviewboard/webapi/tests/base.py
reviewboard/webapi/tests/test_repository_branches.py
reviewboard/webapi/tests/test_repository_commits.py
reviewboard/webapi/tests/test_review_request.py
reviewboard/webapi/tests/test_review_request_draft.py
reviewboard/webapi/tests/test_validate_diff.py
reviewboard/webapi/tests/test_validate_diffcommit.py
Loading...