Added generic implementations for crl_is_newer/certificate_is_newer

This commit is contained in:
Martin Willi
2010-05-21 16:25:51 +02:00
parent 654218a31b
commit 8029e5efd2
8 changed files with 78 additions and 11 deletions
@@ -591,7 +591,7 @@ static certificate_t *get_better_ocsp(private_credential_manager_t *this,
}
/* select the better of the two responses */
if (best == NULL || cand->is_newer(cand, best))
if (best == NULL || certificate_is_newer(cand, best))
{
DESTROY_IF(best);
best = cand;
@@ -812,7 +812,7 @@ static certificate_t *get_better_crl(private_credential_manager_t *this,
enumerator->destroy(enumerator);
/* select the better of the two CRLs */
if (best == NULL || cand->is_newer(cand, best))
if (best == NULL || crl_is_newer(crl, (crl_t*)best))
{
DESTROY_IF(best);
best = cand;
@@ -959,7 +959,7 @@ static bool check_ip_addr_block_constraints(x509_t *subject, x509_t *issuer)
if (!subject_constraint && !issuer_constraint)
{
return TRUE;
return TRUE;
}
if (!subject_constraint)
{
@@ -969,7 +969,7 @@ static bool check_ip_addr_block_constraints(x509_t *subject, x509_t *issuer)
if (!issuer_constraint)
{
DBG1(DBG_CFG, "issuer certficate lacks ipAddrBlocks extension");
return FALSE;
return FALSE;
}
subject_enumerator = subject->create_ipAddrBlock_enumerator(subject);
while (subject_enumerator->enumerate(subject_enumerator, &subject_ts))
@@ -996,7 +996,7 @@ static bool check_ip_addr_block_constraints(x509_t *subject, x509_t *issuer)
}
}
subject_enumerator->destroy(subject_enumerator);
return contained;
return contained;
}
/**
+1 -1
View File
@@ -378,7 +378,7 @@ static bool add_crl(private_stroke_cred_t *this, crl_t* crl)
}
if (found)
{
new = cert->is_newer(cert, current);
new = crl_is_newer(crl, crl_c);
if (new)
{
this->certs->remove_at(this->certs, enumerator);