Subject: Re: bug#9255: Obscure epa-file error message

From: Daiki Ueno <[email-masked]>
Date: Mon, 08 Aug 2011 10:54:41 +0900

Stefan Monnier <[email-masked]> writes:

> Opening output file: Encrypt failed: ((exit) (invalid-recipient (reason . 0) (requested-recipient . "36DB083C608CC24C")))
>
> It turns out the problem was simply that my encryption key was expired.
> Could someone figure out how to get a more helpful error message?

I guess you won't get any further information even if you call gpg from
the command line:

$ gpg --encrypt -r A6CC6651 test.txt
gpg: A6CC6651: skipped: unusable public key
gpg: test.txt: encryption failed: unusable public key

where A6CC6651 is my expired public key.

BTW, gnupg/doc/DETAILS specifies that INV_RECP status should accompany a
reason code 4 for expired keys, but currently it is 0 ("No specific
reason given").  I'll file a bug against GnuPG.