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

Unified Diff: net/base/x509_certificate.h

Issue 125120: Use LOAD_VERIFY_EV_CERT to verify EV-ness in Verify().... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/ssl_config_service.h ('k') | net/base/x509_certificate_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate.h
===================================================================
--- net/base/x509_certificate.h (revision 19005)
+++ net/base/x509_certificate.h (working copy)
@@ -133,6 +133,11 @@
SOURCE_FROM_NETWORK = 2, // From the network.
};
+ enum VerifyFlags {
+ VERIFY_REV_CHECKING_ENABLED = 1 << 0,
+ VERIFY_EV_CERT = 1 << 1,
+ };
+
// Create an X509Certificate from a handle to the certificate object
// in the underlying crypto library. This is a transfer of ownership;
// X509Certificate will properly dispose of |cert_handle| for you.
@@ -207,16 +212,14 @@
// |verify_result->cert_status|, and the error code for the most serious
// error is returned.
//
- // If |rev_checking_enabled| is true, certificate revocation checking is
- // performed.
+ // |flags| is bitwise OR'd of VerifyFlags.
+ // If VERIFY_REV_CHECKING_ENABLED is set in |flags|, certificate revocation
+ // checking is performed. If VERIFY_EV_CERT is set in |flags| too,
+ // EV certificate verification is performed.
int Verify(const std::string& hostname,
- bool rev_checking_enabled,
+ int flags,
CertVerifyResult* verify_result) const;
- // Returns true if the certificate is an extended-validation (EV)
- // certificate.
- bool IsEV(int cert_status) const;
-
OSCertHandle os_cert_handle() const { return cert_handle_; }
private:
@@ -258,6 +261,8 @@
// Common object initialization code. Called by the constructors only.
void Initialize();
+ bool VerifyEV() const;
+
// Creates an OS certificate handle from the BER-encoded representation.
// Returns NULL on failure.
static OSCertHandle CreateOSCertHandleFromBytes(const char* data,
« no previous file with comments | « net/base/ssl_config_service.h ('k') | net/base/x509_certificate_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698