Chromium Code Reviews| 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())) { |