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 -1
View File
@@ -331,6 +331,14 @@ static enumerator_t* create_shared_enumerator(private_sql_cred_t *this,
return &e->public;
}
/**
* Implementation of credential_set_t.cache_cert.
*/
static void cache_cert(private_sql_cred_t *this, certificate_t *cert)
{
/* TODO: implement CRL caching to database */
}
/**
* Implementation of sql_cred_t.destroy.
*/
@@ -338,7 +346,6 @@ static void destroy(private_sql_cred_t *this)
{
free(this);
}
/**
* Described in header.
*/
@@ -350,6 +357,7 @@ sql_cred_t *sql_cred_create(database_t *db)
this->public.set.create_cert_enumerator = (void*)create_cert_enumerator;
this->public.set.create_shared_enumerator = (void*)create_shared_enumerator;
this->public.set.create_cdp_enumerator = (void*)return_null;
this->public.set.cache_cert = (void*)cache_cert;
this->public.destroy = (void(*)(sql_cred_t*))destroy;
this->db = db;