diff options
Diffstat (limited to 'lib/e2ee')
-rw-r--r-- | lib/e2ee/qolmutility.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/e2ee/qolmutility.cpp b/lib/e2ee/qolmutility.cpp index 303f6d75..9f09a37f 100644 --- a/lib/e2ee/qolmutility.cpp +++ b/lib/e2ee/qolmutility.cpp @@ -49,9 +49,12 @@ 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()) { - return lastError(m_utility); + if (ret == olm_error()) { + auto error = lastError(m_utility); + if (error == QOlmError::BadMessageMac) { + return false; + } + return error; } if (ret != 0) { |