unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
@ 2015-08-16 13:12 Richard Stallman
  2015-08-17  2:26 ` Daiki Ueno
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2015-08-16 13:12 UTC (permalink / raw)
  To: 21274


Someone sent me gpg-encrypted mail using the throw-keyids option,
which I think means it doesn't say which person each key belongs to.
The result was I was asked for a passphrase for each key until
mine came up.

I'm told the recommend way to deal with receiving such mail
is to specify default-key in gpg.conf.  I have that setting,
so it looks like EPA doesn't recognize it.

That is the bug.




In GNU Emacs 25.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.23)
 of 2015-08-12 on freetop
Repository revision: 79a169684dfad2c0bbb9fdbae539c1f30d9f0ac3
System Description:	Trisquel GNU/Linux 7.0, Belenos

Configured using:
 `configure 'CFLAGS=-g -O0''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GCONF GSETTINGS NOTIFY
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: RMAIL

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent messages:
Scanning for dabbrevs...done
Expansion found in 'RMAIL'
Quit
Scanning for dabbrevs...done
Expansion found in 'RMAIL'
Sending...
Wrote /home/rms/outgoing/out-4
Sending...done
Mark set
Quit

Load-path shadows:
None found.

Features:
(shadow emacsbug parse-time vc-cvs etags thingatpt xref project
cal-move cal-menu calendar cal-loaddefs wid-edit battery sgml-mode
epa-file rmailkwd ispell epa-mail epa derived epg diff-mode easy-mmode
diff dired-aux sh-script smie executable quail rmailsum conf-mode
rmailout shr-color color url-util url-parse auth-source cl-seq eieio
byte-opt bytecomp byte-compile cl-extra seq cconv eieio-core cl-macs
gv gnus-util password-cache url-vars shr dom subr-x browse-url
misearch multi-isearch dabbrev shell pcomplete grep compile comint
ansi-color ring mailalias qp rmailmm message sendmail format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader mail-parse rfc2231 rmail rfc2047 rfc2045 ietf-drums mm-util
help-fns help-mode cl-loaddefs pcase cl-lib mail-prsvr mail-utils
dired t-mouse view time-date paren cus-start cus-load advice
finder-inf package easymenu epg-config mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese
eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook
help simple abbrev minibuffer cl-preloaded nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 8 372450 84872)
 (symbols 24 27198 1)
 (miscs 20 4913 4318)
 (strings 16 49104 16794)
 (string-bytes 1 1440643)
 (vectors 8 29816)
 (vector-slots 4 1519061 39942)
 (floats 8 461 752)
 (intervals 28 68952 2767)
 (buffers 520 139)
 (heap 1024 20780 4381))
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]


-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.






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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-16 13:12 bug#21274: 25.0.50; epa doesn't understand GPG's default-key option Richard Stallman
@ 2015-08-17  2:26 ` Daiki Ueno
  2015-08-17  8:08   ` Daiki Ueno
  0 siblings, 1 reply; 11+ messages in thread
From: Daiki Ueno @ 2015-08-17  2:26 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Werner Koch, 21274

Richard Stallman <rms@gnu.org> writes:

> Someone sent me gpg-encrypted mail using the throw-keyids option,
> which I think means it doesn't say which person each key belongs to.
> The result was I was asked for a passphrase for each key until
> mine came up.
>
> I'm told the recommend way to deal with receiving such mail
> is to specify default-key in gpg.conf.  I have that setting,
> so it looks like EPA doesn't recognize it.

According to the GnuPG manual, --default-key is used for signing, not
for decrypting a message encrypted with --throw-keyids or
--hidden-recipient.  IMO, it sounds like a natural extension for
--default-key to support that use-case.  Werner, what do you think?

Regards,
-- 
Daiki Ueno





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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-17  2:26 ` Daiki Ueno
@ 2015-08-17  8:08   ` Daiki Ueno
  2015-08-18  3:39     ` Richard Stallman
  2015-08-18  3:44     ` Daiki Ueno
  0 siblings, 2 replies; 11+ messages in thread
From: Daiki Ueno @ 2015-08-17  8:08 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Werner Koch, 21274

Daiki Ueno <ueno@gnu.org> writes:

> Richard Stallman <rms@gnu.org> writes:
>
>> Someone sent me gpg-encrypted mail using the throw-keyids option,
>> which I think means it doesn't say which person each key belongs to.
>> The result was I was asked for a passphrase for each key until
>> mine came up.
>>
>> I'm told the recommend way to deal with receiving such mail
>> is to specify default-key in gpg.conf.  I have that setting,
>> so it looks like EPA doesn't recognize it.
>
> According to the GnuPG manual, --default-key is used for signing, not
> for decrypting a message encrypted with --throw-keyids or
> --hidden-recipient.  IMO, it sounds like a natural extension for
> --default-key to support that use-case.  Werner, what do you think?

Apparently, this has already been implemented in GnuPG 2.1, but not in
GnuPG 2.0 nor 1.4:

http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=54591341
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=g10/getkey.c;h=ad7e71cf7ddca38a917756b8a0675b665c3eddec;hb=54591341#l2565

Maybe good to update the documentation and possibly backport it to other
branches?

Regards,
-- 
Daiki Ueno





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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-17  8:08   ` Daiki Ueno
@ 2015-08-18  3:39     ` Richard Stallman
  2015-08-18  3:51       ` Daiki Ueno
  2015-08-18  3:44     ` Daiki Ueno
  1 sibling, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2015-08-18  3:39 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: wk, 21274

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > According to the GnuPG manual, --default-key is used for signing, not
  > > for decrypting a message encrypted with --throw-keyids or
  > > --hidden-recipient.  IMO, it sounds like a natural extension for
  > > --default-key to support that use-case.  Werner, what do you think?

  > Apparently, this has already been implemented in GnuPG 2.1, but not in
  > GnuPG 2.0 nor 1.4:

It could be implemented in EPA independently of whether it is implemented
in the version of GPG that is installed.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.






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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-17  8:08   ` Daiki Ueno
  2015-08-18  3:39     ` Richard Stallman
@ 2015-08-18  3:44     ` Daiki Ueno
  1 sibling, 0 replies; 11+ messages in thread
From: Daiki Ueno @ 2015-08-18  3:44 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Werner Koch, 21274

tag 21274 wontfix
close 21274
stop

In any case, this can't be fixed in Emacs, but it shall be fixed in
GnuPG.  I'm closing this as wontfix.

Regards,
-- 
Daiki Ueno





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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-18  3:39     ` Richard Stallman
@ 2015-08-18  3:51       ` Daiki Ueno
  2015-08-19  1:24         ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Daiki Ueno @ 2015-08-18  3:51 UTC (permalink / raw)
  To: Richard Stallman; +Cc: wk, 21274

Richard Stallman <rms@gnu.org> writes:

>   > > According to the GnuPG manual, --default-key is used for signing, not
>   > > for decrypting a message encrypted with --throw-keyids or
>   > > --hidden-recipient.  IMO, it sounds like a natural extension for
>   > > --default-key to support that use-case.  Werner, what do you think?
>
>   > Apparently, this has already been implemented in GnuPG 2.1, but not in
>   > GnuPG 2.0 nor 1.4:
>
> It could be implemented in EPA independently of whether it is implemented
> in the version of GPG that is installed.

What's the GPG command line would you use for that?

Regards,
-- 
Daiki Ueno





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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-18  3:51       ` Daiki Ueno
@ 2015-08-19  1:24         ` Richard Stallman
  2015-08-19  1:39           ` Daiki Ueno
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2015-08-19  1:24 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: wk, 21274

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > It could be implemented in EPA independently of whether it is implemented
  > > in the version of GPG that is installed.

  > What's the GPG command line would you use for that?

gpg --default-key <specified-key-id> ...

EPA would have to look at gpg.conf and read the default-key line
as part of deciding which key to use.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.






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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-19  1:24         ` Richard Stallman
@ 2015-08-19  1:39           ` Daiki Ueno
  2015-08-19 18:15             ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Daiki Ueno @ 2015-08-19  1:39 UTC (permalink / raw)
  To: Richard Stallman; +Cc: wk, 21274

Richard Stallman <rms@gnu.org> writes:

>   > > It could be implemented in EPA independently of whether it is
>   > > implemented in the version of GPG that is installed.
>
>   > What's the GPG command line would you use for that?
>
> gpg --default-key <specified-key-id> ...

Are you sure it really works?

> EPA would have to look at gpg.conf and read the default-key line
> as part of deciding which key to use.

That has the same effect as you specify it from the command line.  See
(info "(gnupg) GPG Options"): "Long options can be put in an options
file (default "~/.gnupg/gpg.conf")".

Regards,
-- 
Daiki Ueno





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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-19  1:39           ` Daiki Ueno
@ 2015-08-19 18:15             ` Richard Stallman
  2015-08-20  2:59               ` Daiki Ueno
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2015-08-19 18:15 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: wk, 21274

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > gpg --default-key <specified-key-id> ...

  > Are you sure it really works?

I don't know. but the man page said it would work.
It says

       --try-secret-key name
              For hidden recipients GPG needs to know  the  keys  to  use  for
              trial  decryption.   The  key  set  with --default-key is always
              tried first, but this is  often  not  sufficient.   This  option
              allows  to  set  more  keys  to  be  used  for trial decryption.

But if that doesn't actually work, then
maybe --try-secret-key is needed.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.






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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-19 18:15             ` Richard Stallman
@ 2015-08-20  2:59               ` Daiki Ueno
  2015-08-21 12:42                 ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Daiki Ueno @ 2015-08-20  2:59 UTC (permalink / raw)
  To: Richard Stallman; +Cc: wk, 21274

Richard Stallman <rms@gnu.org> writes:

>   > > gpg --default-key <specified-key-id> ...
>
>   > Are you sure it really works?
>
> I don't know. but the man page said it would work.
> It says
>
>        --try-secret-key name
>               For hidden recipients GPG needs to know  the  keys  to  use  for
>               trial  decryption.   The  key  set  with --default-key is always
>               tried first, but this is  often  not  sufficient.   This  option
>               allows  to  set  more  keys  to  be  used  for trial decryption.
>
> But if that doesn't actually work, then
> maybe --try-secret-key is needed.

I suspect that you are looking at the manual page of GnuPG 2.0, while
using EPA with GnuPG 1.4.  What does this evaluate to?

  M-: (assq 'version (epg-configuration))

(I was wrong about that the --default-key is used for hidden recipients
since GnuPG 2.0.  Sorry for the confusion about that.)

Regards,
-- 
Daiki Ueno






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

* bug#21274: 25.0.50; epa doesn't understand GPG's default-key option
  2015-08-20  2:59               ` Daiki Ueno
@ 2015-08-21 12:42                 ` Richard Stallman
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2015-08-21 12:42 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: wk, 21274

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I suspect that you are looking at the manual page of GnuPG 2.0, while
  > using EPA with GnuPG 1.4.  What does this evaluate to?

  >   M-: (assq 'version (epg-configuration))

I am using GPG 1.4.16, and the man page says it is for GPG 1.4.16.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.






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

end of thread, other threads:[~2015-08-21 12:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-16 13:12 bug#21274: 25.0.50; epa doesn't understand GPG's default-key option Richard Stallman
2015-08-17  2:26 ` Daiki Ueno
2015-08-17  8:08   ` Daiki Ueno
2015-08-18  3:39     ` Richard Stallman
2015-08-18  3:51       ` Daiki Ueno
2015-08-19  1:24         ` Richard Stallman
2015-08-19  1:39           ` Daiki Ueno
2015-08-19 18:15             ` Richard Stallman
2015-08-20  2:59               ` Daiki Ueno
2015-08-21 12:42                 ` Richard Stallman
2015-08-18  3:44     ` Daiki Ueno

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).