OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/quic/crypto/proof_verifier_chromium.h" | 5 #include "net/quic/crypto/proof_verifier_chromium.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 verifier_.reset(); | 237 verifier_.reset(); |
238 | 238 |
239 const CertVerifyResult& cert_verify_result = | 239 const CertVerifyResult& cert_verify_result = |
240 verify_details_->cert_verify_result; | 240 verify_details_->cert_verify_result; |
241 const CertStatus cert_status = cert_verify_result.cert_status; | 241 const CertStatus cert_status = cert_verify_result.cert_status; |
242 if (transport_security_state_ && | 242 if (transport_security_state_ && |
243 (result == OK || | 243 (result == OK || |
244 (IsCertificateError(result) && IsCertStatusMinorError(cert_status))) && | 244 (IsCertificateError(result) && IsCertStatusMinorError(cert_status))) && |
245 !transport_security_state_->CheckPublicKeyPins( | 245 !transport_security_state_->CheckPublicKeyPins( |
246 hostname_, | 246 hostname_, |
247 true, /* sni_available */ | |
248 cert_verify_result.is_issued_by_known_root, | 247 cert_verify_result.is_issued_by_known_root, |
249 cert_verify_result.public_key_hashes, | 248 cert_verify_result.public_key_hashes, |
250 &verify_details_->pinning_failure_log)) { | 249 &verify_details_->pinning_failure_log)) { |
251 result = ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN; | 250 result = ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN; |
252 } | 251 } |
253 | 252 |
254 if (result != OK) { | 253 if (result != OK) { |
255 std::string error_string = ErrorToString(result); | 254 std::string error_string = ErrorToString(result); |
256 error_details_ = StringPrintf("Failed to verify certificate chain: %s", | 255 error_details_ = StringPrintf("Failed to verify certificate chain: %s", |
257 error_string.c_str()); | 256 error_string.c_str()); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 } | 376 } |
378 return status; | 377 return status; |
379 } | 378 } |
380 | 379 |
381 void ProofVerifierChromium::OnJobComplete(Job* job) { | 380 void ProofVerifierChromium::OnJobComplete(Job* job) { |
382 active_jobs_.erase(job); | 381 active_jobs_.erase(job); |
383 delete job; | 382 delete job; |
384 } | 383 } |
385 | 384 |
386 } // namespace net | 385 } // namespace net |
OLD | NEW |