Gpgsm should skip expired certificates when there is a valid one

Ramón García via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <CA+=ghCgbCQ6KnWOkD3CkXDRDzyNcJYSLEhVKzryTOOEr06u2TQ@mail.gmail.com>
Hello,

I found that gpgsm cannot cope correctly with the situation of
renewing an expired certificate, but wanting to keep it in case one
has to decrypt an old file. Gpgsm gives an error saying that a
certificate is expired, if it is the first one that it finds given the
user arguments. It looks like this is not the desired behaviour (see,
for instance, https://gnupg-users.gnupg.narkive.com/fLeWRzw7/gpgsm-and-expired-certificates
). So I wrote a patch to correct this behaviour. I am going to post it
here.

By the way, it would be much easier to contribute with an interface
based on pull requests like Github/Bitbucket/Gitlab/... Preparing a
patch by email is complicated and discourages contributions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.