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

Unified Diff: net/cert/cert_status_flags.cc

Issue 724543002: Reject certificates that are valid for too long. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace nit(s). Created 5 years, 11 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/base/net_error_list.h ('k') | net/cert/cert_status_flags_list.h » ('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 d278ea47b453b689842f41a289b2e4fa36144d16..e8d9aab0c1dac88f02dd6674964937e5d97b6b19 100644
--- a/net/cert/cert_status_flags.cc
+++ b/net/cert/cert_status_flags.cc
@@ -49,6 +49,8 @@ CertStatus MapNetErrorToCertStatus(int error) {
return CERT_STATUS_PINNED_KEY_MISSING;
case ERR_CERT_NAME_CONSTRAINT_VIOLATION:
return CERT_STATUS_NAME_CONSTRAINT_VIOLATION;
+ case ERR_CERT_VALIDITY_TOO_LONG:
+ return CERT_STATUS_VALIDITY_TOO_LONG;
default:
return 0;
}
@@ -81,6 +83,8 @@ int MapCertStatusToNetError(CertStatus cert_status) {
return ERR_CERT_WEAK_KEY;
if (cert_status & CERT_STATUS_DATE_INVALID)
return ERR_CERT_DATE_INVALID;
+ if (cert_status & CERT_STATUS_VALIDITY_TOO_LONG)
+ return ERR_CERT_VALIDITY_TOO_LONG;
// Unknown status. Give it the benefit of the doubt.
if (cert_status & CERT_STATUS_UNABLE_TO_CHECK_REVOCATION)
« no previous file with comments | « net/base/net_error_list.h ('k') | net/cert/cert_status_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698