extended credential_set_t interface by a cache_cert() method

allows persistent or in-memory caching of fetched certificates
This commit is contained in:
Martin Willi
2008-04-17 11:22:37 +00:00
parent 46a5604a04
commit 233b853dfa
12 changed files with 82 additions and 10 deletions
+9
View File
@@ -304,6 +304,14 @@ static enumerator_t* create_shared_enumerator(private_stroke_cred_t *this,
(void*)shared_data_destroy);
}
/**
* Implementation of credential_set_t.cache_cert.
*/
static void cache_cert(private_stroke_cred_t *this, certificate_t *cert)
{
/* TODO: implement crl writeback to ipsec.d/crls */
}
/**
* Add a certificate to chain
*/
@@ -868,6 +876,7 @@ stroke_cred_t *stroke_cred_create()
this->public.set.create_private_enumerator = (void*)create_private_enumerator;
this->public.set.create_cert_enumerator = (void*)create_cert_enumerator;
this->public.set.create_shared_enumerator = (void*)create_shared_enumerator;
this->public.set.cache_cert = (void*)cache_cert;
this->public.set.create_cdp_enumerator = (void*)return_null;
this->public.reread = (void(*)(stroke_cred_t*, stroke_msg_t *msg))reread;
this->public.load_ca = (certificate_t*(*)(stroke_cred_t*, char *filename))load_ca;