1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-09 21:41:09 +02:00

gpgsm: When selecting certs also skip certificates too young.

* sm/certlist.c (gpgsm_add_to_certlist): Also check for not yet valid
certs.
This commit is contained in:
Ramón García 2025-03-18 09:48:07 +01:00 committed by Werner Koch
parent 4cf83273e8
commit 029ac17b40
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -395,7 +395,8 @@ gpgsm_add_to_certlist (ctrl_t ctrl, const char *name, int secret,
else
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;