mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-09 10:00:57 +03:00
Back out "Implement handshake done and cipher dropping."
Summary: This caused an increase in client errors. Reviewed By: yangchi, lnicco Differential Revision: D20186386 fbshipit-source-id: 737122a94c97498efba61292a6c292cfe482925c
This commit is contained in:
committed by
Facebook Github Bot
parent
8a386d9549
commit
61cd1a7289
@@ -242,28 +242,25 @@ void updateHandshakeState(QuicServerConnectionState& conn) {
|
||||
}
|
||||
auto handshakeWriteCipher = handshakeLayer->getHandshakeWriteCipher();
|
||||
auto handshakeReadCipher = handshakeLayer->getHandshakeReadCipher();
|
||||
if (handshakeWriteCipher) {
|
||||
conn.handshakeWriteCipher = std::move(handshakeWriteCipher);
|
||||
}
|
||||
if (handshakeReadCipher) {
|
||||
conn.readCodec->setHandshakeReadCipher(std::move(handshakeReadCipher));
|
||||
}
|
||||
auto handshakeWriteHeaderCipher =
|
||||
handshakeLayer->getHandshakeWriteHeaderCipher();
|
||||
auto handshakeReadHeaderCipher =
|
||||
handshakeLayer->getHandshakeReadHeaderCipher();
|
||||
if (handshakeWriteCipher) {
|
||||
CHECK(
|
||||
handshakeReadCipher && handshakeWriteHeaderCipher &&
|
||||
handshakeReadHeaderCipher);
|
||||
conn.handshakeWriteCipher = std::move(handshakeWriteCipher);
|
||||
if (handshakeWriteHeaderCipher) {
|
||||
conn.handshakeWriteHeaderCipher = std::move(handshakeWriteHeaderCipher);
|
||||
conn.readCodec->setHandshakeReadCipher(std::move(handshakeReadCipher));
|
||||
}
|
||||
if (handshakeReadHeaderCipher) {
|
||||
conn.readCodec->setHandshakeHeaderCipher(
|
||||
std::move(handshakeReadHeaderCipher));
|
||||
}
|
||||
if (handshakeLayer->isHandshakeDone()) {
|
||||
CHECK(conn.oneRttWriteCipher);
|
||||
if (conn.handshakeWriteCipher) {
|
||||
handshakeConfirmed(conn);
|
||||
if (conn.version == QuicVersion::QUIC_DRAFT) {
|
||||
sendSimpleFrame(conn, HandshakeDoneFrame());
|
||||
}
|
||||
}
|
||||
conn.readCodec->onHandshakeDone(Clock::now());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -970,14 +967,6 @@ void onServerReadDataFromOpen(
|
||||
}
|
||||
}
|
||||
}
|
||||
// If we've processed a handshake packet, we can dicard the initial cipher.
|
||||
if (encryptionLevel == EncryptionLevel::Handshake) {
|
||||
conn.initialWriteCipher.reset();
|
||||
conn.initialHeaderCipher.reset();
|
||||
conn.readCodec->setInitialReadCipher(nullptr);
|
||||
conn.readCodec->setInitialHeaderCipher(nullptr);
|
||||
cancelCryptoStream(conn.cryptoState->initialStream);
|
||||
}
|
||||
|
||||
// Update writable limit before processing the handshake data. This is so
|
||||
// that if we haven't decided whether or not to validate the peer, we won't
|
||||
|
||||
Reference in New Issue
Block a user