Improve error message for expired subkeys
Werner Koch
wk at gnupg.org
Wed May 18 10:01:24 CEST 2016
On Fri, 13 May 2016 12:06, steve at gpgtools.org said:
> Is it possible to receive a more precise error message for such cases?
> Something like
With the current git master you get KEY_DISCOVERY status lines which can
be used to get improved errror messages. To make things easier I have
implemented that in GPGME; GPGME will now give the the error code
GPG_ERR_SUBKEYS_EXP_OR_REV in the invalid_recipients reason field. You
may use the new tool gpgme/tests/run-encrypt to test this.
To make use of the new error code you may add
#if GPG_ERROR_VERSION_NUMBER < 0x011700 /* 1.23 */
# define GPG_ERR_SUBKEYS_EXP_REV 217
#endif
to your code and use that error code to show a more informative message
and a description what to do. There is a little drawback here:
libgpg-error will print "Unknown error code" as long as you have not
uopdated to 1.23 (which has not yet been released).
Salam-Shalom,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
/* EFH in Erkrath: https://alt-hochdahl.de/haus */
More information about the Gnupg-devel
mailing list