/* check the validity of the cached ocsp response if one was found */
if (best_cert)
{
- stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
- DBG1(DBG_CFG, "cached ocsp response is %s", stale? "stale":"valid");
+ time_t nextUpdate;
+
+ stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
+ DBG1(DBG_CFG, "cached ocsp response is %s %#T",
+ stale? "stale: since":"valid: until",
+ &nextUpdate, FALSE );
}
/* fallback to URL fetching from CDPs */
/* select most recent ocsp response until valid one is found */
if (best_cert == NULL || cert->is_newer(cert, best_cert))
{
+ time_t nextUpdate;
+
DESTROY_IF(best_cert);
best_cert = cert;
- stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
- DBG1(DBG_CFG, "ocsp response is %s", stale? "stale":"valid");
+ stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
+ DBG1(DBG_CFG, "ocsp response is %s %#T",
+ stale? "stale: since":"valid: until",
+ &nextUpdate, FALSE );
if (!stale)
{
break;
/* select most recent ocsp response until valid one is found */
if (best_cert == NULL || cert->is_newer(cert, best_cert))
{
+ time_t nextUpdate;
+
DESTROY_IF(best_cert);
best_cert = cert;
- stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
- DBG1(DBG_CFG, "ocsp response is %s", stale? "stale":"valid");
+ stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
+ DBG1(DBG_CFG, "ocsp response is %s %#T",
+ stale? "stale: since":"valid: until",
+ &nextUpdate, FALSE );
if (!stale)
{
break;
/* check the validity of the cached crl if one was found */
if (best_cert)
{
- stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
- DBG1(DBG_CFG, "cached crl is %s", stale? "stale":"valid");
+ time_t nextUpdate;
+
+ stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
+ DBG1(DBG_CFG, "cached crl is %s %#T",
+ stale? "stale: since":"valid: until",
+ &nextUpdate, FALSE );
}
/* fallback to fetching crls from cdps defined in ca info sections */
/* select most recent crl until valid one is found */
if (best_cert == NULL || cert->is_newer(cert, best_cert))
{
+ time_t nextUpdate;
+
DESTROY_IF(best_cert);
best_cert = cert;
- stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
- DBG1(DBG_CFG, "fetched crl is %s", stale? "stale":"valid");
+ stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
+ DBG1(DBG_CFG, "fetched crl is %s %#T",
+ stale? "stale: since":"valid: until",
+ &nextUpdate, FALSE );
if (!stale)
{
break;
/* select most recent crl until valid one is found */
if (best_cert == NULL || cert->is_newer(cert, best_cert))
{
+ time_t nextUpdate;
+
DESTROY_IF(best_cert);
best_cert = cert;
- stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
- DBG1(DBG_CFG, "fetched crl is %s", stale? "stale":"valid");
+ stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
+ DBG1(DBG_CFG, "fetched crl is %s %#T",
+ stale? "stale: since":"valid: until",
+ &nextUpdate, FALSE );
if (!stale)
{
break;