OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/socket/ssl_host_info.h" | 5 #include "net/socket/ssl_host_info.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (cert_.get()) { | 121 if (cert_.get()) { |
122 int flags = 0; | 122 int flags = 0; |
123 if (verify_ev_cert_) | 123 if (verify_ev_cert_) |
124 flags |= X509Certificate::VERIFY_EV_CERT; | 124 flags |= X509Certificate::VERIFY_EV_CERT; |
125 if (rev_checking_enabled_) | 125 if (rev_checking_enabled_) |
126 flags |= X509Certificate::VERIFY_REV_CHECKING_ENABLED; | 126 flags |= X509Certificate::VERIFY_REV_CHECKING_ENABLED; |
127 VLOG(1) << "Kicking off verification for " << hostname_; | 127 VLOG(1) << "Kicking off verification for " << hostname_; |
128 verification_start_time_ = base::TimeTicks::Now(); | 128 verification_start_time_ = base::TimeTicks::Now(); |
129 verification_end_time_ = base::TimeTicks(); | 129 verification_end_time_ = base::TimeTicks(); |
130 int rv = verifier_.Verify( | 130 int rv = verifier_.Verify( |
131 cert_.get(), hostname_, flags, &cert_verify_result_, | 131 cert_.get(), hostname_, flags, crl_set_, &cert_verify_result_, |
132 base::Bind(&SSLHostInfo::VerifyCallback, weak_factory_.GetWeakPtr()), | 132 base::Bind(&SSLHostInfo::VerifyCallback, weak_factory_.GetWeakPtr()), |
133 // TODO(willchan): Figure out how to use NetLog here. | 133 // TODO(willchan): Figure out how to use NetLog here. |
134 BoundNetLog()); | 134 BoundNetLog()); |
135 if (rv != ERR_IO_PENDING) | 135 if (rv != ERR_IO_PENDING) |
136 VerifyCallback(rv); | 136 VerifyCallback(rv); |
137 } else { | 137 } else { |
138 cert_parsing_failed_ = true; | 138 cert_parsing_failed_ = true; |
139 DCHECK(!cert_verification_callback_); | 139 DCHECK(!cert_verification_callback_); |
140 } | 140 } |
141 } | 141 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 if (cert_verification_callback_) { | 209 if (cert_verification_callback_) { |
210 OldCompletionCallback* callback = cert_verification_callback_; | 210 OldCompletionCallback* callback = cert_verification_callback_; |
211 cert_verification_callback_ = NULL; | 211 cert_verification_callback_ = NULL; |
212 callback->Run(rv); | 212 callback->Run(rv); |
213 } | 213 } |
214 } | 214 } |
215 | 215 |
216 SSLHostInfoFactory::~SSLHostInfoFactory() {} | 216 SSLHostInfoFactory::~SSLHostInfoFactory() {} |
217 | 217 |
218 } // namespace net | 218 } // namespace net |
OLD | NEW |