summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpbase5.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-11-29 19:52:17 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-11-29 21:48:23 +0100
commit2e5de46030e2354b851ba731f6c76ac30a2e8a3b (patch)
treee48732e76e7d0ceb4e01caab16c1aa2a119c1ad0 /libkpgp/kpgpbase5.cpp
parent2f0c49e8523a4d26b6bb9c7c8a05d68cb023a568 (diff)
downloadtdepim-2e5de46030e2354b851ba731f6c76ac30a2e8a3b.tar.gz
tdepim-2e5de46030e2354b851ba731f6c76ac30a2e8a3b.zip
Adapted to new KPasswordEdit::password() signature.
This relates to bug 2961. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'libkpgp/kpgpbase5.cpp')
-rw-r--r--libkpgp/kpgpbase5.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libkpgp/kpgpbase5.cpp b/libkpgp/kpgpbase5.cpp
index 7f8e405a..dad10b3f 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 char *passphrase )
+Base5::clearsign( Block& block, const TQString& passphrase )
{
return encsign( block, KeyIDList(), passphrase );
}
@@ -63,7 +63,7 @@ Base5::clearsign( Block& block, const char *passphrase )
int
Base5::encsign( Block& block, const KeyIDList& recipients,
- const char *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 != 0)
+ if (!recipients.isEmpty() && !passphrase.isNull())
cmd = "pgpe +batchmode -afts ";
else if(!recipients.isEmpty())
cmd = "pgpe +batchmode -aft ";
- else if(passphrase != 0)
+ else if (!passphrase.isNull())
{
cmd = "pgps +batchmode -abft ";
signonly = true;
@@ -88,7 +88,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients,
return OK;
}
- if(passphrase != 0)
+ if (!passphrase.isNull())
cmd += addUserId();
if(!recipients.isEmpty())
@@ -191,7 +191,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients,
int
-Base5::decrypt( Block& block, const char *passphrase )
+Base5::decrypt( Block& block, const TQString& passphrase )
{
int exitStatus = 0;
@@ -222,7 +222,7 @@ Base5::decrypt( Block& block, const char *passphrase )
// or do we not have the secret key?
if(error.find("Need a pass phrase") != -1)
{
- if(passphrase != 0)
+ if (!passphrase.isNull())
{
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 char *passphrase)
+Base5::signKey(const KeyID& keyID, const TQString& passphrase)
{
TQCString cmd;
int exitStatus = 0;
- if(passphrase == 0) return false;
+ if (passphrase.isNull()) return false;
cmd = "pgpk -s -f +batchmode=1 0x";
cmd += keyID;