Add a builder to load specific pkcs11 certificates by keyid

This commit is contained in:
Martin Willi
2012-10-24 13:07:52 +02:00
parent ffe42fa405
commit fbd3863571
3 changed files with 115 additions and 0 deletions
@@ -147,6 +147,9 @@ static bool handle_certs(private_pkcs11_plugin_t *this,
token_event_cb(this, p11, slot, TRUE);
}
enumerator->destroy(enumerator);
lib->creds->add_builder(lib->creds, CRED_CERTIFICATE,
CERT_X509, FALSE, (void*)pkcs11_creds_load);
}
else
{
@@ -157,6 +160,8 @@ static bool handle_certs(private_pkcs11_plugin_t *this,
lib->credmgr->remove_set(lib->credmgr, &creds->set);
creds->destroy(creds);
}
lib->creds->remove_builder(lib->creds, (void*)pkcs11_creds_load);
}
return TRUE;
}