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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 return QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED; | 749 return QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED; |
750 } | 750 } |
751 | 751 |
752 out->set_tag(kSHLO); | 752 out->set_tag(kSHLO); |
753 QuicTagVector supported_version_tags; | 753 QuicTagVector supported_version_tags; |
754 for (size_t i = 0; i < supported_versions.size(); ++i) { | 754 for (size_t i = 0; i < supported_versions.size(); ++i) { |
755 supported_version_tags.push_back | 755 supported_version_tags.push_back |
756 (QuicVersionToQuicTag(supported_versions[i])); | 756 (QuicVersionToQuicTag(supported_versions[i])); |
757 } | 757 } |
758 out->SetVector(kVER, supported_version_tags); | 758 out->SetVector(kVER, supported_version_tags); |
759 out->SetStringPiece( | 759 out->SetStringPiece(kSourceAddressTokenTag, |
760 kSourceAddressTokenTag, | 760 NewSourceAddressToken(*requested_config.get(), |
761 NewSourceAddressToken(*requested_config.get(), | 761 client_address, |
762 client_address, | 762 rand, |
763 rand, | 763 info.now, |
764 info.now, | 764 nullptr)); |
765 nullptr)); | |
766 QuicSocketAddressCoder address_coder(client_address); | 765 QuicSocketAddressCoder address_coder(client_address); |
767 out->SetStringPiece(kCADR, address_coder.Encode()); | 766 out->SetStringPiece(kCADR, address_coder.Encode()); |
768 out->SetStringPiece(kPUBS, forward_secure_public_value); | 767 out->SetStringPiece(kPUBS, forward_secure_public_value); |
769 | 768 |
770 return QUIC_NO_ERROR; | 769 return QUIC_NO_ERROR; |
771 } | 770 } |
772 | 771 |
773 scoped_refptr<QuicCryptoServerConfig::Config> | 772 scoped_refptr<QuicCryptoServerConfig::Config> |
774 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const { | 773 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const { |
775 // In Chromium, we will dead lock if the lock is held by the current thread. | 774 // In Chromium, we will dead lock if the lock is held by the current thread. |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1556 QuicCryptoServerConfig::Config::Config() | 1555 QuicCryptoServerConfig::Config::Config() |
1557 : channel_id_enabled(false), | 1556 : channel_id_enabled(false), |
1558 is_primary(false), | 1557 is_primary(false), |
1559 primary_time(QuicWallTime::Zero()), | 1558 primary_time(QuicWallTime::Zero()), |
1560 priority(0), | 1559 priority(0), |
1561 source_address_token_boxer(nullptr) {} | 1560 source_address_token_boxer(nullptr) {} |
1562 | 1561 |
1563 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } | 1562 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } |
1564 | 1563 |
1565 } // namespace net | 1564 } // namespace net |
OLD | NEW |