Handle CertificateVerificationError throughout most of the codebase.
Review Request #13265 — Created Sept. 6, 2023 and submitted
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
genericSCMError
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.
All unit tests pass.
Summary | ID |
---|---|
9977d2b9edb6acab9cc7d926bcdb0757b95da966 |
Description | From | Last Updated |
---|---|---|
'typing.Any' imported but unused Column: 1 Error code: F401 |
reviewbot | |
'typing.Callable' imported but unused Column: 1 Error code: F401 |
reviewbot | |
'typing.Dict' imported but unused Column: 1 Error code: F401 |
reviewbot | |
'typing.Literal' imported but unused Column: 1 Error code: F401 |
reviewbot | |
'kgb' imported but unused Column: 1 Error code: F401 |
reviewbot | |
'reviewboard.certs.errors.CertificateVerificationError' imported but unused Column: 1 Error code: F401 |
reviewbot | |
'reviewboard.certs.errors.CertificateVerificationFailureCode' imported but unused Column: 1 Error code: F401 |
reviewbot | |
'reviewboard.webapi.errors.BACKEND_INVALID_SSL_CERT' imported but unused Column: 1 Error code: F401 |
reviewbot |
- Change Summary:
-
Removed unused imports.
- Commits:
-
Summary ID cca3209fb0e5c39763532c8095e423e417fda75f 9977d2b9edb6acab9cc7d926bcdb0757b95da966 - Diff:
-
Revision 2 (+578 -170)