Migrated x509_plugin_t to INIT/METHOD macros
This commit is contained in:
@@ -36,10 +36,8 @@ struct private_x509_plugin_t {
|
|||||||
x509_plugin_t public;
|
x509_plugin_t public;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
METHOD(plugin_t, destroy, void,
|
||||||
* Implementation of x509_plugin_t.x509troy
|
private_x509_plugin_t *this)
|
||||||
*/
|
|
||||||
static void destroy(private_x509_plugin_t *this)
|
|
||||||
{
|
{
|
||||||
lib->creds->remove_builder(lib->creds,
|
lib->creds->remove_builder(lib->creds,
|
||||||
(builder_function_t)x509_cert_gen);
|
(builder_function_t)x509_cert_gen);
|
||||||
@@ -69,9 +67,15 @@ static void destroy(private_x509_plugin_t *this)
|
|||||||
*/
|
*/
|
||||||
plugin_t *x509_plugin_create()
|
plugin_t *x509_plugin_create()
|
||||||
{
|
{
|
||||||
private_x509_plugin_t *this = malloc_thing(private_x509_plugin_t);
|
private_x509_plugin_t *this;
|
||||||
|
|
||||||
this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
|
INIT(this,
|
||||||
|
.public = {
|
||||||
|
.plugin = {
|
||||||
|
.destroy = _destroy,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
lib->creds->add_builder(lib->creds, CRED_CERTIFICATE, CERT_X509, FALSE,
|
lib->creds->add_builder(lib->creds, CRED_CERTIFICATE, CERT_X509, FALSE,
|
||||||
(builder_function_t)x509_cert_gen);
|
(builder_function_t)x509_cert_gen);
|
||||||
|
|||||||
Reference in New Issue
Block a user