summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpbase2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkpgp/kpgpbase2.cpp')
-rw-r--r--libkpgp/kpgpbase2.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp
index 301470b76..06c0d1e60 100644
--- a/libkpgp/kpgpbase2.cpp
+++ b/libkpgp/kpgpbase2.cpp
@@ -66,7 +66,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients,
const char *passphrase )
{
TQCString cmd;
- int exitStatus = 0;
+ int exiStatus = 0;
if(!recipients.isEmpty() && passphrase != 0)
cmd = PGP2 " +batchmode +language=en +verbose=1 -seat";
@@ -100,12 +100,12 @@ Base2::encsign( Block& block, const KeyIDList& recipients,
clear();
input = block.text();
- exitStatus = run(cmd.data(), passphrase);
+ exiStatus = run(cmd.data(), passphrase);
if( !output.isEmpty() )
block.setProcessedText( output );
block.setError( error );
- if(exitStatus != 0)
+ if(exiStatus != 0)
status = ERROR;
#if 0
@@ -218,7 +218,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients,
}
//kdDebug(5100) << "status = " << status << endl;
- block.setStatus( status );
+ block.seStatus( status );
return status;
}
@@ -227,11 +227,11 @@ int
Base2::decrypt( Block& block, const char *passphrase )
{
int index, index2;
- int exitStatus = 0;
+ int exiStatus = 0;
clear();
input = block.text();
- exitStatus = run(PGP2 " +batchmode +language=en -f", passphrase);
+ exiStatus = run(PGP2 " +batchmode +language=en -f", passphrase);
if( !output.isEmpty() )
block.setProcessedText( output );
block.setError( error );
@@ -249,16 +249,16 @@ Base2::decrypt( Block& block, const char *passphrase )
index1 = input.find('\n', index1);
index2 = input.find("\n\n", index1);
input.remove(index1, index2 - index1);
- exitStatus = run(PGP2 " +batchmode +language=en -f", passphrase);
+ exiStatus = run(PGP2 " +batchmode +language=en -f", passphrase);
if( !output.isEmpty() )
block.setProcessedText( output );
block.setError( error );
}
- if(exitStatus == -1) {
+ if(exiStatus == -1) {
errMsg = i18n("error running PGP");
status = RUN_ERR;
- block.setStatus( status );
+ block.seStatus( status );
return status;
}
@@ -457,7 +457,7 @@ Base2::decrypt( Block& block, const char *passphrase )
}
}
//kdDebug(5100) << "status = " << status << endl;
- block.setStatus( status );
+ block.seStatus( status );
return status;
}
@@ -467,13 +467,13 @@ Base2::readPublicKey( const KeyID& keyID,
const bool readTrust /* = false */,
Key* key /* = 0 */ )
{
- int exitStatus = 0;
+ int exiStatus = 0;
status = 0;
- exitStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kvc -f 0x" +
+ exiStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kvc -f 0x" +
keyID, 0, true );
- if(exitStatus != 0) {
+ if(exiStatus != 0) {
status = ERROR;
return 0;
}
@@ -487,10 +487,10 @@ Base2::readPublicKey( const KeyID& keyID,
if( readTrust )
{
- exitStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kc -f",
+ exiStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kc -f",
0, true );
- if(exitStatus != 0) {
+ if(exiStatus != 0) {
status = ERROR;
return 0;
}
@@ -512,14 +512,14 @@ Base2::publicKeys( const TQStringList & patterns )
KeyList
Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns )
{
- int exitStatus = 0;
+ int exiStatus = 0;
KeyList publicKeys;
status = 0;
if ( patterns.isEmpty() ) {
- exitStatus = run( cmd, 0, true );
+ exiStatus = run( cmd, 0, true );
- if ( exitStatus != 0 ) {
+ if ( exiStatus != 0 ) {
status = ERROR;
return KeyList();
}
@@ -533,10 +533,10 @@ Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns )
for ( TQStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
- exitStatus = run( cmd + " " + KProcess::quote( *it ).local8Bit(),
+ exiStatus = run( cmd + " " + KProcess::quote( *it ).local8Bit(),
0, true );
- if ( exitStatus != 0 ) {
+ if ( exiStatus != 0 ) {
status = ERROR;
return KeyList();
}
@@ -547,7 +547,7 @@ Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns )
// put all new keys into a map, remove duplicates
while ( !publicKeys.isEmpty() ) {
Key * key = publicKeys.take( 0 );
- if ( !map.contains( key->primaryFingerprint() ) )
+ if ( !map.tqcontains( key->primaryFingerprint() ) )
map.insert( key->primaryFingerprint(), key );
else
delete key;
@@ -576,16 +576,16 @@ int
Base2::signKey(const KeyID& keyID, const char *passphrase)
{
TQCString cmd;
- int exitStatus = 0;
+ int exiStatus = 0;
cmd = PGP2 " +batchmode +language=en -ks -f ";
cmd += addUserId();
cmd += " 0x" + keyID;
status = 0;
- exitStatus = run(cmd.data(),passphrase);
+ exiStatus = run(cmd.data(),passphrase);
- if (exitStatus != 0)
+ if (exiStatus != 0)
status = ERROR;
return status;
@@ -594,16 +594,16 @@ Base2::signKey(const KeyID& keyID, const char *passphrase)
TQCString Base2::getAsciiPublicKey(const KeyID& keyID)
{
- int exitStatus = 0;
+ int exiStatus = 0;
if (keyID.isEmpty())
return TQCString();
status = 0;
- exitStatus = run( PGP2 " +batchmode +force +language=en -kxaf 0x" + keyID,
+ exiStatus = run( PGP2 " +batchmode +force +language=en -kxaf 0x" + keyID,
0, true );
- if(exitStatus != 0) {
+ if(exiStatus != 0) {
status = ERROR;
return TQCString();
}
@@ -646,7 +646,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
if( !strncmp( output.data() + index, "pub", 3 ) ||
!strncmp( output.data() + index, "sec", 3 ) )
- { // line contains primary key data
+ { // line tqcontains primary key data
// Example 1 (nothing special):
// pub 1024/E2D074D3 2001/09/09 Test Key <testkey@xyz>
// Example 2 (disabled key):
@@ -737,7 +737,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
}
}
else if( output[index] == ' ' )
- { // line contains additional key data
+ { // line tqcontains additional key data
if( key == 0 )
break;
@@ -748,20 +748,20 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
pos++;
if( !strncmp( output.data() + pos, "Key fingerprint = ", 18 ) )
- { // line contains a fingerprint
+ { // line tqcontains a fingerprint
// Example:
// Key fingerprint = 47 30 7C 76 05 BF 5E FB 72 41 00 F2 7D 0B D0 49
TQCString fingerprint = output.mid( pos, index2-pos );
// remove white space from the fingerprint
for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; )
- fingerprint.replace( idx, 1, "" );
+ fingerprint.tqreplace( idx, 1, "" );
subkey->setFingerprint( fingerprint );
}
else if( !strncmp( output.data() + pos, "Expire: ", 8 ) ||
!strncmp( output.data() + pos, "no expire ", 10 ) )
- { // line contains additional key properties
+ { // line tqcontains additional key properties
// Examples:
// Expire: 2001/09/10
// no expire ENCRyption only
@@ -801,7 +801,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
}
}
else
- { // line contains an additional user id
+ { // line tqcontains an additional user id
// Example:
// Test key (2nd user ID) <abc@xyz>
@@ -854,7 +854,7 @@ Base2::parseTrustDataForKey( Key* key, const TQCString& str )
break;
if( str[index+21] != ' ' )
- { // line contains a validity value for a user ID
+ { // line tqcontains a validity value for a user ID
// determine the validity
Validity validity = KPGP_VALIDITY_UNKNOWN;
@@ -927,7 +927,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
if( !strncmp( output.data() + index, "pub", 3 ) ||
!strncmp( output.data() + index, "sec", 3 ) )
- { // line contains primary key data
+ { // line tqcontains primary key data
// Example 1:
// pub 1024/E2D074D3 2001/09/09 Test Key <testkey@xyz>
// Example 2 (disabled key):
@@ -1017,7 +1017,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
}
}
else if( output[index] == ' ' )
- { // line contains additional key data
+ { // line tqcontains additional key data
if( key == 0 )
break;
@@ -1027,7 +1027,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
pos++;
if( !strncmp( output.data() + pos, "Key fingerprint = ", 18 ) )
- { // line contains a fingerprint
+ { // line tqcontains a fingerprint
// Example:
// Key fingerprint = 47 30 7C 76 05 BF 5E FB 72 41 00 F2 7D 0B D0 49
@@ -1036,13 +1036,13 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
TQCString fingerprint = output.mid( pos, index2-pos );
// remove white space from the fingerprint
for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; )
- fingerprint.replace( idx, 1, "" );
+ fingerprint.tqreplace( idx, 1, "" );
subkey->setFingerprint( fingerprint );
}
else if( !strncmp( output.data() + pos, "Expire: ", 8 ) ||
!strncmp( output.data() + pos, "no expire ", 10 ) )
- { // line contains additional key properties
+ { // line tqcontains additional key properties
// Examples:
// Expire: 2001/09/10
// no expire ENCRyption only
@@ -1082,7 +1082,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
}
}
else
- { // line contains an additional user id
+ { // line tqcontains an additional user id
// Example:
// Test key (2nd user ID) <abc@xyz>