Skip to content

Commit

Permalink
wanring fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ladnir committed Jun 12, 2024
1 parent 3298b42 commit 32ad128
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ jobs:

- name: unit tests
run: |
pwd
ls .out
ls .out/build
ls .out/build/linux
ls .out/build/linux/frontend
./out/build/linux/frontend/frontend_libOTe -u
./out/build/linux/frontend/frontend_libOTe -u

- name: find source tree
Expand Down
2 changes: 1 addition & 1 deletion cryptoTools
25 changes: 13 additions & 12 deletions libOTe/Base/MasnyRindalKyber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace osuCrypto
span<block> messages,
PRNG& prng,
Socket& chl)
try {
{
MACORO_TRY{
static_assert(std::is_trivial<KyberOtRecvPKs>::value, "");
static_assert(std::is_trivial<KyberOTCtxt>::value, "");

Expand Down Expand Up @@ -40,18 +41,18 @@ namespace osuCrypto
KyberReceiverStrings(&ot[i], &ctxts[i]);
memcpy(&messages[i], ot[i].rot, sizeof(block));
}
}
catch (...)
{
chl.close();
throw;
} MACORO_CATCH(eptr) {
co_await chl.close();
std::rethrow_exception(eptr);
}
}

task<> MasnyRindalKyber::send(
span<std::array<block, 2>> messages,
PRNG& prng,
Socket& chl)
try {
{
MACORO_TRY{
auto pkBuff = std::vector<KyberOtRecvPKs>{};
auto ctxts = std::vector<KyberOTCtxt>{};
auto ptxt = KyberOTPtxt{ };
Expand All @@ -76,11 +77,11 @@ namespace osuCrypto
}

co_await chl.send(std::move(ctxts));
}
catch (...)
{
chl.close();
throw;

} MACORO_CATCH(eptr) {
co_await chl.close();
std::rethrow_exception(eptr);
}
}
}
#endif

0 comments on commit 32ad128

Please sign in to comment.