aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-11-02 19:24:57 +0100
committerTobias Brunner <tobias@strongswan.org>2011-11-02 20:27:55 +0100
commit58d0a8d49bcf1fce3fb77bd2050c01ae896ad94a (patch)
tree4903a97d35cf828845aaf3fe9d2262e7ca3b5393 /src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
parentfd48b220ed28c486d13e0e4d5166d63096778dbc (diff)
downloadstrongswan-58d0a8d49bcf1fce3fb77bd2050c01ae896ad94a.tar.bz2
strongswan-58d0a8d49bcf1fce3fb77bd2050c01ae896ad94a.tar.xz
pkcs11: Register ECDSA feature.
Diffstat (limited to 'src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c')
-rw-r--r--src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c b/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
index 554e07ff6..fc085e6ae 100644
--- a/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
+++ b/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
@@ -219,6 +219,11 @@ METHOD(plugin_t, get_features, int,
PLUGIN_PROVIDE(DH, ECP_384_BIT),
PLUGIN_PROVIDE(DH, ECP_521_BIT),
};
+ static plugin_feature_t f_ecdsa[] = {
+ /* *_connect is already registered for KEY_ANY */
+ PLUGIN_REGISTER(PUBKEY, pkcs11_public_key_load, TRUE),
+ PLUGIN_PROVIDE(PUBKEY, KEY_ECDSA),
+ };
static plugin_feature_t f_manager[] = {
PLUGIN_CALLBACK((plugin_feature_callback_t)handle_certs, NULL),
PLUGIN_PROVIDE(CUSTOM, "pkcs11-certs"),
@@ -226,7 +231,7 @@ METHOD(plugin_t, get_features, int,
};
static plugin_feature_t f[countof(f_hash) + countof(f_dh) + countof(f_rng) +
countof(f_key) + countof(f_ecdh) +
- countof(f_manager)] = {};
+ countof(f_ecdsa) + countof(f_manager)] = {};
static int count = 0;
if (!count)
@@ -254,6 +259,10 @@ METHOD(plugin_t, get_features, int,
add_features(f, f_ecdh, countof(f_ecdh), &count);
}
}
+ if (use_ecc)
+ {
+ add_features(f, f_ecdsa, countof(f_ecdsa), &count);
+ }
}
*features = f;
return count;