Change max TLS packet length.

GitOrigin-RevId: 00f896d94fa434fa867f6df5c910bbe0cf96d5ee
This commit is contained in:
levlam 2019-07-02 01:58:01 +03:00
parent d694b24418
commit ef3cf44240
2 changed files with 1 additions and 6 deletions

View File

@ -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_

View File

@ -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;