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

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

Issue 2808273006: Landing Recent QUIC changes until Sun Apr 9 16:12:55 (Closed)
Patch Set: increment enabled_options in e2e test 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..d70f79aa5cc9969f86a456dc5f5fdb896d8bacd7 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"
@@ -192,6 +193,7 @@ void QuicCryptoClientConfig::CachedState::InvalidateServerConfig() {
scfg_.reset();
SetProofInvalid();
std::queue<QuicConnectionId> empty_queue;
+ using std::swap;
swap(server_designated_connection_ids_, empty_queue);
}
@@ -236,6 +238,7 @@ void QuicCryptoClientConfig::CachedState::Clear() {
scfg_.reset();
++generation_counter_;
std::queue<QuicConnectionId> empty_queue;
+ using std::swap;
swap(server_designated_connection_ids_, empty_queue);
}
@@ -499,6 +502,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 +825,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