Removed is_newer() from certificate_t, obsoleting all implementations
This commit is contained in:
@@ -187,23 +187,6 @@ static bool get_validity(private_pgp_cert_t *this, time_t *when,
|
||||
return (t >= this->valid && t <= until);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, " certificate from %T is %s - existing certificate"
|
||||
" from %T %s", &this_update, FALSE, new ? "newer" : "not newer",
|
||||
&that_update, FALSE, new ? "replaced" : "retained");
|
||||
return new;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of certificate_t.get_encoding.
|
||||
*/
|
||||
@@ -276,7 +259,6 @@ private_pgp_cert_t *create_empty()
|
||||
this->public.interface.interface.issued_by = (bool (*) (certificate_t*, certificate_t*))issued_by;
|
||||
this->public.interface.interface.get_public_key = (public_key_t* (*) (certificate_t*))get_public_key;
|
||||
this->public.interface.interface.get_validity = (bool (*) (certificate_t*, time_t*, time_t*, time_t*))get_validity;
|
||||
this->public.interface.interface.is_newer = (bool (*) (certificate_t*,certificate_t*))is_newer;
|
||||
this->public.interface.interface.get_encoding = (chunk_t (*) (certificate_t*))get_encoding;
|
||||
this->public.interface.interface.equals = (bool (*)(certificate_t*, certificate_t*))equals;
|
||||
this->public.interface.interface.get_ref = (certificate_t* (*)(certificate_t*))get_ref;
|
||||
|
||||
Reference in New Issue
Block a user