summaryrefslogtreecommitdiffstats
path: root/net/quic/crypto/crypto_handshake.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/quic/crypto/crypto_handshake.cc')
-rw-r--r--net/quic/crypto/crypto_handshake.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/quic/crypto/crypto_handshake.cc b/net/quic/crypto/crypto_handshake.cc
index 66a83de..abac98a 100644
--- a/net/quic/crypto/crypto_handshake.cc
+++ b/net/quic/crypto/crypto_handshake.cc
@@ -430,8 +430,7 @@ QuicErrorCode QuicCryptoClientConfig::CachedState::SetServerConfig(
if (!matches_existing) {
server_config_ = server_config.as_string();
- server_config_valid_ = false;
- ++generation_counter_;
+ SetProofInvalid();
scfg_.reset(new_scfg_storage.release());
}
return QUIC_NO_ERROR;
@@ -440,8 +439,7 @@ QuicErrorCode QuicCryptoClientConfig::CachedState::SetServerConfig(
void QuicCryptoClientConfig::CachedState::InvalidateServerConfig() {
server_config_.clear();
scfg_.reset();
- server_config_valid_ = false;
- ++generation_counter_;
+ SetProofInvalid();
}
void QuicCryptoClientConfig::CachedState::SetProof(const vector<string>& certs,
@@ -463,8 +461,7 @@ void QuicCryptoClientConfig::CachedState::SetProof(const vector<string>& certs,
}
// If the proof has changed then it needs to be revalidated.
- server_config_valid_ = false;
- ++generation_counter_;
+ SetProofInvalid();
certs_ = certs;
server_config_sig_ = signature.as_string();
}
@@ -473,6 +470,11 @@ void QuicCryptoClientConfig::CachedState::SetProofValid() {
server_config_valid_ = true;
}
+void QuicCryptoClientConfig::CachedState::SetProofInvalid() {
+ server_config_valid_ = false;
+ ++generation_counter_;
+}
+
const string& QuicCryptoClientConfig::CachedState::server_config() const {
return server_config_;
}