Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: net/cert/cert_status_flags.cc

Issue 23908005: Handle all non-overridable SSL errors in the same place (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Verified that nothing broke despite time passing Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/cert_status_flags.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_status_flags.cc
diff --git a/net/cert/cert_status_flags.cc b/net/cert/cert_status_flags.cc
index 8cb736c5485bd9ddc81b0784afb89b2e40646938..2b4a0d96d147b0c534f6604c049c183f8e50de6f 100644
--- a/net/cert/cert_status_flags.cc
+++ b/net/cert/cert_status_flags.cc
@@ -43,6 +43,10 @@ CertStatus MapNetErrorToCertStatus(int error) {
return CERT_STATUS_WEAK_SIGNATURE_ALGORITHM;
case ERR_CERT_WEAK_KEY:
return CERT_STATUS_WEAK_KEY;
+ case ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN:
+ return CERT_STATUS_PINNED_KEY_MISSING;
+ case ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY:
+ return CERT_STATUS_WEAK_DH_KEY;
default:
return 0;
}
@@ -57,6 +61,10 @@ int MapCertStatusToNetError(CertStatus cert_status) {
return ERR_CERT_REVOKED;
if (cert_status & CERT_STATUS_INVALID)
return ERR_CERT_INVALID;
+ if (cert_status & CERT_STATUS_PINNED_KEY_MISSING)
+ return ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN;
+ if (cert_status & CERT_STATUS_WEAK_DH_KEY)
+ return ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY;
// Recoverable errors
if (cert_status & CERT_STATUS_AUTHORITY_INVALID)
« no previous file with comments | « net/cert/cert_status_flags.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698