From 6492b716b372d0f929f98a2965e00e10a0355204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 30 Nov 2018 16:17:09 +0100 Subject: Improved previous commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko Signed-off-by: Michele Calgaro --- libkpgp/kpgpbase5.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libkpgp/kpgpbase5.cpp') diff --git a/libkpgp/kpgpbase5.cpp b/libkpgp/kpgpbase5.cpp index dad10b3fd..c3a8a9d34 100644 --- a/libkpgp/kpgpbase5.cpp +++ b/libkpgp/kpgpbase5.cpp @@ -55,7 +55,7 @@ Base5::encrypt( Block& block, const KeyIDList& recipients ) int -Base5::clearsign( Block& block, const TQString& passphrase ) +Base5::clearsign( Block& block, const TQString &passphrase ) { return encsign( block, KeyIDList(), passphrase ); } @@ -63,7 +63,7 @@ Base5::clearsign( Block& block, const TQString& passphrase ) int Base5::encsign( Block& block, const KeyIDList& recipients, - const TQString& passphrase ) + const TQString &passphrase ) { TQCString cmd; int exitStatus = 0; @@ -73,11 +73,11 @@ Base5::encsign( Block& block, const KeyIDList& recipients, // we want a clear signature bool signonly = false; - if (!recipients.isEmpty() && !passphrase.isNull()) + if (!recipients.isEmpty() && !passphrase.isEmpty()) cmd = "pgpe +batchmode -afts "; else if(!recipients.isEmpty()) cmd = "pgpe +batchmode -aft "; - else if (!passphrase.isNull()) + else if (!passphrase.isEmpty()) { cmd = "pgps +batchmode -abft "; signonly = true; @@ -88,7 +88,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients, return OK; } - if (!passphrase.isNull()) + if (!passphrase.isEmpty()) cmd += addUserId(); if(!recipients.isEmpty()) @@ -191,7 +191,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients, int -Base5::decrypt( Block& block, const TQString& passphrase ) +Base5::decrypt( Block& block, const TQString &passphrase ) { int exitStatus = 0; @@ -222,7 +222,7 @@ Base5::decrypt( Block& block, const TQString& passphrase ) // or do we not have the secret key? if(error.find("Need a pass phrase") != -1) { - if (!passphrase.isNull()) + if (!passphrase.isEmpty()) { errMsg = i18n("Bad passphrase; could not decrypt."); kdDebug(5100) << "Base: passphrase is bad" << endl; @@ -433,12 +433,12 @@ TQCString Base5::getAsciiPublicKey(const KeyID& keyID) int -Base5::signKey(const KeyID& keyID, const TQString& passphrase) +Base5::signKey(const KeyID& keyID, const TQString &passphrase) { TQCString cmd; int exitStatus = 0; - if (passphrase.isNull()) return false; + if (passphrase.isEmpty()) return false; cmd = "pgpk -s -f +batchmode=1 0x"; cmd += keyID; -- cgit v1.2.1