determine encryption key without trying to decrypt

Hauke Laging mailinglisten at
Thu May 2 23:41:17 CEST 2013


how can I determine the key(s) for which a file has been encrypted without gpg 
trying to decrypt the file? I don't understand why --list-packets tries to 
decrypt it anyway. --batch and --no-tty do not solve the problem.

I don't consider my two ideas very elegant:

1) Call "gpg --status-fd $whatever --list-packets file.gpg", get the info from 
--status-fd and kill gpg

2) Start another gpg-agent, this one with --batch, and let gpg connect to this 

I cannot imagine that this cannot be done with the gpg call alone so I hope I 
just don't see the good solution.

PGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5 (seit 2012-11-04)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 572 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20130502/46011f18/attachment.sig>

More information about the Gnupg-users mailing list