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

Unified Diff: net/socket/ssl_host_info.cc

Issue 5386001: Cache certificate verification results in memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Upload before checkin Created 10 years 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/socket/ssl_host_info.h ('k') | net/socket/tcp_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_host_info.cc
===================================================================
--- net/socket/ssl_host_info.cc (revision 69359)
+++ net/socket/ssl_host_info.cc (working copy)
@@ -7,7 +7,6 @@
#include "base/metrics/histogram.h"
#include "base/pickle.h"
#include "base/string_piece.h"
-#include "net/base/cert_verifier.h"
#include "net/base/ssl_config_service.h"
#include "net/base/x509_certificate.h"
#include "net/socket/ssl_client_socket.h"
@@ -29,7 +28,8 @@
SSLHostInfo::SSLHostInfo(
const std::string& hostname,
- const SSLConfig& ssl_config)
+ const SSLConfig& ssl_config,
+ CertVerifier* cert_verifier)
: cert_verification_complete_(false),
cert_verification_error_(ERR_CERT_INVALID),
hostname_(hostname),
@@ -37,6 +37,7 @@
cert_verification_callback_(NULL),
rev_checking_enabled_(ssl_config.rev_checking_enabled),
verify_ev_cert_(ssl_config.verify_ev_cert),
+ verifier_(cert_verifier),
callback_(new CancelableCompletionCallback<SSLHostInfo>(
ALLOW_THIS_IN_INITIALIZER_LIST(this),
&SSLHostInfo::VerifyCallback)) {
@@ -110,12 +111,11 @@
flags |= X509Certificate::VERIFY_EV_CERT;
if (rev_checking_enabled_)
flags |= X509Certificate::VERIFY_REV_CHECKING_ENABLED;
- verifier_.reset(new CertVerifier);
VLOG(1) << "Kicking off verification for " << hostname_;
verification_start_time_ = base::TimeTicks::Now();
verification_end_time_ = base::TimeTicks();
- if (verifier_->Verify(cert_.get(), hostname_, flags,
- &cert_verify_result_, callback_) == OK) {
+ if (verifier_.Verify(cert_.get(), hostname_, flags,
+ &cert_verify_result_, callback_) == OK) {
VerifyCallback(OK);
}
} else {
Property changes on: net\socket\ssl_host_info.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « net/socket/ssl_host_info.h ('k') | net/socket/tcp_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698