Unconditionally call CryptoUtils::CreateInitialObfuscators
gfe-relnote: refactor how CryptoUtils::CreateInitialObfuscators gets called, no behavior change
PiperOrigin-RevId: 268972396
Change-Id: Ie3dfa509138d0b756dbd239dadc6cad68545ed6f
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index 727917b..db6b867 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -4166,6 +4166,14 @@
encrypter_[level] = std::move(encrypter);
}
+void QuicFramer::SetInitialObfuscators(QuicConnectionId connection_id) {
+ CrypterPair crypters;
+ CryptoUtils::CreateInitialObfuscators(perspective_, version_, connection_id,
+ &crypters);
+ encrypter_[ENCRYPTION_INITIAL] = std::move(crypters.encrypter);
+ decrypter_[ENCRYPTION_INITIAL] = std::move(crypters.decrypter);
+}
+
size_t QuicFramer::EncryptInPlace(EncryptionLevel level,
QuicPacketNumber packet_number,
size_t ad_len,