On Fri, Jul 03, 2026 at 08:55:02PM +0200, Robert Jäschke via Mutt-dev wrote:
Am 02.07.2026 schrieb Kevin J. McCarthy:
In the Mutt GPGME code, in get_candidates(), the APPLICATION_PGP section has
code to check for revoked/expired/disabled flags:
[...]
However, the APPLICATION_SMIME code in the same function is missing those
checks.

Thank you for finding that code. For testing purposes, I have added just
the lines

         if (key->expired)
           flags |= KEYFLAG_EXPIRED;

to the corresponding S/MIME loop and it works as expected (although the
option pgp_show_unusable seems to be ignored but I have to further check
that).

I'm glad that is working.  That's good in that it means the S/MIME GPGME
backend flags are set.  So it's just a matter of hooking them up.

The check for the $pgp_show_unusable is there in crypt_select_key(), so
I'm not seeing right away why that isn't working for you.  You may have
to add muttdbg() statements and see what the problem is.

While diving through crypt-gpgme.c I found the functions
crypt_select_key and crypt_entry_fmt. That led me to the option
pgp_entry_format and its sequence for the time:

%[<s>]    date of the key where <s> is an strftime(3) expression

I wonder why it shows the creation date and not the expiration date of
the key?

Yeah, that's not going to be changeable. The format string is shared across GPGME and PGP classic, and I assure people will notice if you just change it. Adding multiple dates also involves mucking in the gnupgparse parser, which I'd rather not do for something like this.

Let's see if you can discover why the $pgp_show_unusable isn't working for you.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to