unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Trouble decrypting multipart/encrypted
@ 2016-11-27 22:13 Eric Skoglund
  2016-11-28 11:57 ` David Bremner
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Skoglund @ 2016-11-27 22:13 UTC (permalink / raw)
  To: notmuch


Hello, I've recently started using notmuch (together with emacs) and
have now encountered some problems when trying to decrypt a
multipart/encrypted message.

The message body looks like:

body{

part{ ID: 1, Content-type: multipart/encrypted

part{ ID: 2, Content-type: application/pgp-encrypted
Non-text part: application/pgp-encrypted

part}

part{ ID: 3, Filename: encrypted.asc, Content-type: application/octet-stream
Non-text part: application/octet-stream

part}

part}

body}

And when running the command notmuch show --decrypt id:<message-id> I
get the error 'Failed to decrypt part: Canceled.'.

I've verified that gpg-agent is running (v2.1.13), both using ps which
gives me: gpg-agent --homedir /home/eric/.gnupg --use-standard-socket
--daemon and the gpg-connect-agent /bye return code is 0.

I also tried to add the use-agent in gpg.conf but that hasn't helped at
all.

Signing and encrypting email via C-c C-m s p and C-c C-m c p works
fine. And given that it doesn't work outside of emacs I don't think it
is an emacs problem. I'm also able to decrypt the message via the
command line using just gpg.

Gpg2 version: 2.1.13

I'm running fedora 24 with gnome if that helps.

Any input on how to solve this issue is greatly appriciated.

Regards,
Eric

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

* Re: Trouble decrypting multipart/encrypted
  2016-11-27 22:13 Trouble decrypting multipart/encrypted Eric Skoglund
@ 2016-11-28 11:57 ` David Bremner
  2016-11-28 17:37   ` Eric Skoglund
  0 siblings, 1 reply; 9+ messages in thread
From: David Bremner @ 2016-11-28 11:57 UTC (permalink / raw)
  To: Eric Skoglund, notmuch

Eric Skoglund <eric@pagefault.se> writes:

> Hello, I've recently started using notmuch (together with emacs) and
> have now encountered some problems when trying to decrypt a
> multipart/encrypted message.

Is it just this one message, or all multipart/encrypted messages?

>
> Signing and encrypting email via C-c C-m s p and C-c C-m c p works
> fine. And given that it doesn't work outside of emacs I don't think it
> is an emacs problem. I'm also able to decrypt the message via the
> command line using just gpg.

Can you verify signed, non-encrypted messages (notmuch show --verify) ?

> Gpg2 version: 2.1.13
>
> I'm running fedora 24 with gnome if that helps.
>
> Any input on how to solve this issue is greatly appriciated.

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

* Re: Trouble decrypting multipart/encrypted
  2016-11-28 11:57 ` David Bremner
@ 2016-11-28 17:37   ` Eric Skoglund
  2016-11-28 18:56     ` David Bremner
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Skoglund @ 2016-11-28 17:37 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:

> Eric Skoglund <eric@pagefault.se> writes:
>
>> Hello, I've recently started using notmuch (together with emacs) and
>> have now encountered some problems when trying to decrypt a
>> multipart/encrypted message.
>
> Is it just this one message, or all multipart/encrypted messages?
>

I've now tried two other encrypted messages and they also fail to
decrypt. epa-mail-decrypt works here so it seems like a notmuch issue,
guessing that there is some configuration that is wrong somewhere.

>>
>> Signing and encrypting email via C-c C-m s p and C-c C-m c p works
>> fine. And given that it doesn't work outside of emacs I don't think it
>> is an emacs problem. I'm also able to decrypt the message via the
>> command line using just gpg.
>
> Can you verify signed, non-encrypted messages (notmuch show --verify) ?
>

I'm not getting any output besides the message when I do --verify (same as
with an unsigned message) so to me it doesn't seem like it is working
per the man page. But I might be wrong here.

// Eric

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

* Re: Trouble decrypting multipart/encrypted
  2016-11-28 17:37   ` Eric Skoglund
@ 2016-11-28 18:56     ` David Bremner
  2016-11-29  5:40       ` Eric Skoglund
  0 siblings, 1 reply; 9+ messages in thread
From: David Bremner @ 2016-11-28 18:56 UTC (permalink / raw)
  To: Eric Skoglund, notmuch

Eric Skoglund <eric@pagefault.se> writes:

>>>
>>> Signing and encrypting email via C-c C-m s p and C-c C-m c p works
>>> fine. And given that it doesn't work outside of emacs I don't think it
>>> is an emacs problem. I'm also able to decrypt the message via the
>>> command line using just gpg.
>>
>> Can you verify signed, non-encrypted messages (notmuch show --verify) ?
>>
>
> I'm not getting any output besides the message when I do --verify (same as
> with an unsigned message) so to me it doesn't seem like it is working
> per the man page. But I might be wrong here.
>

Yeah, --verify only works with one of the structured output formats
(json or sexp). I suppose that's probably a documentation bug.

try

% notmuch show --format=json --verify $message

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

* Re: Trouble decrypting multipart/encrypted
  2016-11-28 18:56     ` David Bremner
@ 2016-11-29  5:40       ` Eric Skoglund
  2016-11-29 14:34         ` David Bremner
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Skoglund @ 2016-11-29  5:40 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:

>
> Yeah, --verify only works with one of the structured output formats
> (json or sexp). I suppose that's probably a documentation bug.
>
> try
>
> % notmuch show --format=json --verify $message

Yes that did work, getting "sigstatus : [ { 'status': 'good' .... }]".

// Eric

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

* Re: Trouble decrypting multipart/encrypted
  2016-11-29  5:40       ` Eric Skoglund
@ 2016-11-29 14:34         ` David Bremner
  2016-11-29 17:43           ` Eric Skoglund
  0 siblings, 1 reply; 9+ messages in thread
From: David Bremner @ 2016-11-29 14:34 UTC (permalink / raw)
  To: Eric Skoglund, notmuch

Eric Skoglund <eric@pagefault.se> writes:

> David Bremner <david@tethera.net> writes:
>
>>
>> Yeah, --verify only works with one of the structured output formats
>> (json or sexp). I suppose that's probably a documentation bug.
>>
>> try
>>
>> % notmuch show --format=json --verify $message
>
> Yes that did work, getting "sigstatus : [ { 'status': 'good' .... }]".

OK, so notmuch can talk to gpg. I'm only guessing, but it seems like
some kind of problem with pinentry, or access to private keys. One
potential issue is having multiple versions of gpg installed.

%  notmuch config get crypto.gpg_path

should give the same path as the gpg you normally use (so, 2.1.13 as you
said).

For pinentry issues, my own prejudice is that pinentry-curses is hard to
get working right, and pinentry-gtk usually works more smoothly; I don't
know if that's relevant for you.

d

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

* Re: Trouble decrypting multipart/encrypted
  2016-11-29 14:34         ` David Bremner
@ 2016-11-29 17:43           ` Eric Skoglund
  2016-12-03  1:54             ` David Bremner
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Skoglund @ 2016-11-29 17:43 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:

> Eric Skoglund <eric@pagefault.se> writes:
>
>> David Bremner <david@tethera.net> writes:
>>
>>>
>>> Yeah, --verify only works with one of the structured output formats
>>> (json or sexp). I suppose that's probably a documentation bug.
>>>
>>> try
>>>
>>> % notmuch show --format=json --verify $message
>>
>> Yes that did work, getting "sigstatus : [ { 'status': 'good' .... }]".
>
> OK, so notmuch can talk to gpg. I'm only guessing, but it seems like
> some kind of problem with pinentry, or access to private keys. One
> potential issue is having multiple versions of gpg installed.
>
> %  notmuch config get crypto.gpg_path
>
> should give the same path as the gpg you normally use (so, 2.1.13 as you
> said).
>

Thank you David! Seems like notmuch used the gpg1 binary (that fedora
has installed by default also), I switched the gpg binary to gpg2 and it
now works like a charm!

Thank you so much for your help.

// Eric Skoglund

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

* Re: Trouble decrypting multipart/encrypted
  2016-11-29 17:43           ` Eric Skoglund
@ 2016-12-03  1:54             ` David Bremner
  2016-12-03  8:38               ` Tomi Ollila
  0 siblings, 1 reply; 9+ messages in thread
From: David Bremner @ 2016-12-03  1:54 UTC (permalink / raw)
  To: Eric Skoglund, notmuch

Eric Skoglund <eric@pagefault.se> writes:


> Thank you David! Seems like notmuch used the gpg1 binary (that fedora
> has installed by default also), I switched the gpg binary to gpg2 and it
> now works like a charm!
>
> Thank you so much for your help.
>
> // Eric Skoglund

I believe that there is patches in the pipeline to switch the default to
gpg2 (if it exists). Hopefully this solves more problems than it creates
;).

d

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

* Re: Trouble decrypting multipart/encrypted
  2016-12-03  1:54             ` David Bremner
@ 2016-12-03  8:38               ` Tomi Ollila
  0 siblings, 0 replies; 9+ messages in thread
From: Tomi Ollila @ 2016-12-03  8:38 UTC (permalink / raw)
  To: eric, notmuch

On Sat, Dec 03 2016, David Bremner <david@tethera.net> wrote:

> Eric Skoglund <eric@pagefault.se> writes:
>
>
>> Thank you David! Seems like notmuch used the gpg1 binary (that fedora
>> has installed by default also), I switched the gpg binary to gpg2 and it
>> now works like a charm!
>>
>> Thank you so much for your help.
>>
>> // Eric Skoglund
>
> I believe that there is patches in the pipeline to switch the default to
> gpg2 (if it exists). Hopefully this solves more problems than it creates
> ;).

First (and currently only) in http://nmbug.tethera.net/status/#Stale

Quick look says it uses gpg2 for tests if it exists; I'll look more into
this (again) later...

Tomi

>
> d
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

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

end of thread, other threads:[~2016-12-03  8:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-27 22:13 Trouble decrypting multipart/encrypted Eric Skoglund
2016-11-28 11:57 ` David Bremner
2016-11-28 17:37   ` Eric Skoglund
2016-11-28 18:56     ` David Bremner
2016-11-29  5:40       ` Eric Skoglund
2016-11-29 14:34         ` David Bremner
2016-11-29 17:43           ` Eric Skoglund
2016-12-03  1:54             ` David Bremner
2016-12-03  8:38               ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.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).