Update tde2e/tgcalls.

This commit is contained in:
John Preston 2025-04-15 20:13:58 +04:00
parent 70378bfac8
commit 937eab5f27
5 changed files with 12 additions and 7 deletions

View file

@ -75,11 +75,12 @@ constexpr auto kShortPollChainBlocksWaitFor = crl::time(1000);
} // namespace
auto EncryptDecrypt::callback()
-> Fn<EncryptionBuffer(const EncryptionBuffer&, int64_t, bool)> {
-> Fn<EncryptionBuffer(const EncryptionBuffer&, int64_t, bool, int32_t)> {
return [that = shared_from_this()](
const EncryptionBuffer &data,
int64_t userId,
bool encrypt) -> EncryptionBuffer {
bool encrypt,
int32_t unencryptedPrefixSize) -> EncryptionBuffer {
const auto libId = that->_id.load();
if (!libId) {
return {};
@ -87,7 +88,11 @@ auto EncryptDecrypt::callback()
const auto channelId = tde2e_api::CallChannelId(0);
const auto slice = Slice(data);
const auto result = encrypt
? tde2e_api::call_encrypt(libId, channelId, slice)
? tde2e_api::call_encrypt(
libId,
channelId,
slice,
size_t(unencryptedPrefixSize))
: tde2e_api::call_decrypt(libId, userId, channelId, slice);
if (!result.is_ok()) {
return {};

View file

@ -73,7 +73,7 @@ class EncryptDecrypt final
: public std::enable_shared_from_this<EncryptDecrypt> {
public:
[[nodiscard]] auto callback()
-> Fn<EncryptionBuffer(const EncryptionBuffer&, int64_t, bool)>;
-> Fn<EncryptionBuffer(const EncryptionBuffer&, int64_t, bool, int32_t)>;
void setCallId(CallId id);
void clearCallId(CallId fromId);

@ -1 +1 @@
Subproject commit 7f04d5360f3208d032dffdf634c8ff9c508da2f1
Subproject commit e87034dbdd8c209318aca57c4ff417117398d14f

View file

@ -818,7 +818,7 @@ COPY --link --from=openssl {{ LibrariesPath }}/openssl-cache /
RUN git init td \
&& cd td \
&& git remote add origin {{ GIT }}/tdlib/td.git \
&& git fetch --depth=1 origin 04adfc87deea4c804def118e88c89a08c388b32b \
&& git fetch --depth=1 origin f1b7500310baa496c0b779e4273a3aff0f14f42f \
&& git reset --hard FETCH_HEAD \
&& rm -rf .git \
&& env -u CFLAGS -u CXXFLAGS cmake -B out/Release . \

View file

@ -1928,7 +1928,7 @@ win:
stage('td', """
git clone https://github.com/tdlib/td.git
cd td
git checkout 04adfc87de
git checkout f1b7500310
win:
SET OPENSSL_DIR=%LIBS_DIR%\\openssl3
SET OPENSSL_LIBS_DIR=%OPENSSL_DIR%\\out