Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Jens Lechtenboerger <jens.lechtenboerger@fsfe.org>
To: Nils Gillmann <niasterisk@grrlz.net>
Cc: info-gnus-english@gnu.org
Subject: Re: possible emacs 24.5 + Gnus problem when using pgpmime and signencrypt
Date: Mon, 14 Mar 2016 18:41:33 +0100	[thread overview]
Message-ID: <87vb4pneia.fsf@informationelle-selbstbestimmung-im-internet.de> (raw)
In-Reply-To: <8760wp6lt0.fsf_-_@grrlz.net> (Nils Gillmann's message of "Mon, 14 Mar 2016 17:55:55 +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
$ unset GPG_AGENT_INFO
$ 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---
verbose
log-file /tmp/gpg-agent.log
debug-all
--8<---------------cut here---------------end--------------->8---

Best wishes
Jens

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

  reply	other threads:[~2016-03-14 17:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-13 15:16 Trouble with GnuPG 2.1 Nils Gillmann
2016-03-13 15:48 ` Jens Lechtenboerger
2016-03-13 16:21   ` Nils Gillmann
2016-03-13 17:17     ` Jens Lechtenboerger
2016-03-13 19:57       ` Nils Gillmann
2016-03-14 16:55         ` possible emacs 24.5 + Gnus problem when using pgpmime and signencrypt (was: Re: Trouble with GnuPG 2.1) Nils Gillmann
2016-03-14 17:41           ` Jens Lechtenboerger [this message]
2016-03-14  9:39 ` Trouble with GnuPG 2.1 Nils Gillmann

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=87vb4pneia.fsf@informationelle-selbstbestimmung-im-internet.de \
    --to=jens.lechtenboerger@fsfe.org \
    --cc=info-gnus-english@gnu.org \
    --cc=niasterisk@grrlz.net \
    /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).