Migrated auth_cfg_wrapper to INIT/METHOD macros
This commit is contained in:
@@ -172,12 +172,9 @@ static void wrapper_enumerator_destroy(wrapper_enumerator_t *this)
|
|||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
METHOD(credential_set_t, create_enumerator, enumerator_t*,
|
||||||
* implementation of auth_cfg_wrapper_t.set.create_cert_enumerator
|
private_auth_cfg_wrapper_t *this, certificate_type_t cert, key_type_t key,
|
||||||
*/
|
identification_t *id, bool trusted)
|
||||||
static enumerator_t *create_enumerator(private_auth_cfg_wrapper_t *this,
|
|
||||||
certificate_type_t cert, key_type_t key,
|
|
||||||
identification_t *id, bool trusted)
|
|
||||||
{
|
{
|
||||||
wrapper_enumerator_t *enumerator;
|
wrapper_enumerator_t *enumerator;
|
||||||
|
|
||||||
@@ -196,10 +193,8 @@ static enumerator_t *create_enumerator(private_auth_cfg_wrapper_t *this,
|
|||||||
return &enumerator->public;
|
return &enumerator->public;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
METHOD(auth_cfg_wrapper_t, destroy, void,
|
||||||
* Implementation of auth_cfg_wrapper_t.destroy
|
private_auth_cfg_wrapper_t *this)
|
||||||
*/
|
|
||||||
static void destroy(private_auth_cfg_wrapper_t *this)
|
|
||||||
{
|
{
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
@@ -209,16 +204,20 @@ static void destroy(private_auth_cfg_wrapper_t *this)
|
|||||||
*/
|
*/
|
||||||
auth_cfg_wrapper_t *auth_cfg_wrapper_create(auth_cfg_t *auth)
|
auth_cfg_wrapper_t *auth_cfg_wrapper_create(auth_cfg_t *auth)
|
||||||
{
|
{
|
||||||
private_auth_cfg_wrapper_t *this = malloc_thing(private_auth_cfg_wrapper_t);
|
private_auth_cfg_wrapper_t *this;
|
||||||
|
|
||||||
this->public.set.create_private_enumerator = (void*)return_null;
|
INIT(this,
|
||||||
this->public.set.create_cert_enumerator = (void*)create_enumerator;
|
.public = {
|
||||||
this->public.set.create_shared_enumerator = (void*)return_null;
|
.set = {
|
||||||
this->public.set.create_cdp_enumerator = (void*)return_null;
|
.create_cert_enumerator = _create_enumerator,
|
||||||
this->public.set.cache_cert = (void*)nop;
|
.create_shared_enumerator = (void*)return_null,
|
||||||
this->public.destroy = (void(*)(auth_cfg_wrapper_t*))destroy;
|
.create_cdp_enumerator = (void*)return_null,
|
||||||
|
.cache_cert = (void*)nop,
|
||||||
this->auth = auth;
|
},
|
||||||
|
.destroy = _destroy,
|
||||||
|
},
|
||||||
|
.auth = auth,
|
||||||
|
);
|
||||||
|
|
||||||
return &this->public;
|
return &this->public;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user