| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 out->set_tag(kSHLO); | 826 out->set_tag(kSHLO); |
| 827 QuicTagVector supported_version_tags; | 827 QuicTagVector supported_version_tags; |
| 828 for (size_t i = 0; i < supported_versions.size(); ++i) { | 828 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 829 supported_version_tags.push_back( | 829 supported_version_tags.push_back( |
| 830 QuicVersionToQuicTag(supported_versions[i])); | 830 QuicVersionToQuicTag(supported_versions[i])); |
| 831 } | 831 } |
| 832 out->SetVector(kVER, supported_version_tags); | 832 out->SetVector(kVER, supported_version_tags); |
| 833 out->SetStringPiece( | 833 out->SetStringPiece( |
| 834 kSourceAddressTokenTag, | 834 kSourceAddressTokenTag, |
| 835 NewSourceAddressToken(*requested_config.get(), info.source_address_tokens, | 835 NewSourceAddressToken(*requested_config.get(), info.source_address_tokens, |
| 836 client_address.address(), rand, info.now, nullptr)); | 836 client_address.address().bytes(), rand, info.now, |
| 837 nullptr)); |
| 837 QuicSocketAddressCoder address_coder(client_address); | 838 QuicSocketAddressCoder address_coder(client_address); |
| 838 out->SetStringPiece(kCADR, address_coder.Encode()); | 839 out->SetStringPiece(kCADR, address_coder.Encode()); |
| 839 out->SetStringPiece(kPUBS, forward_secure_public_value); | 840 out->SetStringPiece(kPUBS, forward_secure_public_value); |
| 840 | 841 |
| 841 return QUIC_NO_ERROR; | 842 return QUIC_NO_ERROR; |
| 842 } | 843 } |
| 843 | 844 |
| 844 scoped_refptr<QuicCryptoServerConfig::Config> | 845 scoped_refptr<QuicCryptoServerConfig::Config> |
| 845 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const { | 846 QuicCryptoServerConfig::GetConfigWithScid(StringPiece requested_scid) const { |
| 846 // In Chromium, we will dead lock if the lock is held by the current thread. | 847 // In Chromium, we will dead lock if the lock is held by the current thread. |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1805 is_primary(false), | 1806 is_primary(false), |
| 1806 primary_time(QuicWallTime::Zero()), | 1807 primary_time(QuicWallTime::Zero()), |
| 1807 priority(0), | 1808 priority(0), |
| 1808 source_address_token_boxer(nullptr) {} | 1809 source_address_token_boxer(nullptr) {} |
| 1809 | 1810 |
| 1810 QuicCryptoServerConfig::Config::~Config() { | 1811 QuicCryptoServerConfig::Config::~Config() { |
| 1811 STLDeleteElements(&key_exchanges); | 1812 STLDeleteElements(&key_exchanges); |
| 1812 } | 1813 } |
| 1813 | 1814 |
| 1814 } // namespace net | 1815 } // namespace net |
| OLD | NEW |