mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-24 04:01:07 +03:00
Unconditionally defer control of writing session tickets to quic layer.
Summary: There is no reason to let the TLS layer control this. Reviewed By: jbeshay Differential Revision: D51267586 fbshipit-source-id: 6f70b7f6ba51a9a022195f7e2c1683b5323fde7a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e6085c04a6
commit
8c68b18df3
@@ -59,8 +59,8 @@ void FizzServerHandshake::initializeImpl(
|
||||
context->setFactory(cryptoFactory_->getFizzFactory());
|
||||
context->setSupportedCiphers({{fizz::CipherSuite::TLS_AES_128_GCM_SHA256}});
|
||||
context->setVersionFallbackEnabled(false);
|
||||
// Since Draft-17, client won't sent EOED
|
||||
context->setOmitEarlyRecordLayer(true);
|
||||
context->setSendNewSessionTicket(false);
|
||||
state_.context() = std::move(context);
|
||||
callback_ = callback;
|
||||
|
||||
|
||||
@@ -564,7 +564,7 @@ bool QuicServerTransport::shouldWriteNewSessionTicket() {
|
||||
}
|
||||
|
||||
void QuicServerTransport::maybeWriteNewSessionTicket() {
|
||||
if (shouldWriteNewSessionTicket() && !ctx_->getSendNewSessionTicket() &&
|
||||
if (shouldWriteNewSessionTicket() &&
|
||||
serverConn_->serverHandshakeLayer->isHandshakeDone()) {
|
||||
if (conn_->qLogger) {
|
||||
conn_->qLogger->addTransportStateUpdate(kWriteNst);
|
||||
|
||||
@@ -4043,13 +4043,14 @@ TEST_F(
|
||||
|
||||
std::vector<int> indices =
|
||||
getQLogEventIndices(QLogEventType::TransportStateUpdate, qLogger);
|
||||
EXPECT_EQ(indices.size(), 4);
|
||||
std::array<::std::string, 4> updateArray = {
|
||||
EXPECT_EQ(indices.size(), 5);
|
||||
std::array<::std::string, 5> updateArray = {
|
||||
kDerivedZeroRttReadCipher,
|
||||
kDerivedOneRttWriteCipher,
|
||||
kTransportReady,
|
||||
kDerivedOneRttReadCipher};
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
kDerivedOneRttReadCipher,
|
||||
kWriteNst};
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
auto tmp = std::move(qLogger->logs[indices[i]]);
|
||||
auto event = dynamic_cast<QLogTransportStateUpdateEvent*>(tmp.get());
|
||||
EXPECT_EQ(event->update, updateArray[i]);
|
||||
|
||||
@@ -350,13 +350,9 @@ class QuicServerTransportTestBase : public virtual testing::Test {
|
||||
virtual void expectWriteNewSessionTicket() {
|
||||
server->setEarlyDataAppParamsFunctions(
|
||||
[](const folly::Optional<std::string>&, const Buf&) { return false; },
|
||||
[]() -> Buf {
|
||||
// This function shouldn't be called
|
||||
EXPECT_TRUE(false);
|
||||
return nullptr;
|
||||
});
|
||||
[]() -> Buf { return nullptr; });
|
||||
EXPECT_CALL(*getFakeHandshakeLayer(), writeNewSessionTicket(testing::_))
|
||||
.Times(0);
|
||||
.Times(1);
|
||||
}
|
||||
|
||||
virtual void setupConnection() {
|
||||
|
||||
Reference in New Issue
Block a user