aboutsummaryrefslogtreecommitdiff
path: root/autotests/testolmutility.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 15:20:53 +0200
committerGitHub <noreply@github.com>2022-09-26 15:20:53 +0200
commit4c8dcbc308eb0f4900e416e698f5f30e71daaad8 (patch)
treeaa5fdaa81234a21c6919fac4958f84d7c26cd397 /autotests/testolmutility.cpp
parent5904a61c59f0eef00aef07ef998658fd791ff139 (diff)
parent15b840d82d4794358fbf1271ea76e446b47db7e5 (diff)
downloadlibquotient-4c8dcbc308eb0f4900e416e698f5f30e71daaad8.tar.gz
libquotient-4c8dcbc308eb0f4900e416e698f5f30e71daaad8.zip
Merge #571: Unify reporting and handling of Olm errors
Diffstat (limited to 'autotests/testolmutility.cpp')
-rw-r--r--autotests/testolmutility.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/autotests/testolmutility.cpp b/autotests/testolmutility.cpp
index 1d461a94..4de5afdf 100644
--- a/autotests/testolmutility.cpp
+++ b/autotests/testolmutility.cpp
@@ -49,7 +49,7 @@ void TestOlmUtility::canonicalJSON()
void TestOlmUtility::verifySignedOneTimeKey()
{
- QOlmAccount aliceOlm { "@alice:matrix.org", "aliceDevice" };
+ QOlmAccount aliceOlm { u"@alice:matrix.org", u"aliceDevice" };
aliceOlm.createNewAccount();
aliceOlm.generateOneTimeKeys(1);
auto keys = aliceOlm.oneTimeKeys();
@@ -64,16 +64,13 @@ void TestOlmUtility::verifySignedOneTimeKey()
auto utility = olm_utility(utilityBuf);
- QByteArray signatureBuf1(sig.length(), '0');
+ QByteArray signatureBuf1(sig.length(), '\0');
std::copy(sig.begin(), sig.end(), signatureBuf1.begin());
- auto res = olm_ed25519_verify(utility,
- aliceOlm.identityKeys().ed25519.data(),
- aliceOlm.identityKeys().ed25519.size(),
- msg.data(),
- msg.size(),
- (void *)sig.data(),
- sig.size());
+ auto res =
+ olm_ed25519_verify(utility, aliceOlm.identityKeys().ed25519.data(),
+ aliceOlm.identityKeys().ed25519.size(), msg.data(),
+ msg.size(), sig.data(), sig.size());
QCOMPARE(std::string(olm_utility_last_error(utility)), "SUCCESS");
QCOMPARE(res, 0);