[PATCH gnupg 2/4] sm: Also skip certificates too young

Ramón García ramon.garcia.f at gmail.com
Sun Feb 16 23:02:24 CET 2025


* sm/certlist.c: Skip certificates not yet valid
---
 sm/certlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sm/certlist.c b/sm/certlist.c
index 6c5080a69..a343efe64 100644
--- a/sm/certlist.c
+++ b/sm/certlist.c
@@ -397,7 +397,7 @@ gpgsm_add_to_certlist (ctrl_t ctrl, const char
*name, int secret,
                     wrong_usage = rc;

                 }
-              else if (gpg_err_code (rc) == GPG_ERR_CERT_EXPIRED)
+              else if (gpg_err_code (rc) == GPG_ERR_CERT_EXPIRED ||
gpg_err_code (rc) == GPG_ERR_CERT_TOO_YOUNG)
                 {
                   ksba_cert_release (cert);
                   cert = NULL;
-- 
2.43.0



More information about the Gnupg-devel mailing list