From 03c1c61ca828d65417344ec79fe25008023abb03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20B=C3=BChler?= Date: Tue, 4 Jul 2017 11:57:24 +0200 Subject: [PATCH] fix gpgme S/MIME non-detached signature handling - gpgsm ends the session after the decrypt error, so restart gpgsm when retrying with "maybe_signed". - evolution sends encrypted + signed S/MIME mails with non-detached signatures --- ncrypt/crypt_gpgme.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index f221c5699..d4a7564e7 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -1705,6 +1705,9 @@ restart: { maybe_signed = true; gpgme_data_release(plaintext); + /* gpgsm ends the session after an error; restart it */ + gpgme_release(ctx); + ctx = create_gpgme_context(is_smime); goto restart; } } -- 2.40.0