loading of subjectPublicKeyInfo wrapped keys using KEY_ANY (openssl format)

testcase
This commit is contained in:
Martin Willi
2008-04-01 14:51:31 +00:00
parent d5a9e6ff3a
commit 9d1c384b4b
5 changed files with 53 additions and 3 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ plugin_LTLIBRARIES = libstrongswan-gmp.la
libstrongswan_gmp_la_SOURCES = gmp_plugin.h gmp_plugin.c \
gmp_diffie_hellman.c gmp_diffie_hellman.h \
gmp_rsa_private_key.c gmp_rsa_private_key.h \
gmp_rsa_public_key.c gmp_rsa_public_key.h
gmp_rsa_public_key.c gmp_rsa_public_key.h \
gmp_public_key.c gmp_public_key.h
libstrongswan_gmp_la_LDFLAGS = -module
libstrongswan_gmp_la_LIBADD = -lgmp
@@ -19,6 +19,7 @@
#include <library.h>
#include "gmp_diffie_hellman.h"
#include "gmp_public_key.h"
#include "gmp_rsa_private_key.h"
#include "gmp_rsa_public_key.h"
@@ -46,6 +47,8 @@ static void destroy(private_gmp_plugin_t *this)
(builder_constructor_t)gmp_rsa_private_key_builder);
lib->creds->remove_builder(lib->creds,
(builder_constructor_t)gmp_rsa_public_key_builder);
lib->creds->remove_builder(lib->creds,
(builder_constructor_t)gmp_public_key_builder);
free(this);
}
@@ -79,6 +82,8 @@ plugin_t *plugin_create()
(builder_constructor_t)gmp_rsa_private_key_builder);
lib->creds->add_builder(lib->creds, CRED_PUBLIC_KEY, KEY_RSA,
(builder_constructor_t)gmp_rsa_public_key_builder);
lib->creds->add_builder(lib->creds, CRED_PUBLIC_KEY, KEY_ANY,
(builder_constructor_t)gmp_public_key_builder);
return &this->public.plugin;
}
@@ -12,6 +12,8 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* $Id$
*/
/**