Gnus development mailing list
 help / color / mirror / Atom feed
From: XeCycle <xecycle@gmail.com>
To: ding@gnus.org
Subject: Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
Date: Fri, 26 Aug 2011 09:42:08 +0800	[thread overview]
Message-ID: <87ei09hrtb.fsf@gmail.com> (raw)
In-Reply-To: <87bovd5ift.fsf-ueno@unixuser.org>

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

Daiki Ueno <ueno@unixuser.org> writes:

> XeCycle <xecycle@gmail.com> writes:
>
>> I have these lines in my ~/.gnus.el for OpenPGP signature verifying,
>> however, it doesn't work.

[...]

> Well, how does it not work?  I have the following settings in addition:
>
> ~/.gnus:
>
> (setq gnus-buttonized-mime-types '("multipart/signed")
>       mm-verify-option 'always)
>
> ~/.gnupg/gpg.conf:
>
> keyserver-options auto-key-retrieve
> keyserver hkp://keys.gnupg.net
>
> and it successfully verifies your signature.

Indeed I have more:

(require 'epa)
(setq mml2015-use 'epg)
(setq epg-debug t)
;; (require 'pgg)
;; (setq mml2015-use 'pgg)
(setq mm-verify-option 'known
      mm-decrypt-option 'known
      gnus-treat-x-pgp-sig t
      gnus-buttonized-mime-types '("multipart/alternative"
				   "multipart/encrypted"
				   "multipart/signed"))

With PGG, it worked fine.  However it'll inform me of PGG being
deprecated in favour of EasyPG, but EasyPG doesn't work for me.

> You could try (setq epg-debug t) and inspect " *epg-debug*" buffer (note
> the first letter is a space), if the problem seems to be in EPG itself.

I did, but it seems useless.

This is the debug trace when I try to display a signed message:

> Debugger entered--Lisp error: (wrong-number-of-arguments #[(target old new) "\303\b	
> #\207" [old new target replace-regexp-in-string] 4] 4)
>   mm-replace-in-string("\ntest encrypt.\n" "\n" "\n" t)
>   byte-code("\306\307\211\211\211\211\x19^[\x1d\310\x1d\311\312\313\x1d@#\206\0\314\306#\211\203.\315\x1eA\314\307\306$\211\204R\x0e\x1f\316\317 !\211\x1e\205J\320\312\x1e@G! \x1e@%+\210\321\322\x1e\"\210\323	\324\325\306$\326\b!\327 \322\330\331\217\210\x1f\316\332\333\f\334\"! !\211\x1e\205\206\320\312\x1e@G! \x1e@%+\210\x1e.\207" [signature part signature-file plain context inhibit-redisplay t nil mm-find-raw-part-by-type get-text-property 0 protocol "application/pgp-signature" mm-find-part-by-type gnus-info "Corrupted" put-text-property throw error mm-replace-in-string "\n" "\n" mm-get-part epg-make-context (byte-code "\304\b	\n#\304\207" [context signature part plain epg-verify-string] 4) ((error (byte-code "\b\305\306\x1a\211\205\0\307\310\v@G\n	\v@%+\210\f@\311=\2036\b\312\313\x1a\211\2051\307\310\v@G\n	\v@%+\210\202N\b\312\314\f!\x1a\211\205L\307\310\v@G\n	\v@%+\210\315\304\v\"\207" [mm-security-handle value parameter handle error gnus-info "Failed" put-text-property 0 quit gnus-details "Quit." mml2015-format-error throw] 7))) epg-verify-result-to-string epg-context-result-for verify ctl handle mm-security-handle value parameter] 7)
>   mml2015-epg-verify(((#<buffer  *mm*<6>> ("text/plain") nil nil nil nil nil nil) (#<buffer  *mm*<7>> ("application/pgp-signature") nil nil nil nil nil nil)) (#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer  *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")))
>   mml2015-verify(((#<buffer  *mm*<6>> ("text/plain") nil nil nil nil nil nil) (#<buffer  *mm*<7>> ("application/pgp-signature") nil nil nil nil nil nil)) (#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer  *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")))
>   mm-possibly-verify-or-decrypt(((#<buffer  *mm*<6>> ("text/plain") nil nil nil nil nil nil) (#<buffer  *mm*<7>> ("application/pgp-signature") nil nil nil nil nil nil)) (#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer  *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")) "xecycle@gmail.com")
>   mm-dissect-multipart((#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer  *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")) "xecycle@gmail.com")
>   mm-dissect-buffer(nil t)
>   gnus-display-mime()
>   gnus-article-prepare-display()
>   gnus-article-prepare(15 nil)
>   gnus-summary-display-article(15 nil)
>   gnus-summary-select-article(nil nil pseudo)
>   gnus-summary-scroll-up(1)
>   call-interactively(gnus-summary-scroll-up nil nil)

and this is the *epg-debug*:

> /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode --output /tmp/epg-output1142m3f --detach-sign
> [GNUPG:] USERID_HINT 8D718EC47795E591 Carl Lei (XeCycle) <XeCycle@GMail.com>
> [GNUPG:] NEED_PASSPHRASE 8D718EC47795E591 8D718EC47795E591 1 0
> [GNUPG:] GET_HIDDEN passphrase.enter
> [GNUPG:] GOT_IT
> [GNUPG:] GOOD_PASSPHRASE
> [GNUPG:] BEGIN_SIGNING
> [GNUPG:] SIG_CREATED D 1 2 01 1314321893 1FB67F1FD45DF681C84527F78D718EC47795E591
> /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode --output /tmp/epg-output1142zBm --detach-sign
> [GNUPG:] USERID_HINT 8D718EC47795E591 Carl Lei (XeCycle) <XeCycle@GMail.com>
> [GNUPG:] NEED_PASSPHRASE 8D718EC47795E591 8D718EC47795E591 1 0
> [GNUPG:] GET_HIDDEN passphrase.enter
> [GNUPG:] GOT_IT
> [GNUPG:] GOOD_PASSPHRASE
> [GNUPG:] BEGIN_SIGNING
> [GNUPG:] SIG_CREATED D 1 2 01 1314321902 1FB67F1FD45DF681C84527F78D718EC47795E591

Seems gpg hadn't even been invoked for verifying signatures.  This is
really a painful problem for me...  I just installed Emacs from git
several weeks ago --- emacs-version "24.0.50.1".

>> I checked variable `mml2015-use' and it's `epg', however the variable
>> `mml2015-verify-function' is `mailcrypt-verify'.
>>
>> Well, this problem have been bothering me for a long time, I guess it's
>> a configuration issue?  Do I need to change the variable myself?  I
>> believe it isn't wanted.
>
> This shouldn't be a problem since the variable is only referred to from
> `mml2015-mailcrypt-verify', which wouldn't be called when mml2015-use is
> 'epg.  I agree that the variable name is a bit misleading though.

Thank you, so this may not be the major problem.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

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

  reply	other threads:[~2011-08-26  1:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 12:49 XeCycle
2011-08-25 20:45 ` Daiki Ueno
2011-08-26  1:42   ` XeCycle [this message]
2011-08-26  2:00     ` Daiki Ueno
2011-08-26  7:57       ` XeCycle
2011-08-26  9:04         ` Daiki Ueno
2011-08-26 10:44           ` XeCycle
2011-08-26 14:06           ` XeCycle
2011-08-26 23:29             ` Daiki Ueno
2011-08-27  0:26               ` XeCycle
2011-09-10 22:10             ` Lars Magne Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ei09hrtb.fsf@gmail.com \
    --to=xecycle@gmail.com \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).