log nextUpdate of crls and ocsp responses
This commit is contained in:
@@ -535,8 +535,12 @@ static cert_validation_t check_ocsp(private_credential_manager_t *this,
|
|||||||
/* check the validity of the cached ocsp response if one was found */
|
/* check the validity of the cached ocsp response if one was found */
|
||||||
if (best_cert)
|
if (best_cert)
|
||||||
{
|
{
|
||||||
stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
|
time_t nextUpdate;
|
||||||
DBG1(DBG_CFG, "cached ocsp response is %s", stale? "stale":"valid");
|
|
||||||
|
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 */
|
/* fallback to URL fetching from CDPs */
|
||||||
@@ -559,10 +563,14 @@ static cert_validation_t check_ocsp(private_credential_manager_t *this,
|
|||||||
/* select most recent ocsp response until valid one is found */
|
/* select most recent ocsp response until valid one is found */
|
||||||
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
||||||
{
|
{
|
||||||
|
time_t nextUpdate;
|
||||||
|
|
||||||
DESTROY_IF(best_cert);
|
DESTROY_IF(best_cert);
|
||||||
best_cert = cert;
|
best_cert = cert;
|
||||||
stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
|
stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
|
||||||
DBG1(DBG_CFG, "ocsp response is %s", stale? "stale":"valid");
|
DBG1(DBG_CFG, "ocsp response is %s %#T",
|
||||||
|
stale? "stale: since":"valid: until",
|
||||||
|
&nextUpdate, FALSE );
|
||||||
if (!stale)
|
if (!stale)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -596,10 +604,14 @@ static cert_validation_t check_ocsp(private_credential_manager_t *this,
|
|||||||
/* select most recent ocsp response until valid one is found */
|
/* select most recent ocsp response until valid one is found */
|
||||||
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
||||||
{
|
{
|
||||||
|
time_t nextUpdate;
|
||||||
|
|
||||||
DESTROY_IF(best_cert);
|
DESTROY_IF(best_cert);
|
||||||
best_cert = cert;
|
best_cert = cert;
|
||||||
stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
|
stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
|
||||||
DBG1(DBG_CFG, "ocsp response is %s", stale? "stale":"valid");
|
DBG1(DBG_CFG, "ocsp response is %s %#T",
|
||||||
|
stale? "stale: since":"valid: until",
|
||||||
|
&nextUpdate, FALSE );
|
||||||
if (!stale)
|
if (!stale)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -744,8 +756,12 @@ static cert_validation_t check_crl(private_credential_manager_t *this,
|
|||||||
/* check the validity of the cached crl if one was found */
|
/* check the validity of the cached crl if one was found */
|
||||||
if (best_cert)
|
if (best_cert)
|
||||||
{
|
{
|
||||||
stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
|
time_t nextUpdate;
|
||||||
DBG1(DBG_CFG, "cached crl is %s", stale? "stale":"valid");
|
|
||||||
|
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 */
|
/* fallback to fetching crls from cdps defined in ca info sections */
|
||||||
@@ -767,10 +783,14 @@ static cert_validation_t check_crl(private_credential_manager_t *this,
|
|||||||
/* select most recent crl until valid one is found */
|
/* select most recent crl until valid one is found */
|
||||||
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
||||||
{
|
{
|
||||||
|
time_t nextUpdate;
|
||||||
|
|
||||||
DESTROY_IF(best_cert);
|
DESTROY_IF(best_cert);
|
||||||
best_cert = cert;
|
best_cert = cert;
|
||||||
stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
|
stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
|
||||||
DBG1(DBG_CFG, "fetched crl is %s", stale? "stale":"valid");
|
DBG1(DBG_CFG, "fetched crl is %s %#T",
|
||||||
|
stale? "stale: since":"valid: until",
|
||||||
|
&nextUpdate, FALSE );
|
||||||
if (!stale)
|
if (!stale)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -803,10 +823,14 @@ static cert_validation_t check_crl(private_credential_manager_t *this,
|
|||||||
/* select most recent crl until valid one is found */
|
/* select most recent crl until valid one is found */
|
||||||
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
if (best_cert == NULL || cert->is_newer(cert, best_cert))
|
||||||
{
|
{
|
||||||
|
time_t nextUpdate;
|
||||||
|
|
||||||
DESTROY_IF(best_cert);
|
DESTROY_IF(best_cert);
|
||||||
best_cert = cert;
|
best_cert = cert;
|
||||||
stale = !best_cert->get_validity(best_cert, NULL, NULL, NULL);
|
stale = !best_cert->get_validity(best_cert, NULL, NULL, &nextUpdate);
|
||||||
DBG1(DBG_CFG, "fetched crl is %s", stale? "stale":"valid");
|
DBG1(DBG_CFG, "fetched crl is %s %#T",
|
||||||
|
stale? "stale: since":"valid: until",
|
||||||
|
&nextUpdate, FALSE );
|
||||||
if (!stale)
|
if (!stale)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user