mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-11 17:29:16 +05:00
nfqws,tpws: allow client hello with version SSL 3.0 from very old libraries
This commit is contained in:
parent
3fc6b86cf5
commit
8d066b2dcb
@ -177,7 +177,7 @@ bool IsTLSRecordFull(const uint8_t *data, size_t len)
|
|||||||
}
|
}
|
||||||
bool IsTLSClientHello(const uint8_t *data, size_t len, bool bPartialIsOK)
|
bool IsTLSClientHello(const uint8_t *data, size_t len, bool bPartialIsOK)
|
||||||
{
|
{
|
||||||
return len >= 6 && data[0] == 0x16 && data[1] == 0x03 && data[2] >= 0x01 && data[2] <= 0x03 && data[5] == 0x01 && (bPartialIsOK || TLSRecordLen(data) <= len);
|
return len >= 6 && data[0] == 0x16 && data[1] == 0x03 && data[2] <= 0x03 && data[5] == 0x01 && (bPartialIsOK || TLSRecordLen(data) <= len);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t TLSHandshakeLen(const uint8_t *data)
|
size_t TLSHandshakeLen(const uint8_t *data)
|
||||||
|
@ -178,7 +178,7 @@ bool IsTLSRecordFull(const uint8_t *data, size_t len)
|
|||||||
}
|
}
|
||||||
bool IsTLSClientHello(const uint8_t *data, size_t len, bool bPartialIsOK)
|
bool IsTLSClientHello(const uint8_t *data, size_t len, bool bPartialIsOK)
|
||||||
{
|
{
|
||||||
return len >= 6 && data[0] == 0x16 && data[1] == 0x03 && data[2] >= 0x01 && data[2] <= 0x03 && data[5] == 0x01 && (bPartialIsOK || TLSRecordLen(data) <= len);
|
return len >= 6 && data[0] == 0x16 && data[1] == 0x03 && data[2] <= 0x03 && data[5] == 0x01 && (bPartialIsOK || TLSRecordLen(data) <= len);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bPartialIsOK=true - accept partial packets not containing the whole TLS message
|
// bPartialIsOK=true - accept partial packets not containing the whole TLS message
|
||||||
|
Loading…
Reference in New Issue
Block a user