| 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 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 out->set_tag(kSHLO); | 825 out->set_tag(kSHLO); |
| 826 QuicTagVector supported_version_tags; | 826 QuicTagVector supported_version_tags; |
| 827 for (size_t i = 0; i < supported_versions.size(); ++i) { | 827 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 828 supported_version_tags.push_back( | 828 supported_version_tags.push_back( |
| 829 QuicVersionToQuicTag(supported_versions[i])); | 829 QuicVersionToQuicTag(supported_versions[i])); |
| 830 } | 830 } |
| 831 out->SetVector(kVER, supported_version_tags); | 831 out->SetVector(kVER, supported_version_tags); |
| 832 out->SetStringPiece( | 832 out->SetStringPiece( |
| 833 kSourceAddressTokenTag, | 833 kSourceAddressTokenTag, |
| 834 NewSourceAddressToken(*requested_config.get(), info.source_address_tokens, | 834 NewSourceAddressToken(*requested_config.get(), info.source_address_tokens, |
| 835 client_address.address(), rand, info.now, nullptr)); | 835 client_address.address_number(), rand, info.now, |
| 836 nullptr)); |
| 836 QuicSocketAddressCoder address_coder(client_address); | 837 QuicSocketAddressCoder address_coder(client_address); |
| 837 out->SetStringPiece(kCADR, address_coder.Encode()); | 838 out->SetStringPiece(kCADR, address_coder.Encode()); |
| 838 out->SetStringPiece(kPUBS, forward_secure_public_value); | 839 out->SetStringPiece(kPUBS, forward_secure_public_value); |
| 839 | 840 |
| 840 return QUIC_NO_ERROR; | 841 return QUIC_NO_ERROR; |
| 841 } | 842 } |
| 842 | 843 |
| 843 scoped_refptr<QuicCryptoServerConfig::Config> | 844 scoped_refptr<QuicCryptoServerConfig::Config> |
| 844 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const { | 845 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const { |
| 845 // In Chromium, we will dead lock if the lock is held by the current thread. | 846 // In Chromium, we will dead lock if the lock is held by the current thread. |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 is_primary(false), | 1794 is_primary(false), |
| 1794 primary_time(QuicWallTime::Zero()), | 1795 primary_time(QuicWallTime::Zero()), |
| 1795 priority(0), | 1796 priority(0), |
| 1796 source_address_token_boxer(nullptr) {} | 1797 source_address_token_boxer(nullptr) {} |
| 1797 | 1798 |
| 1798 QuicCryptoServerConfig::Config::~Config() { | 1799 QuicCryptoServerConfig::Config::~Config() { |
| 1799 STLDeleteElements(&key_exchanges); | 1800 STLDeleteElements(&key_exchanges); |
| 1800 } | 1801 } |
| 1801 | 1802 |
| 1802 } // namespace net | 1803 } // namespace net |
| OLD | NEW |