diff options
author | Ramón García <[email protected]> | 2025-03-18 09:04:37 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2025-03-18 09:04:37 +0000 |
commit | 53f5aad90517600a882844f7be552d85e1ad89ea (patch) | |
tree | 7e6bad27b775bfd4c4f9c32001f648427760a8f4 /sm/certlist.c | |
parent | gpgsm: When selecting certs also skip certificates too young. (diff) | |
download | gnupg-53f5aad90517600a882844f7be552d85e1ad89ea.tar.gz gnupg-53f5aad90517600a882844f7be552d85e1ad89ea.zip |
gpgsm: Avoid increasing error count when enumerating an expired cert.
* sm/certchain.c (check_validity_period_cm): Add arg no_log_expired to
avoid bumping of the error counter due to the do_list function.
* sm/certlist.c (gpgsm_add_to_certlist): Set no_log_expired when
checking the expiration.
--
I modified the original patch to make the patch smaller and the code
easier to read. - [email protected]
Diffstat (limited to 'sm/certlist.c')
-rw-r--r-- | sm/certlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sm/certlist.c b/sm/certlist.c index 549aaa726..21c163290 100644 --- a/sm/certlist.c +++ b/sm/certlist.c @@ -376,7 +376,7 @@ gpgsm_add_to_certlist (ctrl_t ctrl, const char *name, int secret, current_time_loaded = 1; } rc = check_validity_period_cm (current_time, current_time, - cert, exp_time, 0, NULL, 0); + cert, exp_time, 0, NULL, 0, 0); } if (gpg_err_code (rc) == GPG_ERR_WRONG_KEY_USAGE) { @@ -458,7 +458,7 @@ gpgsm_add_to_certlist (ctrl_t ctrl, const char *name, int secret, current_time, cert, exp_time, - 0, NULL, 0) + 0, NULL, 0, 1) ) == GPG_ERR_CERT_EXPIRED ) ) |