all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Gnus + GPG integration broken after revision 102412.
@ 2010-12-20  8:54 Ashish SHUKLA
  2010-12-21  1:32 ` Daiki Ueno
  0 siblings, 1 reply; 11+ messages in thread
From: Ashish SHUKLA @ 2010-12-20  8:54 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 5090 bytes --]

Hi,

I'm having problem sending GPG signed mails in Emacs bzr revision 1024640.

#v+
Debugger entered--Lisp error: (error "Sign failed: ((exit))")
  signal(error ("Sign failed: ((exit))"))
  (condition-case error (setq signature (epg-sign-string context (buffer-string) t) mml2015-epg-secret-key-id-list nil) (error (while mml2015-epg-secret-key-id-list (password-cache-remove (car mml2015-epg-secret-key-id-list)) (setq mml2015-epg-secret-key-id-list (cdr mml2015-epg-secret-key-id-list))) (signal (car error) (cdr error))))
  (let* ((inhibit-redisplay t) (context (epg-make-context)) (boundary (mml-compute-boundary cont)) (sender (message-options-get (quote message-sender))) signer-key (signers (or (message-options-get (quote mml2015-epg-signers)) (message-options-set (quote mml2015-epg-signers) (if (eq mm-sign-option (quote guided)) (epa-select-keys context "Select keys for signing.\nIf no one is selected, default secret key is used.  " (cons sender mml2015-signers) t) (if (or sender mml2015-signers) (delq nil ...)))))) signature micalg) (epg-context-set-armor context t) (epg-context-set-textmode context t) (epg-context-set-signers context signers) (if mml2015-cache-passphrase (epg-context-set-passphrase-callback context (function mml2015-epg-passphrase-callback))) (condition-case error (setq signature (epg-sign-string context (buffer-string) t) mml2015-epg-secret-key-id-list nil) (error (while mml2015-epg-secret-key-id-list (password-cache-remove (car mml2015-epg-secret-key-id-list)) (setq mml2015-epg-secret-key-id-list (cdr mml2015-epg-secret-key-id-list))) (signal (car error) (cdr error)))) (if (epg-context-result-for context (quote sign)) (setq micalg (epg-new-signature-digest-algorithm (car (epg-context-result-for context (quote sign)))))) (goto-char (point-min)) (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" boundary)) (if micalg (insert (format "	micalg=pgp-%s; " (downcase (cdr (assq micalg epg-digest-algorithm-alist)))))) (insert "protocol=\"application/pgp-signature\"\n") (insert (format "\n--%s\n" boundary)) (goto-char (point-max)) (insert (format "\n--%s\n" boundary)) (insert "Content-Type: application/pgp-signature\n\n") (insert signature) (goto-char (point-max)) (insert (format "--%s--\n" boundary)) (goto-char (point-max)))
  mml2015-epg-sign((part (sign . "pgpmime") (tag-location . 1722) (contents . "\n-- \nAshish SHUKLA\n\n“Progress doesn't come from early risers – progress is made by lazy\nmen looking for easier ways to do things.” (Robert A. Heinlein, 1973)\n")))
  mml2015-sign((part (sign . "pgpmime") (tag-location . 1722) (contents . "\n-- \nAshish SHUKLA\n\n“Progress doesn't come from early risers – progress is made by lazy\nmen looking for easier ways to do things.” (Robert A. Heinlein, 1973)\n")))
  mml-pgpmime-sign-buffer((part (sign . "pgpmime") (tag-location . 1722) (contents . "\n-- \nAshish SHUKLA\n\n“Progress doesn't come from early risers – progress is made by lazy\nmen looking for easier ways to do things.” (Robert A. Heinlein, 1973)\n")))
  mml-generate-mime-1((part (sign . "pgpmime") (tag-location . 1722) (contents . "\n-- \nAshish SHUKLA\n\n“Progress doesn't come from early risers – progress is made by lazy\nmen looking for easier ways to do things.” (Robert A. Heinlein, 1973)\n")))
  mml-generate-mime()
  message-encode-message-body()
  message-send-mail(nil)
  message-send-via-mail(nil)
  message-send(nil)
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit nil nil)
#v-

I've tracked it down to change in lisp/gnus/mml2015.el in r102412[1]. To be
able to send GPG signed emails, I've to defun the "mml2015-epg-sign" function
From revision 102411 of lisp/gnus/mml2015.el.

The GPG signing related customizations, which I'm using, are copied from
GnusPGG page of EmacsWiki[2]:

#v+
(require 'pgg)
(setq pgg-default-user-id "wahjava")
(eval-after-load "mm-decode" '(add-to-list 'mm-inlined-types "application/pgp$"))
(eval-after-load "mm-decode" '(add-to-list 'mm-inline-media-tests '("application/pgp$" mm-inline-text identity)))
(eval-after-load "mm-decode" '(add-to-list 'mm-automatic-display "application/pgp$"))
(eval-after-load "mm-decode" (quote (setq mm-automatic-display (remove "application/pgp-signature" mm-automatic-display))))
#v-

It seems to me that Gnus is now defaulting to EPG. The only EP{A,G}
customization, I've is in my "~/.emacs.d/init.el" file:

#v+
(require 'epg-config)
(require 'epa)
(eval-after-load "epa" (setq epa-armor t))
(setq epg-gpg-program (executable-find "gpg2"))
#v-

Any ideas how to fix this issue ? Or how to switch my Gnus configuration to
use EPG, if EPG is supposed to work for me ?

In case any other information is required please mention.

References:
[1]  http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/revision/102412#lisp/gnus/mml2015.el
[2]  http://www.emacswiki.org/emacs/GnusPGG

TiA
-- 
Ashish SHUKLA

“Real Programmers always confuse Christmas and Halloween because Oct31
== Dec25.” (Andrew Rutherford)

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2010-12-23  3:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-20  8:54 Gnus + GPG integration broken after revision 102412 Ashish SHUKLA
2010-12-21  1:32 ` Daiki Ueno
2010-12-21 11:06   ` Ashish SHUKLA
2010-12-21 17:53     ` Daniel Dehennin
2010-12-21 22:51       ` Ashish SHUKLA
2010-12-22  1:31     ` Daiki Ueno
2010-12-22  3:49       ` Ashish SHUKLA
2010-12-22  5:21         ` Daiki Ueno
2010-12-22  6:56           ` Ashish SHUKLA
2010-12-22  8:29         ` Daniel Dehennin
2010-12-23  3:12           ` Ashish SHUKLA

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.