What is the "list keyring content" command?

Joke de Buhr joke at seiken.de
Tue Jun 8 11:12:02 CEST 2010


If I run the command on my primary keyring I get this output

 $ gpg2 ~/.gnupg/secring.gpg
    gpg: error reading key: No public key

It doesn't look like the "reasonable action" is deterministic.


On Monday 07 June 2010 21:43:23 Hauke Laging wrote:
> Hello,
> 
> the man page says:
> 
> "gpg2 may be run with no commands, in which case it will perform a
> reasonable action depending on the type of file it is given as input (an
> encrypted message is decrypted, a signature is verified, a file containing
> keys is listed)."
> 
> Indeed:
> start cmd:> gpg secondsecring.gpg
> sec  1024R/0x297AB799 2010-06-02 Smartcard Test <smartcardtest at hauke-
> laging.de>
> ssb  1024R/0xF64B4F0F 2010-06-02
> ssb  1024R/0xF17AAD5B 2010-06-02
> ssb  1024R/0xD62B6574 2010-06-02
> 
> But which command is used here? I don't find a suitable one.
> 
> start cmd:> gpg --list-keys secondsecring.gpg
> gpg: error reading key: Kein öffentlicher Schlüssel
> 
> I hope there is a "tell me what this is" command that does nothing else (so
> that it can be safely used). If it is a keyring, list the content (like now
> without a command), if it is an encrypted file it would be nice to know
> that (and the recipients' key IDs) WITHOUT gpg automatically trying to
> decrypt it (assuming a cached passphrase). If it is a signature tell me
> the ID of the signing key (and the hash of the file?) without validating
> the signature (maybe the signed file is unavailable).
> 
> 
> CU
> 
> Hauke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 706 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20100608/40e59810/attachment.pgp>


More information about the Gnupg-users mailing list