diff options
author | Martin Willi <martin@revosec.ch> | 2010-05-20 08:09:04 +0000 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-05-21 16:25:51 +0200 |
commit | 5728c6aa7eb0ebebaf4214dccecfccef1ac5059f (patch) | |
tree | 11210feeffaaf45401588988d6e28ffd58107aa2 /src/libstrongswan/plugins/openssl/openssl_plugin.c | |
parent | 3e3059ba7c050977c7d792922e363cd23473e227 (diff) | |
download | strongswan-5728c6aa7eb0ebebaf4214dccecfccef1ac5059f.tar.bz2 strongswan-5728c6aa7eb0ebebaf4214dccecfccef1ac5059f.tar.xz |
Implemented X.509 certificate reading using OpenSSL
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/openssl/openssl_plugin.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c index 558eba096..86ef33244 100644 --- a/src/libstrongswan/plugins/openssl/openssl_plugin.c +++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c @@ -34,6 +34,7 @@ #include "openssl_rsa_public_key.h" #include "openssl_ec_private_key.h" #include "openssl_ec_public_key.h" +#include "openssl_x509.h" typedef struct private_openssl_plugin_t private_openssl_plugin_t; @@ -191,6 +192,8 @@ static void destroy(private_openssl_plugin_t *this) (builder_function_t)openssl_ec_private_key_gen); lib->creds->remove_builder(lib->creds, (builder_function_t)openssl_ec_public_key_load); + lib->creds->remove_builder(lib->creds, + (builder_function_t)openssl_x509_load); ENGINE_cleanup(); EVP_cleanup(); @@ -317,6 +320,10 @@ plugin_t *openssl_plugin_create() lib->creds->add_builder(lib->creds, CRED_PUBLIC_KEY, KEY_ECDSA, (builder_function_t)openssl_ec_public_key_load); + /* X509 certificates */ + lib->creds->add_builder(lib->creds, CRED_CERTIFICATE, CERT_X509, + (builder_function_t)openssl_x509_load); + return &this->public.plugin; } |