Am Di 28.10.2014, 22:06:36 schrieb Sudhir Khanger:

> I have gpg-agent cache passphrase. When I run gpg -c text.txt it asks
> for passphrase twice like it normally would but Kgpg or KMail don't.

You probably mean that Kgpg asks just once. KMail isn't capable of 
creating symmetrically encrypted mails thus I don't know what you mean 
there.

I have created a wishlist entry to change that:
https://bugs.kde.org/show_bug.cgi?id=337617


> What am I suppose to do to make both terminal and GUI apps use cached
> passphrase instead of asking for one?

That is not possible AFAIK because a passphrase used in symmetric 
encryption is not a passphrase in the usual gpg-agent sense. gpg-agent 
is used for asking those just because it's already there.

You can call gpg in batch mode (which probably is what Kgpg does):

gpg --batch --passphrase foo --symmetric file.txt

Note that this way everyone on the system can see the passphrase in the 
argument list. You may use something like

echo -n foo | gpg --batch --passphrase-fd 0 --symmetric file.txt

instead (where echo is a shell builtin or something else that does not 
show its arguments in the process list).


Hauke
-- 
Crypto für alle: http://www.openpgp-schulungen.de/fuer/unterstuetzer/
http://userbase.kde.org/Concepts/OpenPGP_Help_Spread
OpenPGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Gnupg-users mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to