Change max TLS packet length.
GitOrigin-RevId: 00f896d94fa434fa867f6df5c910bbe0cf96d5ee
This commit is contained in:
parent
d694b24418
commit
ef3cf44240
@ -181,7 +181,7 @@ class ObfuscatedTransport : public IStreamTransport {
|
||||
ByteFlowSink byte_flow_sink_;
|
||||
ChainBufferReader *input_;
|
||||
|
||||
static constexpr int32 MAX_TLS_PACKET_LENGTH = 1 << 14;
|
||||
static constexpr int32 MAX_TLS_PACKET_LENGTH = 2878;
|
||||
|
||||
// TODO: use ByteFlow?
|
||||
// One problem is that BufferedFd owns output_buffer_
|
||||
|
@ -25,11 +25,6 @@ void TlsReaderByteFlow::loop() {
|
||||
return;
|
||||
}
|
||||
size_t len = (buf[3] << 8) | buf[4];
|
||||
if (len > (1 << 14)) {
|
||||
close_input(Status::Error("Packet length is too big (emulated tls)"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (it.size() < len) {
|
||||
set_need_size(5 + len);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user