loading of subjectPublicKeyInfo wrapped keys using KEY_ANY (openssl format)
[strongswan.git] / src / libstrongswan / plugins / gmp / gmp_plugin.c
index ffae669..3cbd2f1 100644 (file)
@@ -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;
 }