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

Unified Diff: net/quic/crypto/quic_server_info.cc

Issue 1818393003: QUIC - Persist "Hash of the CHLO message" and "Signed timestamp of the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/crypto/quic_server_info.h ('k') | net/quic/quic_chromium_client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_server_info.cc
diff --git a/net/quic/crypto/quic_server_info.cc b/net/quic/crypto/quic_server_info.cc
index 2627fb48609a6b493bf3ee5ca04f0a70c11f6fba..035dea2118ccacd3104a2b48ac5d272feb86a222 100644
--- a/net/quic/crypto/quic_server_info.cc
+++ b/net/quic/crypto/quic_server_info.cc
@@ -12,7 +12,7 @@ using std::string;
namespace {
-const int kQuicCryptoConfigVersion = 1;
+const int kQuicCryptoConfigVersion = 2;
} // namespace
@@ -25,6 +25,8 @@ QuicServerInfo::State::~State() {}
void QuicServerInfo::State::Clear() {
server_config.clear();
source_address_token.clear();
+ cert_sct.clear();
+ chlo_hash.clear();
server_config_sig.clear();
certs.clear();
}
@@ -83,6 +85,14 @@ bool QuicServerInfo::ParseInner(const string& data) {
DVLOG(1) << "Malformed source_address_token";
return false;
}
+ if (!iter.ReadString(&state->cert_sct)) {
ramant (doing other things) 2016/03/23 01:56:02 Hi Ryan, Should we load older versions and initi
Ryan Hamilton 2016/03/23 13:55:44 That sounds fine, since that's what we're doing to
ramant (doing other things) 2016/03/23 22:43:42 Done.
+ DVLOG(1) << "Malformed cert_sct";
+ return false;
+ }
+ if (!iter.ReadString(&state->chlo_hash)) {
+ DVLOG(1) << "Malformed chlo_hash";
+ return false;
+ }
if (!iter.ReadString(&state->server_config_sig)) {
DVLOG(1) << "Malformed server_config_sig";
return false;
@@ -119,6 +129,7 @@ string QuicServerInfo::SerializeInner() const {
if (!p.WriteInt(kQuicCryptoConfigVersion) ||
!p.WriteString(state_.server_config) ||
!p.WriteString(state_.source_address_token) ||
+ !p.WriteString(state_.cert_sct) || !p.WriteString(state_.chlo_hash) ||
!p.WriteString(state_.server_config_sig) ||
state_.certs.size() > std::numeric_limits<uint32_t>::max() ||
!p.WriteUInt32(state_.certs.size())) {
« no previous file with comments | « net/quic/crypto/quic_server_info.h ('k') | net/quic/quic_chromium_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698