all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#9255: Obscure epa-file error message
@ 2011-08-06  3:21 Stefan Monnier
  2011-08-08  1:54 ` Daiki Ueno
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2011-08-06  3:21 UTC (permalink / raw)
  To: 9255

Recently I started having trouble saving my .gpg files.

At first I figured "bah probably some transient bug in Emacs trunk", but
after trying it out with emacs23, I see the problem is not in
Emacs trunk.
The error I get is (see the appended backtrace):

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?


        Stefan


Debugger entered--Lisp error: (file-error "Opening output file" "Encrypt failed: ((exit) (invalid-recipient (reason . 0) (requested-recipient . \"36DB083C608CC24C\")))")
  signal(file-error ("Opening output file" "Encrypt failed: ((exit) (invalid-recipient (reason . 0) (requested-recipient . \"36DB083C608CC24C\")))"))
  byte-code("\304\b	\"\211\203

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#9255: Obscure epa-file error message
  2011-08-06  3:21 bug#9255: Obscure epa-file error message Stefan Monnier
@ 2011-08-08  1:54 ` Daiki Ueno
  2011-08-08  2:49   ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Daiki Ueno @ 2011-08-08  1:54 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 9255

Stefan Monnier <monnier@iro.umontreal.ca> 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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#9255: Obscure epa-file error message
  2011-08-08  1:54 ` Daiki Ueno
@ 2011-08-08  2:49   ` Stefan Monnier
  2011-08-08  7:16     ` Daiki Ueno
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2011-08-08  2:49 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: 9255

>> 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

It's not great, but "unusable public key" is a good improvement over
"Opening output file: Encrypt failed: ((exit) (invalid-recipient (reason
. 0) (requested-recipient . "36DB083C608CC24C")))"

I guess "invalid-recipient" does mean the same as "unusable public key"
at some level, but to this end user "unusable public key" is a lot
more clear.


        Stefan





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#9255: Obscure epa-file error message
  2011-08-08  2:49   ` Stefan Monnier
@ 2011-08-08  7:16     ` Daiki Ueno
  0 siblings, 0 replies; 4+ messages in thread
From: Daiki Ueno @ 2011-08-08  7:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 9255-done

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> $ gpg --encrypt -r A6CC6651 test.txt
>> gpg: A6CC6651: skipped: unusable public key
>> gpg: test.txt: encryption failed: unusable public key
>
> It's not great, but "unusable public key" is a good improvement over
> "Opening output file: Encrypt failed: ((exit) (invalid-recipient (reason
> . 0) (requested-recipient . "36DB083C608CC24C")))"
>
> I guess "invalid-recipient" does mean the same as "unusable public key"
> at some level, but to this end user "unusable public key" is a lot
> more clear.

OK.  Now you will get something like:

Opening output file: Encrypt failed, Unusable public key: 084B0E86A6CC6651; Exit

http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/105419

Regards,
-- 
Daiki Ueno





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-08  7:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-06  3:21 bug#9255: Obscure epa-file error message Stefan Monnier
2011-08-08  1:54 ` Daiki Ueno
2011-08-08  2:49   ` Stefan Monnier
2011-08-08  7:16     ` Daiki Ueno

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.