gpg --list-secret-keys does not skip revoked keys
Daiki Ueno
ueno at unixuser.org
Fri Dec 24 03:47:13 CET 2010
Daiki Ueno <ueno at unixuser.org> writes:
> BTW, I'm wondering if there is any reason why the validity field (Field
> 2 of --with-colons output) is not used for secret keys. It might be
> useful for the libraries which call gpg internally (epg.el I mean :) to
> check if a key is usable.
Actually, it looks that GPGME ignores the validity when listing keys
with SECRET_ONLY flag. Here is a sample program:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: list-key-validity.c
URL: </pipermail/attachments/20101224/40024b24/attachment.txt>
-------------- next part --------------
I get:
$ ./list-key-validity A6CC6651 D1458906
084B0E86A6CC6651 (pub) revoked = 0, expired = 1
892F1451D1458906 (pub) revoked = 1, expired = 0
892F1451D1458906 (sec) revoked = 0, expired = 0
Maybe I'm missing some points of the OpenPGP concept.
Regards,
--
Daiki Ueno
More information about the Gnupg-users
mailing list