Home GnuPG
Diffusion GnuPG ad8bce774d91

gpgsm: Fix error message if all selected certificates are expired.

Description

gpgsm: Fix error message if all selected certificates are expired.

* sm/certlist.c (gpgsm_add_to_certlist): Track expired error.  Make
the expired check easier to read by using if and case.

Original ChangeLog:

If all selected certificates are expired, don't mislead the user
saying that no certificate was found. Instead, return the error
of the first certificate selected.

* sm/certlist.c: if one expired certificate was found, don't return
  no certificate found, return instead the expiration error

I heavily changed Ramon's original patch and hope that I don't
introduced a regression to his patch. - wk@gnupg.org

Details

Provenance
Ramón García <ramon.garcia.f@gmail.com>Authored on Tue, Mar 18, 12:14 PM
wernerCommitted on Tue, Mar 18, 12:14 PM
Parents
rG53f5aad90517: gpgsm: Avoid increasing error count when enumerating an expired cert.
Branches
Unknown
Tags
Unknown