Removed is_newer() from certificate_t, obsoleting all implementations

This commit is contained in:
Martin Willi
2010-05-21 16:25:51 +02:00
parent 8029e5efd2
commit aab861608a
10 changed files with 2 additions and 182 deletions
@@ -763,23 +763,6 @@ static bool get_validity(private_x509_ocsp_response_t *this, time_t *when,
return (t < this->usableUntil);
}
/**
* Implementation of certificate_t.is_newer.
*/
static bool is_newer(certificate_t *this, certificate_t *that)
{
time_t this_update, that_update, now = time(NULL);
bool new;
this->get_validity(this, &now, &this_update, NULL);
that->get_validity(that, &now, &that_update, NULL);
new = this_update > that_update;
DBG1(DBG_LIB, " ocsp response from %T is %s - existing ocsp response "
"from %T %s", &this_update, FALSE, new ? "newer" : "not newer",
&that_update, FALSE, new ? "replaced" : "retained");
return new;
}
/**
* Implementation of certificate_t.get_encoding.
*/
@@ -855,7 +838,6 @@ static x509_ocsp_response_t *load(chunk_t blob)
this->public.interface.certificate.issued_by = (bool (*)(certificate_t *this, certificate_t *issuer))issued_by;
this->public.interface.certificate.get_public_key = (public_key_t* (*)(certificate_t *this))get_public_key;
this->public.interface.certificate.get_validity = (bool(*)(certificate_t*, time_t *when, time_t *, time_t*))get_validity;
this->public.interface.certificate.is_newer = (bool (*)(certificate_t*,certificate_t*))is_newer;
this->public.interface.certificate.get_encoding = (chunk_t(*)(certificate_t*))get_encoding;
this->public.interface.certificate.equals = (bool(*)(certificate_t*, certificate_t *other))equals;
this->public.interface.certificate.get_ref = (certificate_t* (*)(certificate_t *this))get_ref;