|
|
|
@ -180,7 +180,7 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd)
|
|
|
|
|
args = TQStringList::split(" ", cmdArgs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQCString pwd;
|
|
|
|
|
TQString pwd;
|
|
|
|
|
if(isReadable() && useOwnPassphrase && !skipPasswd) {
|
|
|
|
|
KPasswordDialog dlg(KPasswordDialog::Password,false,0);
|
|
|
|
|
dlg.setPrompt(i18n("Enter passphrase"));
|
|
|
|
@ -188,7 +188,7 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd)
|
|
|
|
|
dlg.adjustSize();
|
|
|
|
|
if (dlg.exec() == TQDialog::Rejected)
|
|
|
|
|
return false;
|
|
|
|
|
pwd = TQCString(dlg.password());
|
|
|
|
|
pwd = dlg.password();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// tqDebug("starting GPG process");
|
|
|
|
@ -209,8 +209,9 @@ bool KGPGFile::open(int mode, const TQString& cmdArgs, bool skipPasswd)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isReadable() && useOwnPassphrase && !skipPasswd) {
|
|
|
|
|
// tqDebug("Passphrase is '%s'", pwd.data());
|
|
|
|
|
if(_writeBlock(pwd.data(), pwd.length()) == -1) {
|
|
|
|
|
TQCString pwd2 = pwd.local8Bit(); // Local 8 bit length can be different from TQString length
|
|
|
|
|
// tqDebug("Passphrase is '%s'", pwd2.data());
|
|
|
|
|
if(_writeBlock(pwd2.data(), pwd2.length()) == -1) {
|
|
|
|
|
// tqDebug("Sending passphrase failed");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|