From: wahjava.ml@gmail.com (Ashish SHUKLA)
To: emacs-devel@gnu.org
Subject: Gnus + GPG integration broken after revision 102412.
Date: Mon, 20 Dec 2010 14:24:48 +0530 [thread overview]
Message-ID: <868vzkbz8n.fsf@chateau.d.if> (raw)
[-- 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 --]
next reply other threads:[~2010-12-20 8:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 8:54 Ashish SHUKLA [this message]
2010-12-21 1:32 ` Gnus + GPG integration broken after revision 102412 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=868vzkbz8n.fsf@chateau.d.if \
--to=wahjava.ml@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).