| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 class VerifyNonceIsValidAndUniqueCallback | 100 class VerifyNonceIsValidAndUniqueCallback |
| 101 : public StrikeRegisterClient::ResultCallback { | 101 : public StrikeRegisterClient::ResultCallback { |
| 102 public: | 102 public: |
| 103 VerifyNonceIsValidAndUniqueCallback( | 103 VerifyNonceIsValidAndUniqueCallback( |
| 104 ValidateClientHelloResultCallback::Result* result, | 104 ValidateClientHelloResultCallback::Result* result, |
| 105 ValidateClientHelloResultCallback* done_cb) | 105 ValidateClientHelloResultCallback* done_cb) |
| 106 : result_(result), done_cb_(done_cb) { | 106 : result_(result), done_cb_(done_cb) { |
| 107 } | 107 } |
| 108 | 108 |
| 109 protected: | 109 protected: |
| 110 virtual void RunImpl(bool nonce_is_valid_and_unique, | 110 void RunImpl(bool nonce_is_valid_and_unique, |
| 111 InsertStatus nonce_error) override { | 111 InsertStatus nonce_error) override { |
| 112 DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique | 112 DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique |
| 113 << " nonce_error: " << nonce_error; | 113 << " nonce_error: " << nonce_error; |
| 114 result_->info.unique = nonce_is_valid_and_unique; | 114 result_->info.unique = nonce_is_valid_and_unique; |
| 115 if (!nonce_is_valid_and_unique) { | 115 if (!nonce_is_valid_and_unique) { |
| 116 HandshakeFailureReason client_nonce_error; | 116 HandshakeFailureReason client_nonce_error; |
| 117 switch (nonce_error) { | 117 switch (nonce_error) { |
| 118 case NONCE_INVALID_FAILURE: | 118 case NONCE_INVALID_FAILURE: |
| 119 client_nonce_error = CLIENT_NONCE_INVALID_FAILURE; | 119 client_nonce_error = CLIENT_NONCE_INVALID_FAILURE; |
| 120 break; | 120 break; |
| 121 case NONCE_NOT_UNIQUE_FAILURE: | 121 case NONCE_NOT_UNIQUE_FAILURE: |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 QuicCryptoServerConfig::Config::Config() | 1555 QuicCryptoServerConfig::Config::Config() |
| 1556 : channel_id_enabled(false), | 1556 : channel_id_enabled(false), |
| 1557 is_primary(false), | 1557 is_primary(false), |
| 1558 primary_time(QuicWallTime::Zero()), | 1558 primary_time(QuicWallTime::Zero()), |
| 1559 priority(0), | 1559 priority(0), |
| 1560 source_address_token_boxer(nullptr) {} | 1560 source_address_token_boxer(nullptr) {} |
| 1561 | 1561 |
| 1562 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } | 1562 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } |
| 1563 | 1563 |
| 1564 } // namespace net | 1564 } // namespace net |
| OLD | NEW |