summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpbaseG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkpgp/kpgpbaseG.cpp')
-rw-r--r--libkpgp/kpgpbaseG.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp
index 768d5c023..5aa619ec6 100644
--- a/libkpgp/kpgpbaseG.cpp
+++ b/libkpgp/kpgpbaseG.cpp
@@ -73,7 +73,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients,
const char *passphrase )
{
TQCString cmd;
- int exitStatus = 0;
+ int exiStatus = 0;
if(!recipients.isEmpty() && passphrase != 0)
cmd = "--batch --armor --sign --encrypt --textmode";
@@ -109,12 +109,12 @@ BaseG::encsign( Block& block, const KeyIDList& recipients,
clear();
input = block.text();
- exitStatus = runGpg(cmd.data(), passphrase);
+ exiStatus = runGpg(cmd.data(), passphrase);
if( !output.isEmpty() )
block.setProcessedText( output );
block.setError( error );
- if( exitStatus != 0 )
+ if( exiStatus != 0 )
{
// this error message is later hopefully overwritten
errMsg = i18n( "Unknown error." );
@@ -199,7 +199,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients,
}
//kdDebug(5100) << "status = " << status << endl;
- block.setStatus( status );
+ block.seStatus( status );
return status;
}
@@ -208,19 +208,19 @@ int
BaseG::decrypt( Block& block, const char *passphrase )
{
int index, index2;
- int exitStatus = 0;
+ int exiStatus = 0;
clear();
input = block.text();
- exitStatus = runGpg("--batch --decrypt", passphrase);
+ exiStatus = runGpg("--batch --decrypt", passphrase);
if( !output.isEmpty() && ( error.find( "gpg: quoted printable" ) == -1 ) )
block.setProcessedText( output );
block.setError( error );
- if(exitStatus == -1) {
+ if(exiStatus == -1) {
errMsg = i18n("Error running gpg");
status = RUN_ERR;
- block.setStatus( status );
+ block.seStatus( status );
return status;
}
@@ -361,7 +361,7 @@ BaseG::decrypt( Block& block, const char *passphrase )
}
}
//kdDebug(5100) << "status = " << status << endl;
- block.setStatus( status );
+ block.seStatus( status );
return status;
}
@@ -371,15 +371,15 @@ BaseG::readPublicKey( const KeyID& keyID,
const bool readTrust /* = false */,
Key* key /* = 0 */ )
{
- int exitStatus = 0;
+ int exiStatus = 0;
status = 0;
if( readTrust )
- exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true );
+ exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true );
else
- exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true );
+ exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true );
- if(exitStatus != 0) {
+ if(exiStatus != 0) {
status = ERROR;
return 0;
}
@@ -405,7 +405,7 @@ BaseG::readPublicKey( const KeyID& keyID,
KeyList
BaseG::publicKeys( const TQStringList & patterns )
{
- int exitStatus = 0;
+ int exiStatus = 0;
// the option --with-colons should be used for interprocess communication
// with gpg (according to Werner Koch)
@@ -417,9 +417,9 @@ BaseG::publicKeys( const TQStringList & patterns )
cmd += KProcess::quote( *it ).local8Bit();
}
status = 0;
- exitStatus = runGpg( cmd, 0, true );
+ exiStatus = runGpg( cmd, 0, true );
- if(exitStatus != 0) {
+ if(exiStatus != 0) {
status = ERROR;
return KeyList();
}
@@ -437,7 +437,7 @@ BaseG::publicKeys( const TQStringList & patterns )
KeyList
BaseG::secretKeys( const TQStringList & patterns )
{
- int exitStatus = 0;
+ int exiStatus = 0;
// the option --with-colons should be used for interprocess communication
// with gpg (according to Werner Koch)
@@ -449,9 +449,9 @@ BaseG::secretKeys( const TQStringList & patterns )
cmd += KProcess::quote( *it ).local8Bit();
}
status = 0;
- exitStatus = runGpg( cmd, 0, true );
+ exiStatus = runGpg( cmd, 0, true );
- if(exitStatus != 0) {
+ if(exiStatus != 0) {
status = ERROR;
return KeyList();
}
@@ -470,7 +470,7 @@ int
BaseG::signKey(const KeyID& keyID, const char *passphrase)
{
TQCString cmd;
- int exitStatus = 0;
+ int exiStatus = 0;
cmd = "--batch";
cmd += addUserId();
@@ -478,9 +478,9 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase)
cmd += keyID;
status = 0;
- exitStatus = runGpg(cmd.data(), passphrase);
+ exiStatus = runGpg(cmd.data(), passphrase);
- if (exitStatus != 0)
+ if (exiStatus != 0)
status = ERROR;
return status;
@@ -490,15 +490,15 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase)
QCString
BaseG::getAsciiPublicKey(const KeyID& keyID)
{
- int exitStatus = 0;
+ int exiStatus = 0;
if (keyID.isEmpty())
return TQCString();
status = 0;
- exitStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true);
+ exiStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true);
- if(exitStatus != 0) {
+ if(exiStatus != 0) {
status = ERROR;
return TQCString();
}
@@ -542,7 +542,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
bool bIsPublicKey = false;
if( ( bIsPublicKey = !strncmp( output.data() + index, "pub:", 4 ) )
|| !strncmp( output.data() + index, "sec:", 4 ) )
- { // line contains primary key data
+ { // line tqcontains primary key data
// Example: pub:f:1024:17:63CB691DFAEBD5FC:860451781::379:-:::scESC:
// abort parsing if we found the start of the next key
@@ -657,7 +657,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
key->addSubkey( subkey );
}
else if( !strncmp( output.data() + index, "uid:", 4 ) )
- { // line contains a user id
+ { // line tqcontains a user id
// Example: uid:f::::::::Philip R. Zimmermann <prz@pgp.com>:
UserID *userID = new UserID( "" );
@@ -710,19 +710,19 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
break;
case 10: // User-ID
TQCString uid = output.mid( pos, pos2-pos );
- // replace "\xXX" with the corresponding character;
+ // tqreplace "\xXX" with the corresponding character;
// other escaped characters, i.e. \n, \r etc., are ignored
// because they shouldn't appear in user IDs
for ( int idx = 0 ; (idx = uid.find( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
str[0] = (char) TQString( uid.mid( idx + 2, 2 ) ).toShort( 0, 16 );
- uid.replace( idx, 4, str );
+ uid.tqreplace( idx, 4, str );
}
TQString uidString = TQString::fromUtf8( uid.data() );
// check whether uid was utf-8 encoded
bool isUtf8 = true;
for ( unsigned int i = 0; i + 1 < uidString.length(); ++i ) {
- if ( uidString[i].unicode() == 0xdbff &&
+ if ( uidString[i].tqunicode() == 0xdbff &&
uidString[i+1].row() == 0xde ) {
// we found a non-Unicode character (see TQString::fromUtf8())
isUtf8 = false;
@@ -778,7 +778,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
else {
// assume latin1 encoding
kdDebug(5100) << "Assume latin1 encoding." << endl;
- uidString = TQString::fromLatin1( uid.data() );
+ uidString = TQString::tqfromLatin1( uid.data() );
}
}
userID->setText( uidString );
@@ -792,7 +792,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
key->addUserID( userID );
}
else if( !strncmp( output.data() + index, "fpr:", 4 ) )
- { // line contains a fingerprint
+ { // line tqcontains a fingerprint
// Example: fpr:::::::::17AFBAAF21064E513F037E6E63CB691DFAEBD5FC:
if (key == 0) // invalid key data