[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible emacs 24.5 + Gnus problem when using pgpmime and signencryp

From: Jens Lechtenboerger
Subject: Re: possible emacs 24.5 + Gnus problem when using pgpmime and signencrypt
Date: Mon, 14 Mar 2016 18:41:33 +0100

On 2016-03-14, at 17:55, Nils Gillmann wrote:

> So it looks like this problem occurs when I try to /signencrypt/
> and it works when I just ignore the fact that I can't sign.

How do you specify the key for signing?  Do you use a smart card?

For me the following works out of the box with gpg-2.0.22 and Emacs
24.3.1 (both part of my distribution) as well as gpg-2.1.11 and
Emacs 25.1.50.

$ killall gpg-agent
$ emacs -Q

Starting Emacs with "-Q" inhibits loading your configuration, so
if the following works you could start from there.

In Emacs, compose a message with `C-x m', insert a To address to
which to encrypt, some Subject, don’t worry about the From address.
(I’ve got a default-key option in gpg.conf, which defines the
signing key.  Without that the first secret key in the keyring is
used, I guess.)

Evaluate the following (either insert the lines into the message
body and press `C-x C-e' at the end of each line or enter each
command after `M-:').

--8<---------------cut here---------------start------------->8---
(setq debug-on-error t)
(setq epg-debug t)
(setq epg-gpg-program "gpg2")
--8<---------------cut here---------------end--------------->8---

So, customizing epg-gpg-program should be all you need.

Then choose menu “Attachments->Sign and Encrypt Message”, which
inserts the secure MML tag.  Then choose “Attachments->Preview”,
which performs the encryption and signing (hopefully):
* A passphrase dialogue for the private signing key appears.
  Enter correct passphrase.
* Then, a dialogue appears asking whether to decrypt.
  Answer no.

The MIME preview buffer contains something like
“[1. application/pgp-encrypted]”, while the encrypted bytes are in
buffer " *mm*" or " *mm*-<some-number>" (note the leading space in
the name).

In the buffer " *epg-debug*" (again with leading space), debug
output for gpg is visible.

If signature fails, maybe use this in gpg-agent.conf to create debug
output in /tmp/gpg-agent.log:

--8<---------------cut here---------------start------------->8---
log-file /tmp/gpg-agent.log
--8<---------------cut here---------------end--------------->8---

Best wishes

reply via email to

[Prev in Thread] Current Thread [Next in Thread]