aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-01-30 01:26:30 +0100
committerTobias Fella <fella@posteo.de>2021-12-01 21:34:52 +0100
commit4593856411a2a8e4b82333abd5684b253daab47c (patch)
treebb03be717418c47d2bcc3c2d2aea3920b9a42bc3 /lib/crypto
parentf9f7d130e5768d0f69edc8900d37f540b61fa974 (diff)
downloadlibquotient-4593856411a2a8e4b82333abd5684b253daab47c.tar.gz
libquotient-4593856411a2a8e4b82333abd5684b253daab47c.zip
Add more test and use macro to remove duplicated code
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/qolmaccount.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/crypto/qolmaccount.cpp b/lib/crypto/qolmaccount.cpp
index 24fd87f2..750d7318 100644
--- a/lib/crypto/qolmaccount.cpp
+++ b/lib/crypto/qolmaccount.cpp
@@ -272,6 +272,7 @@ bool Quotient::verifyIdentitySignature(const DeviceKeys &deviceKeys,
const auto signingKey = deviceKeys.keys[signKeyId];
const auto signature = deviceKeys.signatures[userId][signKeyId];
+
if (signature.isEmpty()) {
return false;
}
@@ -292,7 +293,9 @@ bool Quotient::ed25519VerifySignature(QString signingKey,
QJsonDocument doc;
doc.setObject(obj);
- auto canonicalJson = doc.toJson();
+ auto canonicalJson = doc.toJson(QJsonDocument::Compact);
+
+ qDebug() << canonicalJson;
QByteArray signingKeyBuf = signingKey.toUtf8();
QOlmUtility utility;