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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 ValidateClientHelloResultCallback::Result* result, | 145 ValidateClientHelloResultCallback::Result* result, |
146 ValidateClientHelloResultCallback* done_cb) | 146 ValidateClientHelloResultCallback* done_cb) |
147 : result_(result), done_cb_(done_cb) { | 147 : result_(result), done_cb_(done_cb) { |
148 } | 148 } |
149 | 149 |
150 protected: | 150 protected: |
151 virtual void RunImpl(bool nonce_is_valid_and_unique) OVERRIDE { | 151 virtual void RunImpl(bool nonce_is_valid_and_unique) OVERRIDE { |
152 DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique; | 152 DVLOG(1) << "Using client nonce, unique: " << nonce_is_valid_and_unique; |
153 result_->info.unique = nonce_is_valid_and_unique; | 153 result_->info.unique = nonce_is_valid_and_unique; |
154 // TODO(rtenneti): Implement capturing of error from strike register. | 154 // TODO(rtenneti): Implement capturing of error from strike register. |
155 // Temporarily treat them as CLIENT_NONCE_UNKNOWN_FAILURE. | 155 // Temporarily treat them as CLIENT_NONCE_INVALID_FAILURE. |
156 if (!nonce_is_valid_and_unique) { | 156 if (!nonce_is_valid_and_unique) { |
157 result_->info.reject_reasons.push_back(CLIENT_NONCE_UNKNOWN_FAILURE); | 157 result_->info.reject_reasons.push_back(CLIENT_NONCE_INVALID_FAILURE); |
158 } | 158 } |
159 done_cb_->Run(result_); | 159 done_cb_->Run(result_); |
160 } | 160 } |
161 | 161 |
162 private: | 162 private: |
163 ValidateClientHelloResultCallback::Result* result_; | 163 ValidateClientHelloResultCallback::Result* result_; |
164 ValidateClientHelloResultCallback* done_cb_; | 164 ValidateClientHelloResultCallback* done_cb_; |
165 | 165 |
166 DISALLOW_COPY_AND_ASSIGN(VerifyNonceIsValidAndUniqueCallback); | 166 DISALLOW_COPY_AND_ASSIGN(VerifyNonceIsValidAndUniqueCallback); |
167 }; | 167 }; |
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 QuicCryptoServerConfig::Config::Config() | 1460 QuicCryptoServerConfig::Config::Config() |
1461 : channel_id_enabled(false), | 1461 : channel_id_enabled(false), |
1462 is_primary(false), | 1462 is_primary(false), |
1463 primary_time(QuicWallTime::Zero()), | 1463 primary_time(QuicWallTime::Zero()), |
1464 priority(0), | 1464 priority(0), |
1465 source_address_token_boxer(NULL) {} | 1465 source_address_token_boxer(NULL) {} |
1466 | 1466 |
1467 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } | 1467 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } |
1468 | 1468 |
1469 } // namespace net | 1469 } // namespace net |
OLD | NEW |