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

Unified Diff: net/base/x509_certificate.cc

Issue 9699043: net: fallback to online revocation checks for EV status when CRLSet has expired. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 9 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
Index: net/base/x509_certificate.cc
diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc
index a4ae89b74f297041c0a08c9c45d32ec337d3b485..9ea23cc8e1e2d2a0634aaf851cbc17ddac542b14 100644
--- a/net/base/x509_certificate.cc
+++ b/net/base/x509_certificate.cc
@@ -25,6 +25,7 @@
#include "googleurl/src/url_canon_ip.h"
#include "net/base/cert_status_flags.h"
#include "net/base/cert_verify_result.h"
+#include "net/base/crl_set.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/pem_tokenizer.h"
@@ -605,6 +606,12 @@ int X509Certificate::Verify(const std::string& hostname,
return ERR_CERT_REVOKED;
}
+ // If we were asked to attempt EV verification and we are missing a CRLSet,
+ // or if the CRLSet has expired, then we enable online revocation checks. If
+ // the online check fails, we wont show the EV status.
wtc 2012/03/16 00:33:10 Nit: wont => won't It may be a good idea to docum
agl 2012/03/20 20:02:19 Done
+ if ((flags & VERIFY_EV_CERT) && (!crl_set || crl_set->IsExpired()))
Ryan Sleevi 2012/03/16 00:50:52 Comment nit: In past reviews, I've been dinged for
agl 2012/03/20 20:02:19 Have de-we'ed the comment.
+ flags |= VERIFY_REV_CHECKING_ENABLED;
+
int rv = VerifyInternal(hostname, flags, crl_set, verify_result);
// This check is done after VerifyInternal so that VerifyInternal can fill in

Powered by Google App Engine
This is Rietveld 408576698