Changed plugin constructors from plugin_create to plugin_name_plugin_create.
authorTobias Brunner <tobias@strongswan.org>
Tue, 23 Feb 2010 15:20:38 +0000 (16:20 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 2 Mar 2010 08:10:26 +0000 (09:10 +0100)
61 files changed:
src/charon/plugins/android/android_plugin.c
src/charon/plugins/attr/attr_plugin.c
src/charon/plugins/eap_aka/eap_aka_plugin.c
src/charon/plugins/eap_aka_3gpp2/eap_aka_3gpp2_plugin.c
src/charon/plugins/eap_gtc/eap_gtc_plugin.c
src/charon/plugins/eap_identity/eap_identity_plugin.c
src/charon/plugins/eap_md5/eap_md5_plugin.c
src/charon/plugins/eap_mschapv2/eap_mschapv2_plugin.c
src/charon/plugins/eap_radius/eap_radius_plugin.c
src/charon/plugins/eap_sim/eap_sim_plugin.c
src/charon/plugins/eap_sim_file/eap_sim_file_plugin.c
src/charon/plugins/eap_simaka_pseudonym/eap_simaka_pseudonym_plugin.c
src/charon/plugins/eap_simaka_reauth/eap_simaka_reauth_plugin.c
src/charon/plugins/kernel_klips/kernel_klips_plugin.c
src/charon/plugins/kernel_netlink/kernel_netlink_plugin.c
src/charon/plugins/kernel_pfkey/kernel_pfkey_plugin.c
src/charon/plugins/kernel_pfroute/kernel_pfroute_plugin.c
src/charon/plugins/load_tester/load_tester_plugin.c
src/charon/plugins/medcli/medcli_plugin.c
src/charon/plugins/medsrv/medsrv_plugin.c
src/charon/plugins/nm/nm_plugin.c
src/charon/plugins/resolve/resolve_plugin.c
src/charon/plugins/smp/smp.c
src/charon/plugins/socket_default/socket_default_plugin.c
src/charon/plugins/socket_dynamic/socket_dynamic_plugin.c
src/charon/plugins/socket_raw/socket_raw_plugin.c
src/charon/plugins/sql/sql_plugin.c
src/charon/plugins/stroke/stroke_plugin.c
src/charon/plugins/uci/uci_plugin.c
src/charon/plugins/unit_tester/unit_tester.c
src/charon/plugins/updown/updown_plugin.c
src/libstrongswan/plugins/aes/aes_plugin.c
src/libstrongswan/plugins/agent/agent_plugin.c
src/libstrongswan/plugins/attr_sql/attr_sql_plugin.c
src/libstrongswan/plugins/blowfish/blowfish_plugin.c
src/libstrongswan/plugins/curl/curl_plugin.c
src/libstrongswan/plugins/des/des_plugin.c
src/libstrongswan/plugins/dnskey/dnskey_plugin.c
src/libstrongswan/plugins/fips_prf/fips_prf_plugin.c
src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
src/libstrongswan/plugins/gmp/gmp_plugin.c
src/libstrongswan/plugins/hmac/hmac_plugin.c
src/libstrongswan/plugins/ldap/ldap_plugin.c
src/libstrongswan/plugins/md4/md4_plugin.c
src/libstrongswan/plugins/md5/md5_plugin.c
src/libstrongswan/plugins/mysql/mysql_plugin.c
src/libstrongswan/plugins/openssl/openssl_plugin.c
src/libstrongswan/plugins/padlock/padlock_plugin.c
src/libstrongswan/plugins/pem/pem_plugin.c
src/libstrongswan/plugins/pgp/pgp_plugin.c
src/libstrongswan/plugins/pkcs1/pkcs1_plugin.c
src/libstrongswan/plugins/plugin.h
src/libstrongswan/plugins/plugin_loader.c
src/libstrongswan/plugins/pubkey/pubkey_plugin.c
src/libstrongswan/plugins/random/random_plugin.c
src/libstrongswan/plugins/sha1/sha1_plugin.c
src/libstrongswan/plugins/sha2/sha2_plugin.c
src/libstrongswan/plugins/sqlite/sqlite_plugin.c
src/libstrongswan/plugins/test_vectors/test_vectors_plugin.c
src/libstrongswan/plugins/x509/x509_plugin.c
src/libstrongswan/plugins/xcbc/xcbc_plugin.c

index ea36ac4..f21066a 100644 (file)
@@ -48,7 +48,7 @@ METHOD(plugin_t, destroy, void,
 /**
  * See header
  */
-plugin_t *plugin_create()
+plugin_t *android_plugin_create()
 {
        private_android_plugin_t *this;
 
index 6dfb102..9325fc1 100644 (file)
@@ -49,7 +49,7 @@ static void destroy(private_attr_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *attr_plugin_create()
 {
        private_attr_plugin_t *this = malloc_thing(private_attr_plugin_t);
 
index c44a089..f928339 100644 (file)
@@ -35,7 +35,7 @@ static void destroy(eap_aka_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *eap_aka_plugin_create()
 {
        eap_aka_plugin_t *this = malloc_thing(eap_aka_plugin_t);
 
index 5286e09..626e833 100644 (file)
@@ -64,7 +64,7 @@ static void destroy(private_eap_aka_3gpp2_t *this)
 /**
  * See header
  */
-plugin_t *plugin_create()
+plugin_t *eap_aka_3gpp2_plugin_create()
 {
        private_eap_aka_3gpp2_t *this = malloc_thing(private_eap_aka_3gpp2_t);
 
index 8550c25..91ba84b 100644 (file)
@@ -37,7 +37,7 @@ static void destroy(eap_gtc_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *eap_gtc_plugin_create()
 {
        eap_gtc_plugin_t *this = malloc_thing(eap_gtc_plugin_t);
 
index a623e19..0829971 100644 (file)
@@ -34,7 +34,7 @@ static void destroy(eap_identity_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *eap_identity_plugin_create()
 {
        eap_identity_plugin_t *this = malloc_thing(eap_identity_plugin_t);
 
index 629255e..e716dc6 100644 (file)
@@ -34,7 +34,7 @@ static void destroy(eap_md5_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *eap_md5_plugin_create()
 {
        eap_md5_plugin_t *this = malloc_thing(eap_md5_plugin_t);
 
index 404cecb..a7b41dd 100644 (file)
@@ -34,7 +34,7 @@ static void destroy(eap_mschapv2_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *eap_mschapv2_plugin_create()
 {
        eap_mschapv2_plugin_t *this = malloc_thing(eap_mschapv2_plugin_t);
 
index 51e6a69..7d2788c 100644 (file)
@@ -33,7 +33,7 @@ static void destroy(eap_radius_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *eap_radius_plugin_create()
 {
        eap_radius_plugin_t *this;
 
index 1d2b9cf..f0c9722 100644 (file)
@@ -35,7 +35,7 @@ static void destroy(eap_sim_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *eap_sim_plugin_create()
 {
        eap_sim_plugin_t *this = malloc_thing(eap_sim_plugin_t);
 
index 22ad317..4f25c35 100644 (file)
@@ -19,7 +19,7 @@
 #include "eap_sim_file_triplets.h"
 
 #include <daemon.h>
-\r
+
 #define TRIPLET_FILE IPSEC_CONFDIR "/ipsec.d/triplets.dat"
 
 typedef struct private_eap_sim_file_t private_eap_sim_file_t;
@@ -66,7 +66,7 @@ static void destroy(private_eap_sim_file_t *this)
 /**
  * See header
  */
-plugin_t *plugin_create()
+plugin_t *eap_sim_file_plugin_create()
 {
        private_eap_sim_file_t *this = malloc_thing(private_eap_sim_file_t);
 
index e4e179a..81b9d7b 100644 (file)
@@ -57,7 +57,7 @@ static void destroy(private_eap_simaka_pseudonym_t *this)
 /**
  * See header
  */
-plugin_t *plugin_create()
+plugin_t *eap_simaka_pseudonym_plugin_create()
 {
        private_eap_simaka_pseudonym_t *this;
 
index b2e853e..987a0e1 100644 (file)
@@ -57,7 +57,7 @@ static void destroy(private_eap_simaka_reauth_t *this)
 /**
  * See header
  */
-plugin_t *plugin_create()
+plugin_t *eap_simaka_reauth_plugin_create()
 {
        private_eap_simaka_reauth_t *this = malloc_thing(private_eap_simaka_reauth_t);
 
index b0117c1..fa5e9eb 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_kernel_klips_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *kernel_klips_plugin_create()
 {
        private_kernel_klips_plugin_t *this = malloc_thing(private_kernel_klips_plugin_t);
 
index cdf20f1..4c61265 100644 (file)
@@ -46,7 +46,7 @@ static void destroy(private_kernel_netlink_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *kernel_netlink_plugin_create()
 {
        private_kernel_netlink_plugin_t *this = malloc_thing(private_kernel_netlink_plugin_t);
 
index 3380c32..b84ccf1 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_kernel_pfkey_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *kernel_pfkey_plugin_create()
 {
        private_kernel_pfkey_plugin_t *this = malloc_thing(private_kernel_pfkey_plugin_t);
 
index e73cbea..97139fb 100644 (file)
@@ -45,7 +45,7 @@ static void destroy(private_kernel_pfroute_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *kernel_pfroute_plugin_create()
 {
        private_kernel_pfroute_plugin_t *this = malloc_thing(private_kernel_pfroute_plugin_t);
 
index e25f974..46145b8 100644 (file)
@@ -173,7 +173,7 @@ static void destroy(private_load_tester_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *load_tester_plugin_create()
 {
        private_load_tester_plugin_t *this;
        u_int i, shutdown_on = 0;
index 148eded..397168d 100644 (file)
@@ -72,7 +72,7 @@ static void destroy(private_medcli_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *medcli_plugin_create()
 {
        char *uri;
        private_medcli_plugin_t *this = malloc_thing(private_medcli_plugin_t);
index 7c533f1..262d26d 100644 (file)
@@ -64,7 +64,7 @@ static void destroy(private_medsrv_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *medsrv_plugin_create()
 {
        char *uri;
        private_medsrv_plugin_t *this = malloc_thing(private_medsrv_plugin_t);
index daf2cc6..f2abcaf 100644 (file)
@@ -93,7 +93,7 @@ static void destroy(private_nm_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *nm_plugin_create()
 {
        private_nm_plugin_t *this = malloc_thing(private_nm_plugin_t);
 
index c564981..4bc9a2b 100644 (file)
@@ -49,7 +49,7 @@ static void destroy(private_resolve_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *resolve_plugin_create()
 {
        private_resolve_plugin_t *this = malloc_thing(private_resolve_plugin_t);
 
index 21e682a..64820eb 100644 (file)
@@ -720,7 +720,7 @@ static void destroy(private_smp_t *this)
 /*
  * Described in header file
  */
-plugin_t *plugin_create()
+plugin_t *smp_plugin_create()
 {
        struct sockaddr_un unix_addr = { AF_UNIX, IPSEC_PIDDIR "/charon.xml"};
        private_smp_t *this = malloc_thing(private_smp_t);
index 4f455b4..45390dd 100644 (file)
@@ -48,7 +48,7 @@ METHOD(plugin_t, destroy, void,
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *socket_default_plugin_create()
 {
        private_socket_default_plugin_t *this;
 
index 50955dc..3410fc7 100644 (file)
@@ -48,7 +48,7 @@ METHOD(plugin_t, destroy, void,
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *socket_dynamic_plugin_create()
 {
        private_socket_dynamic_plugin_t *this;
 
index 76eb71f..5b011ab 100644 (file)
@@ -48,7 +48,7 @@ METHOD(plugin_t, destroy, void,
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *socket_raw_plugin_create()
 {
        private_socket_raw_plugin_t *this;
 
index e2e410a..e2d2d63 100644 (file)
@@ -71,7 +71,7 @@ static void destroy(private_sql_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *sql_plugin_create()
 {
        char *uri;
        private_sql_plugin_t *this;
index 61ae109..4361e50 100644 (file)
@@ -48,7 +48,7 @@ static void destroy(private_stroke_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *stroke_plugin_create()
 {
        private_stroke_plugin_t *this = malloc_thing(private_stroke_plugin_t);
 
index 2a79b91..742fcf4 100644 (file)
@@ -75,7 +75,7 @@ static void destroy(private_uci_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *uci_plugin_create()
 {
        private_uci_plugin_t *this = malloc_thing(private_uci_plugin_t);
 
index 3c39688..5f6f94e 100644 (file)
@@ -103,7 +103,7 @@ static void destroy(private_unit_tester_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *unit_tester_plugin_create()
 {
        private_unit_tester_t *this = malloc_thing(private_unit_tester_t);
 
index 6cb0efd..9d0591e 100644 (file)
@@ -49,7 +49,7 @@ static void destroy(private_updown_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *updown_plugin_create()
 {
        private_updown_plugin_t *this = malloc_thing(private_updown_plugin_t);
 
index c6215cc..1e920f8 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_aes_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *aes_plugin_create()
 {
        private_aes_plugin_t *this = malloc_thing(private_aes_plugin_t);
 
index 299b2cc..d40b437 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_agent_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *agent_plugin_create()
 {
        private_agent_plugin_t *this = malloc_thing(private_agent_plugin_t);
 
index 66b309c..5d3d737 100644 (file)
@@ -57,7 +57,7 @@ static void destroy(private_attr_sql_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *attr_sql_plugin_create()
 {
        char *uri;
        private_attr_sql_plugin_t *this;
index 993dc8b..f9fb605 100644 (file)
@@ -45,7 +45,7 @@ static void destroy(private_blowfish_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *blowfish_plugin_create()
 {
        private_blowfish_plugin_t *this = malloc_thing(private_blowfish_plugin_t);
 
index 13dfa05..b08d54c 100644 (file)
@@ -48,7 +48,7 @@ static void destroy(private_curl_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *curl_plugin_create()
 {
        CURLcode res;
        private_curl_plugin_t *this = malloc_thing(private_curl_plugin_t);
index 649d224..afc82e8 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_des_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *des_plugin_create()
 {
        private_des_plugin_t *this = malloc_thing(private_des_plugin_t);
 
index 83dbe31..125047b 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_dnskey_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *dnskey_plugin_create()
 {
        private_dnskey_plugin_t *this = malloc_thing(private_dnskey_plugin_t);
 
index 6c0842f..f412656 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_fips_prf_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *fips_prf_plugin_create()
 {
        private_fips_prf_plugin_t *this = malloc_thing(private_fips_prf_plugin_t);
 
index 8c9ea89..c87f3b8 100644 (file)
@@ -118,7 +118,7 @@ static void destroy(private_gcrypt_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *gcrypt_plugin_create()
 {
        private_gcrypt_plugin_t *this;
 
index b70ff88..ca50514 100644 (file)
@@ -52,7 +52,7 @@ static void destroy(private_gmp_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *gmp_plugin_create()
 {
        private_gmp_plugin_t *this = malloc_thing(private_gmp_plugin_t);
 
index 94332ee..e6b9f7a 100644 (file)
@@ -47,7 +47,7 @@ static void destroy(private_hmac_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *hmac_plugin_create()
 {
        private_hmac_plugin_t *this = malloc_thing(private_hmac_plugin_t);
 
index a31308b..372ac9f 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_ldap_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *ldap_plugin_create()
 {
        private_ldap_plugin_t *this = malloc_thing(private_ldap_plugin_t);
 
index ba4041d..38ae0d4 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_md4_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *md4_plugin_create()
 {
        private_md4_plugin_t *this = malloc_thing(private_md4_plugin_t);
 
index 7592c20..cfbf6ac 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_md5_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *md5_plugin_create()
 {
        private_md5_plugin_t *this = malloc_thing(private_md5_plugin_t);
 
index 0e64bbc..44f952c 100644 (file)
@@ -46,7 +46,7 @@ static void destroy(private_mysql_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *mysql_plugin_create()
 {
        private_mysql_plugin_t *this;
 
index 548a76b..941b643 100644 (file)
@@ -201,7 +201,7 @@ static void destroy(private_openssl_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *openssl_plugin_create()
 {
        private_openssl_plugin_t *this = malloc_thing(private_openssl_plugin_t);
 
index 32b18ec..2225318 100644 (file)
@@ -131,7 +131,7 @@ static void destroy(private_padlock_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *padlock_plugin_create()
 {
        private_padlock_plugin_t *this = malloc_thing(private_padlock_plugin_t);
 
index 5a5149c..b769872 100644 (file)
@@ -48,7 +48,7 @@ static void destroy(private_pem_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *pem_plugin_create()
 {
        private_pem_plugin_t *this = malloc_thing(private_pem_plugin_t);
 
index eabb369..3ed1faf 100644 (file)
@@ -54,7 +54,7 @@ static void destroy(private_pgp_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *pgp_plugin_create()
 {
        private_pgp_plugin_t *this = malloc_thing(private_pgp_plugin_t);
 
index 9d71e13..35ec2d2 100644 (file)
@@ -50,7 +50,7 @@ static void destroy(private_pkcs1_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *pkcs1_plugin_create()
 {
        private_pkcs1_plugin_t *this = malloc_thing(private_pkcs1_plugin_t);
 
index 28c800c..6d8a370 100644 (file)
@@ -38,9 +38,9 @@ struct plugin_t {
 /**
  * Plugin constructor function definiton.
  *
- * Each plugin has a constructor functions. This function is called on daemon
+ * Each plugin has a constructor function. This function is called on daemon
  * startup to initialize each plugin.
- * The plugin function is named plugin_create().
+ * The plugin function is named plugin_name_plugin_create().
  *
  * @return                             plugin_t instance
  */
index d4513f2..fb970b4 100644 (file)
@@ -1,4 +1,5 @@
 /*
+ * Copyright (C) 2010 Tobias Brunner
  * Copyright (C) 2007 Martin Willi
  * Hochschule fuer Technik Rapperswil
  *
@@ -50,18 +51,42 @@ struct private_plugin_loader_t {
 };
 
 /**
+ * Replace '-' with '_' to use str as identifier.
+ */
+static char* sanitize(char *str)
+{
+       char *pos = str;
+       while (pos && *pos)
+       {
+               if (*pos == '-')
+               {
+                       *pos = '_';
+               }
+               pos++;
+       }
+       return str;
+}
+
+/**
  * load a single plugin
  */
 static plugin_t* load_plugin(private_plugin_loader_t *this,
                                                         char *path, char *name)
 {
+       char create[128];
        char file[PATH_MAX];
        void *handle;
        plugin_t *plugin;
        plugin_constructor_t constructor;
 
-       snprintf(file, sizeof(file), "%s/libstrongswan-%s.so", path, name);
-
+       if (snprintf(file, sizeof(file), "%s/libstrongswan-%s.so", path,
+                                name) >= sizeof(file) ||
+               snprintf(create, sizeof(create), "%s_plugin_create",
+                                name) >= sizeof(create))
+       {
+               return NULL;
+       }
+       sanitize(create);
        if (lib->integrity)
        {
                if (!lib->integrity->check_file(lib->integrity, name, file))
@@ -76,10 +101,10 @@ static plugin_t* load_plugin(private_plugin_loader_t *this,
                DBG1("plugin '%s': failed to load '%s' - %s", name, file, dlerror());
                return NULL;
        }
-       constructor = dlsym(handle, "plugin_create");
+       constructor = dlsym(handle, create);
        if (constructor == NULL)
        {
-               DBG1("plugin '%s': failed to load - no plugin_create() function", name);
+               DBG1("plugin '%s': failed to load - %s not found", name, create);
                dlclose(handle);
                return NULL;
        }
@@ -96,7 +121,7 @@ static plugin_t* load_plugin(private_plugin_loader_t *this,
        plugin = constructor();
        if (plugin == NULL)
        {
-               DBG1("plugin '%s': failed to load - plugin_create() returned NULL", name);
+               DBG1("plugin '%s': failed to load - %s returned NULL", name, create);
                dlclose(handle);
                return NULL;
        }
index ad84eed..b0eabc9 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_pubkey_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *pubkey_plugin_create()
 {
        private_pubkey_plugin_t *this = malloc_thing(private_pubkey_plugin_t);
 
index df0a8f5..39678ba 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_random_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *random_plugin_create()
 {
        private_random_plugin_t *this = malloc_thing(private_random_plugin_t);
 
index a038228..7b9cf87 100644 (file)
@@ -47,7 +47,7 @@ static void destroy(private_sha1_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *sha1_plugin_create()
 {
        private_sha1_plugin_t *this = malloc_thing(private_sha1_plugin_t);
 
index 90f7cec..810d992 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_sha2_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *sha2_plugin_create()
 {
        private_sha2_plugin_t *this = malloc_thing(private_sha2_plugin_t);
 
index 955402b..332d823 100644 (file)
@@ -44,7 +44,7 @@ static void destroy(private_sqlite_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *sqlite_plugin_create()
 {
        private_sqlite_plugin_t *this = malloc_thing(private_sqlite_plugin_t);
 
index 7ad8c3c..234d237 100644 (file)
@@ -104,7 +104,7 @@ static void destroy(private_test_vectors_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *test_vectors_plugin_create()
 {
        private_test_vectors_plugin_t *this = malloc_thing(private_test_vectors_plugin_t);
        int i;
index 94c49b1..e71c55e 100644 (file)
@@ -65,7 +65,7 @@ static void destroy(private_x509_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *x509_plugin_create()
 {
        private_x509_plugin_t *this = malloc_thing(private_x509_plugin_t);
 
index 3eb7f09..9d903bf 100644 (file)
@@ -47,7 +47,7 @@ static void destroy(private_xcbc_plugin_t *this)
 /*
  * see header file
  */
-plugin_t *plugin_create()
+plugin_t *xcbc_plugin_create()
 {
        private_xcbc_plugin_t *this = malloc_thing(private_xcbc_plugin_t);