Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/quic_crypto_client_stream.h" | 5 #include "net/quic/quic_crypto_client_stream.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "net/quic/crypto/crypto_protocol.h" | 8 #include "net/quic/crypto/crypto_protocol.h" |
| 9 #include "net/quic/crypto/crypto_utils.h" | 9 #include "net/quic/crypto/crypto_utils.h" |
| 10 #include "net/quic/crypto/null_encrypter.h" | 10 #include "net/quic/crypto/null_encrypter.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 451 if (!server_id_.is_https()) { | 451 if (!server_id_.is_https()) { |
| 452 // We don't check the certificates for insecure QUIC connections. | 452 // We don't check the certificates for insecure QUIC connections. |
| 453 SetCachedProofValid(cached); | 453 SetCachedProofValid(cached); |
| 454 next_state_ = STATE_VERIFY_PROOF_DONE; | 454 next_state_ = STATE_VERIFY_PROOF_DONE; |
| 455 return; | 455 return; |
| 456 } | 456 } |
| 457 if (!cached->IsEmpty() && !cached->signature().empty()) { | 457 if (!cached->IsEmpty() && !cached->signature().empty()) { |
| 458 // Note that we verify the proof even if the cached proof is valid. | 458 // Note that we verify the proof even if the cached proof is valid. |
| 459 DCHECK(crypto_config_->proof_verifier()); | 459 DCHECK(crypto_config_->proof_verifier()); |
| 460 next_state_ = STATE_VERIFY_PROOF; | 460 next_state_ = STATE_VERIFY_PROOF; |
| 461 return; | |
| 461 } | 462 } |
| 463 UMA_HISTOGRAM_COUNTS("Net.QuicNumServerConfigUpdateMessagesIgnored", 1); | |
|
Alexei Svitkine (slow)
2014/09/19 15:14:17
This would probably be better served with an UMA_H
ramant (doing other things)
2014/09/19 17:00:04
Done.
| |
| 464 next_state_ = STATE_VERIFY_PROOF_DONE; | |
| 462 } | 465 } |
| 463 | 466 |
| 464 QuicAsyncStatus QuicCryptoClientStream::DoVerifyProof( | 467 QuicAsyncStatus QuicCryptoClientStream::DoVerifyProof( |
| 465 QuicCryptoClientConfig::CachedState* cached) { | 468 QuicCryptoClientConfig::CachedState* cached) { |
| 466 ProofVerifier* verifier = crypto_config_->proof_verifier(); | 469 ProofVerifier* verifier = crypto_config_->proof_verifier(); |
| 467 DCHECK(verifier); | 470 DCHECK(verifier); |
| 468 next_state_ = STATE_VERIFY_PROOF_COMPLETE; | 471 next_state_ = STATE_VERIFY_PROOF_COMPLETE; |
| 469 generation_counter_ = cached->generation_counter(); | 472 generation_counter_ = cached->generation_counter(); |
| 470 | 473 |
| 471 ProofVerifierCallbackImpl* proof_verify_callback = | 474 ProofVerifierCallbackImpl* proof_verify_callback = |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 555 } | 558 } |
| 556 } | 559 } |
| 557 return false; | 560 return false; |
| 558 } | 561 } |
| 559 | 562 |
| 560 QuicClientSessionBase* QuicCryptoClientStream::client_session() { | 563 QuicClientSessionBase* QuicCryptoClientStream::client_session() { |
| 561 return reinterpret_cast<QuicClientSessionBase*>(session()); | 564 return reinterpret_cast<QuicClientSessionBase*>(session()); |
| 562 } | 565 } |
| 563 | 566 |
| 564 } // namespace net | 567 } // namespace net |
| OLD | NEW |