diff options
Diffstat (limited to '')
-rw-r--r-- | src/gpg/gpg_context/GpgContext.cpp | 2 | ||||
-rw-r--r-- | src/gpg/gpg_context/GpgContextKeyOpera.cpp | 3 | ||||
-rw-r--r-- | src/ui/main_window/MainWindowServerSlotFunction.cpp | 2 |
3 files changed, 2 insertions, 5 deletions
diff --git a/src/gpg/gpg_context/GpgContext.cpp b/src/gpg/gpg_context/GpgContext.cpp index 8b12b302..14b54b32 100644 --- a/src/gpg/gpg_context/GpgContext.cpp +++ b/src/gpg/gpg_context/GpgContext.cpp @@ -42,8 +42,6 @@ namespace GpgME { * Set up gpgme-context, set paths to app-run path */ GpgContext::GpgContext() { - /** get application path */ - QString appPath = qApp->applicationDirPath(); /** The function `gpgme_check_version' must be called before any other * function in the library, because it initializes the thread support diff --git a/src/gpg/gpg_context/GpgContextKeyOpera.cpp b/src/gpg/gpg_context/GpgContextKeyOpera.cpp index 4fa2e8c5..f60ef9ba 100644 --- a/src/gpg/gpg_context/GpgContextKeyOpera.cpp +++ b/src/gpg/gpg_context/GpgContextKeyOpera.cpp @@ -255,7 +255,6 @@ void GpgME::GpgContext::deleteKeys(QStringList *uidList) { * @return if success */ bool GpgME::GpgContext::exportKeys(const QVector<GpgKey> &keys, QByteArray &outBuffer) { - size_t read_bytes; gpgme_data_t data_out = nullptr; outBuffer.resize(0); @@ -271,7 +270,7 @@ bool GpgME::GpgContext::exportKeys(const QVector<GpgKey> &keys, QByteArray &outB err = gpgme_op_export(mCtx, key.id.toUtf8().constData(), 0, data_out); checkErr(err); - read_bytes = gpgme_data_seek(data_out, 0, SEEK_END); + gpgme_data_seek(data_out, 0, SEEK_END); err = readToBuffer(data_out, &outBuffer); checkErr(err); diff --git a/src/ui/main_window/MainWindowServerSlotFunction.cpp b/src/ui/main_window/MainWindowServerSlotFunction.cpp index 13dc6af3..3a7e9f71 100644 --- a/src/ui/main_window/MainWindowServerSlotFunction.cpp +++ b/src/ui/main_window/MainWindowServerSlotFunction.cpp @@ -120,7 +120,7 @@ QString MainWindow::getCryptText(const QString &shortenCryptoText) { QCryptographicHash sha_generator(QCryptographicHash::Sha256); sha_generator.addData(cryptoText.toUtf8()); - if (sha_generator.result().toHex() == sha) { + if (sha_generator.result().toHex() == sha && serviceToken == serviceTokenFromServer) { return cryptoText; } else QMessageBox::critical(this, tr("Error"), tr("Invalid short ciphertext")); |