aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/smartcard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pluto/smartcard.c')
-rw-r--r--src/pluto/smartcard.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/pluto/smartcard.c b/src/pluto/smartcard.c
index 97074f52e..cf50a5bba 100644
--- a/src/pluto/smartcard.c
+++ b/src/pluto/smartcard.c
@@ -570,21 +570,15 @@ static void scx_find_cert_objects(CK_SLOT_ID slot, CK_SESSION_HANDLE session)
/* check validity of certificate */
cert = sc->last_cert.u.x509;
- valid_until = cert->notAfter;
- ugh = check_validity(cert, &valid_until);
- if (ugh != NULL)
+ if (!cert->cert->get_validity(cert->cert, NULL, NULL, &valid_until)
{
- plog(" %s", ugh);
free_x509cert(cert);
scx_free(sc);
continue;
}
- else
- {
- DBG(DBG_CONTROL,
- DBG_log(" certificate is valid")
- )
- }
+ DBG(DBG_CONTROL,
+ DBG_log(" certificate is valid")
+ )
sc = scx_add(sc);