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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 409 |
410 configs_.swap(new_configs); | 410 configs_.swap(new_configs); |
411 SelectNewPrimaryConfig(now); | 411 SelectNewPrimaryConfig(now); |
412 DCHECK(primary_config_); | 412 DCHECK(primary_config_); |
413 DCHECK_EQ(configs_.find(primary_config_->id)->second, primary_config_); | 413 DCHECK_EQ(configs_.find(primary_config_->id)->second, primary_config_); |
414 } | 414 } |
415 | 415 |
416 return ok; | 416 return ok; |
417 } | 417 } |
418 | 418 |
| 419 void QuicCryptoServerConfig::GetConfigIds(vector<string>* scids) const { |
| 420 base::AutoLock locked(configs_lock_); |
| 421 for (ConfigMap::const_iterator it = configs_.begin(); |
| 422 it != configs_.end(); ++it) { |
| 423 scids->push_back(it->first); |
| 424 } |
| 425 } |
| 426 |
419 void QuicCryptoServerConfig::ValidateClientHello( | 427 void QuicCryptoServerConfig::ValidateClientHello( |
420 const CryptoHandshakeMessage& client_hello, | 428 const CryptoHandshakeMessage& client_hello, |
421 IPEndPoint client_ip, | 429 IPEndPoint client_ip, |
422 const QuicClock* clock, | 430 const QuicClock* clock, |
423 ValidateClientHelloResultCallback* done_cb) const { | 431 ValidateClientHelloResultCallback* done_cb) const { |
424 const QuicWallTime now(clock->WallNow()); | 432 const QuicWallTime now(clock->WallNow()); |
425 | 433 |
426 ValidateClientHelloResultCallback::Result* result = | 434 ValidateClientHelloResultCallback::Result* result = |
427 new ValidateClientHelloResultCallback::Result( | 435 new ValidateClientHelloResultCallback::Result( |
428 client_hello, client_ip, now); | 436 client_hello, client_ip, now); |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 | 1310 |
1303 QuicCryptoServerConfig::Config::Config() | 1311 QuicCryptoServerConfig::Config::Config() |
1304 : channel_id_enabled(false), | 1312 : channel_id_enabled(false), |
1305 is_primary(false), | 1313 is_primary(false), |
1306 primary_time(QuicWallTime::Zero()), | 1314 primary_time(QuicWallTime::Zero()), |
1307 priority(0) {} | 1315 priority(0) {} |
1308 | 1316 |
1309 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } | 1317 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } |
1310 | 1318 |
1311 } // namespace net | 1319 } // namespace net |
OLD | NEW |