diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-10-30 17:59:23 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-10-30 17:59:23 +0100 |
commit | 7c57867ebde0e40a310bef269b4590eb48ae7cbf (patch) | |
tree | 0e7e663ea8648601b99cdfa2abe5e1fea34141d8 | |
parent | 1c2008f07f1148f893378095f75a5310d6960808 (diff) | |
download | strongswan-7c57867ebde0e40a310bef269b4590eb48ae7cbf.tar.bz2 strongswan-7c57867ebde0e40a310bef269b4590eb48ae7cbf.tar.xz |
Added features support to agent plugin
-rw-r--r-- | src/libstrongswan/plugins/agent/agent_plugin.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/libstrongswan/plugins/agent/agent_plugin.c b/src/libstrongswan/plugins/agent/agent_plugin.c index 79c13b7c1..ed02e24e5 100644 --- a/src/libstrongswan/plugins/agent/agent_plugin.c +++ b/src/libstrongswan/plugins/agent/agent_plugin.c @@ -37,11 +37,20 @@ METHOD(plugin_t, get_name, char*, return "agent"; } +METHOD(plugin_t, get_features, int, + private_agent_plugin_t *this, plugin_feature_t *features[]) +{ + static plugin_feature_t f[] = { + PLUGIN_REGISTER(PRIVKEY, agent_private_key_open, FALSE), + PLUGIN_PROVIDE(PRIVKEY, KEY_RSA), + }; + *features = f; + return countof(f); +} + METHOD(plugin_t, destroy, void, private_agent_plugin_t *this) { - lib->creds->remove_builder(lib->creds, - (builder_function_t)agent_private_key_open); free(this); } @@ -62,8 +71,6 @@ plugin_t *agent_plugin_create() }, ); - lib->creds->add_builder(lib->creds, CRED_PRIVATE_KEY, KEY_RSA, FALSE, - (builder_function_t)agent_private_key_open); return &this->public.plugin; } |