Moved credential manager to libstrongswan
This commit is contained in:
@@ -307,7 +307,7 @@ static void del(private_stroke_ca_t *this, stroke_msg_t *msg)
|
||||
}
|
||||
ca_section_destroy(ca);
|
||||
|
||||
charon->credentials->flush_cache(charon->credentials, CERT_ANY);
|
||||
lib->credmgr->flush_cache(lib->credmgr, CERT_ANY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -399,8 +399,8 @@ static auth_cfg_t *build_auth_cfg(private_stroke_config_t *this,
|
||||
if (ca)
|
||||
{
|
||||
identity = identification_create_from_string(ca);
|
||||
certificate = charon->credentials->get_cert(charon->credentials,
|
||||
CERT_X509, KEY_ANY, identity, TRUE);
|
||||
certificate = lib->credmgr->get_cert(lib->credmgr, CERT_X509,
|
||||
KEY_ANY, identity, TRUE);
|
||||
identity->destroy(identity);
|
||||
if (certificate)
|
||||
{
|
||||
|
||||
@@ -576,9 +576,8 @@ static void status(private_stroke_list_t *this, stroke_msg_t *msg, FILE *out, bo
|
||||
static linked_list_t* create_unique_cert_list(certificate_type_t type)
|
||||
{
|
||||
linked_list_t *list = linked_list_create();
|
||||
enumerator_t *enumerator = charon->credentials->create_cert_enumerator(
|
||||
charon->credentials, type, KEY_ANY,
|
||||
NULL, FALSE);
|
||||
enumerator_t *enumerator = lib->credmgr->create_cert_enumerator(
|
||||
lib->credmgr, type, KEY_ANY, NULL, FALSE);
|
||||
certificate_t *cert;
|
||||
|
||||
while (enumerator->enumerate(enumerator, (void**)&cert))
|
||||
@@ -631,7 +630,7 @@ static void list_public_key(public_key_t *public, FILE *out)
|
||||
{
|
||||
id = identification_create_from_encoding(ID_KEY_ID, keyid);
|
||||
auth = auth_cfg_create();
|
||||
private = charon->credentials->get_private(charon->credentials,
|
||||
private = lib->credmgr->get_private(lib->credmgr,
|
||||
public->get_type(public), id, auth);
|
||||
auth->destroy(auth);
|
||||
id->destroy(id);
|
||||
|
||||
@@ -344,8 +344,7 @@ static void stroke_purge(private_stroke_socket_t *this,
|
||||
{
|
||||
if (msg->purge.flags & PURGE_OCSP)
|
||||
{
|
||||
charon->credentials->flush_cache(charon->credentials,
|
||||
CERT_X509_OCSP_RESPONSE);
|
||||
lib->credmgr->flush_cache(lib->credmgr, CERT_X509_OCSP_RESPONSE);
|
||||
}
|
||||
if (msg->purge.flags & PURGE_IKE)
|
||||
{
|
||||
@@ -622,8 +621,8 @@ static bool open_socket(private_stroke_socket_t *this)
|
||||
static void destroy(private_stroke_socket_t *this)
|
||||
{
|
||||
this->job->cancel(this->job);
|
||||
charon->credentials->remove_set(charon->credentials, &this->ca->set);
|
||||
charon->credentials->remove_set(charon->credentials, &this->cred->set);
|
||||
lib->credmgr->remove_set(lib->credmgr, &this->ca->set);
|
||||
lib->credmgr->remove_set(lib->credmgr, &this->cred->set);
|
||||
charon->backends->remove_backend(charon->backends, &this->config->backend);
|
||||
hydra->attributes->remove_provider(hydra->attributes, &this->attribute->provider);
|
||||
this->cred->destroy(this->cred);
|
||||
@@ -657,8 +656,8 @@ stroke_socket_t *stroke_socket_create()
|
||||
this->control = stroke_control_create();
|
||||
this->list = stroke_list_create(this->attribute);
|
||||
|
||||
charon->credentials->add_set(charon->credentials, &this->ca->set);
|
||||
charon->credentials->add_set(charon->credentials, &this->cred->set);
|
||||
lib->credmgr->add_set(lib->credmgr, &this->ca->set);
|
||||
lib->credmgr->add_set(lib->credmgr, &this->cred->set);
|
||||
charon->backends->add_backend(charon->backends, &this->config->backend);
|
||||
hydra->attributes->add_provider(hydra->attributes, &this->attribute->provider);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user