Fix alpine ca (#354)

* fix ca loading for alpine

* fix ca loading for alpine

* fix ca loading for alpine

* change gzipped detection

* change gzipped detection

---------

Co-authored-by: Daniel Eisenberg <danielei@checkpoint.com>
This commit is contained in:
Daniel-Eisenberg
2025-09-30 18:19:15 +03:00
committed by GitHub
parent 0c0da6d91b
commit b74957d9d4
11 changed files with 213 additions and 15 deletions

View File

@@ -1912,6 +1912,17 @@ base64Decode(const string &input)
return out;
}
bool
isGzipped(const string &stream)
{
if (stream.size() < 2) return false;
auto unsinged_stream = reinterpret_cast<const u_char *>(stream.data());
dbgTrace(D_WAAP) << "isGzipped: first two bytes: "
<< std::hex << static_cast<int>(unsinged_stream[0]) << " "
<< std::hex << static_cast<int>(unsinged_stream[1]);
return unsinged_stream[0] == 0x1f && unsinged_stream[1] == 0x8b;
}
bool
containsInvalidUtf8(const string &payload)
{