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

Unified Diff: net/quic/quic_connection.cc

Issue 1904213002: QUIC: support diversified keys with version 33. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hkdf
Patch Set: Rebase Created 4 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/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index c8a132f6e52ae99490232982c2eaa9721050d8db..1d7f3e5d15b5e59dcb0f3ac093c48b5bb80b823d 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -624,6 +624,7 @@ bool QuicConnection::OnUnauthenticatedHeader(const QuicPacketHeader& header) {
void QuicConnection::OnDecryptedPacket(EncryptionLevel level) {
last_decrypted_packet_level_ = level;
last_packet_decrypted_ = true;
+
// If this packet was foward-secure encrypted and the forward-secure encrypter
// is not being used, start using it.
if (encryption_level_ != ENCRYPTION_FORWARD_SECURE &&
@@ -1842,6 +1843,11 @@ void QuicConnection::SetEncrypter(EncryptionLevel level,
}
}
+void QuicConnection::SetDiversificationNonce(const DiversificationNonce nonce) {
+ DCHECK_EQ(Perspective::IS_SERVER, perspective_);
+ packet_generator_.SetDiversificationNonce(nonce);
+}
+
void QuicConnection::SetDefaultEncryptionLevel(EncryptionLevel level) {
encryption_level_ = level;
packet_generator_.set_encryption_level(level);
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698