Handle CertificateVerificationError throughout most of the codebase.

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

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.

Summary ID
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.
9977d2b9edb6acab9cc7d926bcdb0757b95da966
Description From Last Updated

'typing.Any' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'typing.Callable' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'typing.Dict' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'typing.Literal' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'kgb' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'reviewboard.certs.errors.CertificateVerificationError' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'reviewboard.certs.errors.CertificateVerificationFailureCode' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'reviewboard.webapi.errors.BACKEND_INVALID_SSL_CERT' imported but unused Column: 1 Error code: F401

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-6.x (e3f7948)
Loading...