GNU bug report logs - #25155
25.1.90; Gnus: Sending a GnuPG-signed message executes the signing operation twice when using gcc field in the message (annoyance with smartcards)

Previous Next

Package: emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Sat, 10 Dec 2016 08:58:01 UTC

Severity: normal

Tags: fixed

Merged with 25249

Found in versions 25.1, 25.1.90

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25155 in the body.
You can then email your comments to 25155 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25155; Package emacs. (Sat, 10 Dec 2016 08:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Teemu Likonen <tlikonen <at> iki.fi>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 10 Dec 2016 08:58:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Teemu Likonen <tlikonen <at> iki.fi>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.90;
 Gnus: Sending a GnuPG-signed message executes the signing operation
 twice when using gcc field in the message (annoyance with smartcards)
Date: Sat, 10 Dec 2016 10:56:36 +0200
In Gnus, when sending a GnuPG-signed message the signing operation is
executed twice if the message has gcc field for storing local copy. It
seems that the background "gpg --detach-sign" process is executed once
for the outgoing message and once for the local copy (gcc).

It's a small annoyance (and first a surprise) when using external
OpenPGP smartcard for the secret-key operation. My Yubikey smartcard has
to be touched before secret key operation is allowed. Some other
smartcards require pin code on physical machine.

Would a single sign operation suffice in Gnus? After all, it's just two
copies of the same message?




In GNU Emacs 25.1.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
 of 2016-12-08 built on mithlond
Repository revision: 08decbd04b8346323b80f0dea84a462fe1f46b3f
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description:	Debian GNU/Linux 8.6 (jessie)

Configured using:
 'configure --prefix=/home/dtw/.local --with-x-toolkit=gtk3
 --with-xwidgets --with-wide-int'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XWIDGETS

Important settings:
  value of $LC_MESSAGES: C
  value of $LANG: fi_FI.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  diff-auto-refine-mode: t
  gnus-topic-mode: t
  gnus-undo-mode: t
  ido-everywhere: t
  global-undo-tree-mode: t
  show-paren-mode: t
  winner-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/.emacs.d/omat/elisp/loaddefs hides /home/dtw/.local/share/emacs/25.1.90/lisp/loaddefs

Features:
(shadow emacsbug vc-git diff-mode conf-mode timezone dired-aux sh-script
smie executable shr dom sendmail wcheck-mode nnir gnus-fun flow-fill
sort gnus-cite qp mm-archive mail-extr gnus-bcklg gnus-async gnus-ml
disp-table bs char-fold misearch multi-isearch org-element org-rmail
org-mhe org-irc org-info org-gnus org-docview doc-view subr-x jka-compr
image-mode org-bibtex bibtex org-bbdb org-w3m org org-macro org-footnote
org-pcomplete pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func
suomalainen-kalenteri solar cal-dst holidays hol-loaddefs cal-menu
calendar cal-loaddefs tabify imenu man gnus-topic nndraft nnmh epa-file
epa network-stream nsm auth-source starttls nnmbox nnnil gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime dig mailcap nntp gnus-cache
gnus-bogofilter gnus-sum gnus-group gnus-undo nnnotmuch nnml gnus-start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range message dired format-spec
rfc822 mml mml-sec password-cache epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util
help-fns mail-prsvr wid-edit ido undo-tree diff paren winner rx
slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu
slime-references slime-compiler-notes-tree slime-scratch
slime-presentations advice bridge slime-mdot-fu slime-enclosing-context
slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-repl elp slime-parse slime
derived gud apropos compile etags xref cl-seq project eieio eieio-core
arc-mode archive-mode noutline outline easy-mmode pp comint ansi-color
ring hyperspec cl-macs thingatpt browse-url cl slime-autoloads edmacro
kmacro finder-inf tex-site info package epg-config seq byte-opt gv
bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs
pcase cl-lib server time-date 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 inotify
dynamic-setting system-font-setting font-render-setting xwidget-internal
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 486780 47564)
 (symbols 48 49228 7)
 (miscs 40 1479 2071)
 (strings 32 118529 18925)
 (string-bytes 1 3461974)
 (vectors 16 50528)
 (vector-slots 8 1676572 174589)
 (floats 8 1089 851)
 (intervals 56 21472 360)
 (buffers 976 116)
 (heap 1024 81998 12287))




Forcibly Merged 25155 25249. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 11 Apr 2018 22:43:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25155; Package emacs. (Mon, 23 Sep 2019 00:17:01 GMT) Full text and rfc822 format available.

Message #10 received at 25155 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Teemu Likonen <tlikonen <at> iki.fi>
Cc: 25155 <at> debbugs.gnu.org
Subject: Re: bug#25155: 25.1.90; Gnus: Sending a GnuPG-signed message
 executes the signing operation twice when using gcc field in the message
 (annoyance with smartcards)
Date: Mon, 23 Sep 2019 02:16:37 +0200
Teemu Likonen <tlikonen <at> iki.fi> writes:

> Would a single sign operation suffice in Gnus? After all, it's just two
> copies of the same message?

Indeed.  But, man, was this difficult to debug, because putting a
`debug' statement into any of the mml functions just didn't work.  It
turns out you had to say

    (let ((inhibit-redisplay nil))
      (debug))

to get it to debug.  (I've now amended the doc string.)

So that took like nine hours, and it turns out that (logically enough)
the second call to the encoding function is done from
`gnus-inews-do-gcc'.  It doesn't really know anything about what may
have happened before -- it just interprets the Gcc header, and then
calls `message-encode-message-body', which will encode the data again.

So to avoid the double encoding, Message needs some way to tell this
function not do to that, but instead cache the encoded value and make
`gnus-inews-do-gcc' use that instead.  Hm...  Perhaps a buffer-local
variable will do the trick...

I think I'll have a look at that tomorrow.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25155; Package emacs. (Mon, 23 Sep 2019 09:47:01 GMT) Full text and rfc822 format available.

Message #13 received at 25155 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Teemu Likonen <tlikonen <at> iki.fi>
Cc: 25155 <at> debbugs.gnu.org
Subject: Re: bug#25155: 25.1.90; Gnus: Sending a GnuPG-signed message
 executes the signing operation twice when using gcc field in the message
 (annoyance with smartcards)
Date: Mon, 23 Sep 2019 11:46:25 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I think I'll have a look at that tomorrow.

I've now implemented this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 23 Sep 2019 09:47:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 25155 <at> debbugs.gnu.org and Teemu Likonen <tlikonen <at> iki.fi> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 23 Sep 2019 09:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 21 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.