diff options
Diffstat (limited to 'lib/e2ee')
-rw-r--r-- | lib/e2ee/qolmutility.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/e2ee/qolmutility.cpp b/lib/e2ee/qolmutility.cpp index 303f6d75..5d1bc18d 100644 --- a/lib/e2ee/qolmutility.cpp +++ b/lib/e2ee/qolmutility.cpp @@ -49,8 +49,11 @@ std::variant<bool, QOlmError> QOlmUtility::ed25519Verify(const QByteArray &key, const auto ret = olm_ed25519_verify(m_utility, key.data(), key.size(), message.data(), message.size(), (void *)signatureBuf.data(), signatureBuf.size()); - const auto error = ret; - if (error == olm_error()) { + if (ret == olm_error()) { + auto error = lastError(m_utility); + if (error == QOlmError::BadMessageMac) { + return false; + } return lastError(m_utility); } |