Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: net/quic/core/crypto/quic_crypto_client_config.cc

Issue 2808893003: Replace quic_restart_flag_quic_big_endian_connection_id with quic_restart_flag_quic_big_endian_conn… (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/crypto/crypto_server_test.cc ('k') | net/quic/core/crypto/quic_crypto_client_config_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/quic_crypto_client_config.cc
diff --git a/net/quic/core/crypto/quic_crypto_client_config.cc b/net/quic/core/crypto/quic_crypto_client_config.cc
index 35b44e97ffe07cf0b735d4730342dde488467b6a..aafb36412c72a6005c9a1b9194899a187c1b8b98 100644
--- a/net/quic/core/crypto/quic_crypto_client_config.cc
+++ b/net/quic/core/crypto/quic_crypto_client_config.cc
@@ -22,6 +22,7 @@
#include "net/quic/core/crypto/quic_random.h"
#include "net/quic/core/quic_utils.h"
#include "net/quic/platform/api/quic_bug_tracker.h"
+#include "net/quic/platform/api/quic_endian.h"
#include "net/quic/platform/api/quic_hostname_utils.h"
#include "net/quic/platform/api/quic_logging.h"
#include "net/quic/platform/api/quic_map_util.h"
@@ -499,6 +500,9 @@ QuicErrorCode QuicCryptoClientConfig::FillClientHello(
CryptoHandshakeMessage* out,
string* error_details) const {
DCHECK(error_details != nullptr);
+ if (QuicUtils::IsConnectionIdWireFormatBigEndian(Perspective::IS_CLIENT)) {
+ connection_id = QuicEndian::HostToNet64(connection_id);
+ }
FillInchoateClientHello(server_id, preferred_version, cached, rand,
/* demand_x509_proof= */ true, out_params, out);
@@ -819,6 +823,9 @@ QuicErrorCode QuicCryptoClientConfig::ProcessRejection(
*error_details = "Missing kRCID";
return QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND;
}
+ if (QuicUtils::IsConnectionIdWireFormatBigEndian(Perspective::IS_CLIENT)) {
+ connection_id = QuicEndian::NetToHost64(connection_id);
+ }
cached->add_server_designated_connection_id(connection_id);
if (!nonce.empty()) {
cached->add_server_nonce(nonce.as_string());
« no previous file with comments | « net/quic/core/crypto/crypto_server_test.cc ('k') | net/quic/core/crypto/quic_crypto_client_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698