aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/openssl/openssl_plugin.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2008-05-15 12:41:06 +0000
committerTobias Brunner <tobias@strongswan.org>2008-05-15 12:41:06 +0000
commit84770ded1e4f42ea5a85cfcfba6e60900d4141ae (patch)
treea1ad0080d38e08a3421010fa8909d19ac2acaf3b /src/libstrongswan/plugins/openssl/openssl_plugin.c
parent144274ab20bfef250c155d38e621b94e83c574b0 (diff)
downloadstrongswan-84770ded1e4f42ea5a85cfcfba6e60900d4141ae.tar.bz2
strongswan-84770ded1e4f42ea5a85cfcfba6e60900d4141ae.tar.xz
RSA with OpenSSL
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_plugin.c')
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_plugin.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c
index 8b77f091f..c888c2f90 100644
--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
+++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
@@ -23,6 +23,8 @@
#include "openssl_crypter.h"
#include "openssl_hasher.h"
#include "openssl_diffie_hellman.h"
+#include "openssl_rsa_private_key.h"
+#include "openssl_rsa_public_key.h"
typedef struct private_openssl_plugin_t private_openssl_plugin_t;
@@ -48,6 +50,10 @@ static void destroy(private_openssl_plugin_t *this)
(hasher_constructor_t)openssl_hasher_create);
lib->crypto->remove_dh(lib->crypto,
(dh_constructor_t)openssl_diffie_hellman_create);
+ lib->creds->remove_builder(lib->creds,
+ (builder_constructor_t)openssl_rsa_private_key_builder);
+ lib->creds->remove_builder(lib->creds,
+ (builder_constructor_t)openssl_rsa_public_key_builder);
EVP_cleanup();
@@ -115,5 +121,11 @@ plugin_t *plugin_create()
lib->crypto->add_dh(lib->crypto, MODP_8192_BIT,
(dh_constructor_t)openssl_diffie_hellman_create);
+ /* rsa */
+ lib->creds->add_builder(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
+ (builder_constructor_t)openssl_rsa_private_key_builder);
+ lib->creds->add_builder(lib->creds, CRED_PUBLIC_KEY, KEY_RSA,
+ (builder_constructor_t)openssl_rsa_public_key_builder);
+
return &this->public.plugin;
}