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

Unified Diff: net/base/cert_verifier.cc

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/cert_verifier.h ('k') | net/base/ssl_config_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_verifier.cc
===================================================================
--- net/base/cert_verifier.cc (revision 19005)
+++ net/base/cert_verifier.cc (working copy)
@@ -22,12 +22,12 @@
Request(CertVerifier* verifier,
X509Certificate* cert,
const std::string& hostname,
- bool rev_checking_enabled,
+ int flags,
CertVerifyResult* verify_result,
CompletionCallback* callback)
: cert_(cert),
hostname_(hostname),
- rev_checking_enabled_(rev_checking_enabled),
+ flags_(flags),
verifier_(verifier),
verify_result_(verify_result),
callback_(callback),
@@ -39,7 +39,7 @@
void DoVerify() {
// Running on the worker thread
- error_ = cert_->Verify(hostname_, rev_checking_enabled_, &result_);
+ error_ = cert_->Verify(hostname_, flags_, &result_);
#if defined(OS_LINUX)
// Detach the thread from NSPR.
// Calling NSS functions attaches the thread to NSPR, which stores
@@ -95,7 +95,8 @@
// Set on the origin thread, read on the worker thread.
scoped_refptr<X509Certificate> cert_;
std::string hostname_;
- bool rev_checking_enabled_;
+ // bitwise OR'd of X509Certificate::VerifyFlags.
+ int flags_;
// Only used on the origin thread (where Verify was called).
CertVerifier* verifier_;
@@ -123,7 +124,7 @@
int CertVerifier::Verify(X509Certificate* cert,
const std::string& hostname,
- bool rev_checking_enabled,
+ int flags,
CertVerifyResult* verify_result,
CompletionCallback* callback) {
DCHECK(!request_) << "verifier already in use";
@@ -131,13 +132,12 @@
// Do a synchronous verification.
if (!callback) {
CertVerifyResult result;
- int rv = cert->Verify(hostname, rev_checking_enabled, &result);
+ int rv = cert->Verify(hostname, flags, &result);
*verify_result = result;
return rv;
}
- request_ = new Request(this, cert, hostname, rev_checking_enabled,
- verify_result, callback);
+ request_ = new Request(this, cert, hostname, flags, verify_result, callback);
// Dispatch to worker thread...
if (!WorkerPool::PostTask(FROM_HERE,
« no previous file with comments | « net/base/cert_verifier.h ('k') | net/base/ssl_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698