diff options
Diffstat (limited to 'libkpgp/kpgpbase2.cpp')
-rw-r--r-- | libkpgp/kpgpbase2.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp index 2d16951c..7299762e 100644 --- a/libkpgp/kpgpbase2.cpp +++ b/libkpgp/kpgpbase2.cpp @@ -29,7 +29,7 @@ #include <tqdatetime.h> #include <tdelocale.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kdebug.h> #define PGP2 "pgp" @@ -55,7 +55,7 @@ Base2::encrypt( Block& block, const KeyIDList& recipients ) int -Base2::clearsign( Block& block, const char *passphrase ) +Base2::clearsign( Block& block, const TQString &passphrase ) { return encsign( block, KeyIDList(), passphrase ); } @@ -63,16 +63,16 @@ Base2::clearsign( Block& block, const char *passphrase ) int Base2::encsign( Block& block, const KeyIDList& recipients, - const char *passphrase ) + const TQString &passphrase ) { TQCString cmd; int exitStatus = 0; - if(!recipients.isEmpty() && passphrase != 0) + if (!recipients.isEmpty() && !passphrase.isEmpty()) cmd = PGP2 " +batchmode +language=en +verbose=1 -seat"; else if(!recipients.isEmpty()) cmd = PGP2 " +batchmode +language=en +verbose=1 -eat"; - else if(passphrase != 0) + else if (!passphrase.isEmpty()) cmd = PGP2 " +batchmode +language=en +verbose=1 -sat"; else { @@ -80,7 +80,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, return OK; } - if(passphrase != 0) + if (!passphrase.isEmpty()) cmd += addUserId(); if(!recipients.isEmpty()) { @@ -115,7 +115,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, if(!recipients.isEmpty()) { int index = 0; - bool bad = FALSE; + bool bad = false; unsigned int num = 0; TQCString badkeys = ""; if (error.find("Cannot find the public key") != -1) @@ -125,7 +125,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, while((index = error.find("Cannot find the public key",index)) != -1) { - bad = TRUE; + bad = true; index = error.find('\'',index); int index2 = error.find('\'',index+1); if (num++) @@ -156,7 +156,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, while((index = error.find("skipping userid",index)) != -1) { - bad = TRUE; + bad = true; int index2 = error.find('\n',index+16); if (num++) badkeys += ", "; @@ -185,7 +185,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, } } #endif - if(passphrase != 0) + if (!passphrase.isEmpty()) { if(error.find("Pass phrase is good") != -1) { @@ -224,7 +224,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, int -Base2::decrypt( Block& block, const char *passphrase ) +Base2::decrypt( Block& block, const TQString &passphrase ) { int index, index2; int exitStatus = 0; @@ -294,7 +294,7 @@ Base2::decrypt( Block& block, const char *passphrase ) block.setRequiredUserId( error.mid(index, index2 - index) ); //kdDebug(5100) << "Base: key needed is \"" << block.requiredUserId() << "\"!\n"; - if((passphrase != 0) && (error.find("Bad pass phrase") != -1)) + if ((!passphrase.isEmpty()) && (error.find("Bad pass phrase") != -1)) { errMsg = i18n("Bad passphrase; could not decrypt."); kdDebug(5100) << "Base: passphrase is bad" << endl; @@ -573,7 +573,7 @@ Base2::secretKeys( const TQStringList & patterns ) int -Base2::signKey(const KeyID& keyID, const char *passphrase) +Base2::signKey(const KeyID& keyID, const TQString &passphrase) { TQCString cmd; int exitStatus = 0; |