| 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/quic_crypto_server_config.h" | 5 #include "net/quic/crypto/quic_crypto_server_config.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 : public StrikeRegisterClient::ResultCallback { | 143 : public StrikeRegisterClient::ResultCallback { |
| 144 public: | 144 public: |
| 145 VerifyNonceIsValidAndUniqueCallback( | 145 VerifyNonceIsValidAndUniqueCallback( |
| 146 ValidateClientHelloResultCallback::Result* result, | 146 ValidateClientHelloResultCallback::Result* result, |
| 147 ValidateClientHelloResultCallback* done_cb) | 147 ValidateClientHelloResultCallback* done_cb) |
| 148 : result_(result), done_cb_(done_cb) { | 148 : result_(result), done_cb_(done_cb) { |
| 149 } | 149 } |
| 150 | 150 |
| 151 protected: | 151 protected: |
| 152 virtual void RunImpl(bool nonce_is_valid_and_unique, | 152 virtual void RunImpl(bool nonce_is_valid_and_unique, |
| 153 InsertStatus nonce_error) OVERRIDE { | 153 InsertStatus nonce_error) override { |
| 154 DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique | 154 DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique |
| 155 << " nonce_error: " << nonce_error; | 155 << " nonce_error: " << nonce_error; |
| 156 result_->info.unique = nonce_is_valid_and_unique; | 156 result_->info.unique = nonce_is_valid_and_unique; |
| 157 if (!nonce_is_valid_and_unique) { | 157 if (!nonce_is_valid_and_unique) { |
| 158 HandshakeFailureReason client_nonce_error; | 158 HandshakeFailureReason client_nonce_error; |
| 159 switch (nonce_error) { | 159 switch (nonce_error) { |
| 160 case NONCE_INVALID_FAILURE: | 160 case NONCE_INVALID_FAILURE: |
| 161 client_nonce_error = CLIENT_NONCE_INVALID_FAILURE; | 161 client_nonce_error = CLIENT_NONCE_INVALID_FAILURE; |
| 162 break; | 162 break; |
| 163 case NONCE_NOT_UNIQUE_FAILURE: | 163 case NONCE_NOT_UNIQUE_FAILURE: |
| (...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 QuicCryptoServerConfig::Config::Config() | 1562 QuicCryptoServerConfig::Config::Config() |
| 1563 : channel_id_enabled(false), | 1563 : channel_id_enabled(false), |
| 1564 is_primary(false), | 1564 is_primary(false), |
| 1565 primary_time(QuicWallTime::Zero()), | 1565 primary_time(QuicWallTime::Zero()), |
| 1566 priority(0), | 1566 priority(0), |
| 1567 source_address_token_boxer(nullptr) {} | 1567 source_address_token_boxer(nullptr) {} |
| 1568 | 1568 |
| 1569 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } | 1569 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } |
| 1570 | 1570 |
| 1571 } // namespace net | 1571 } // namespace net |
| OLD | NEW |