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_;
|
ByteFlowSink byte_flow_sink_;
|
||||||
ChainBufferReader *input_;
|
ChainBufferReader *input_;
|
||||||
|
|
||||||
static constexpr int32 MAX_TLS_PACKET_LENGTH = 1 << 14;
|
static constexpr int32 MAX_TLS_PACKET_LENGTH = 2878;
|
||||||
|
|
||||||
// TODO: use ByteFlow?
|
// TODO: use ByteFlow?
|
||||||
// One problem is that BufferedFd owns output_buffer_
|
// One problem is that BufferedFd owns output_buffer_
|
||||||
|
@ -25,11 +25,6 @@ void TlsReaderByteFlow::loop() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
size_t len = (buf[3] << 8) | buf[4];
|
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) {
|
if (it.size() < len) {
|
||||||
set_need_size(5 + len);
|
set_need_size(5 + len);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user