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