charon-tkm: Register tkm nonce generator
authorReto Buerki <reet@codelabs.ch>
Tue, 12 Jun 2012 12:39:33 +0000 (14:39 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 19 Mar 2013 14:23:45 +0000 (15:23 +0100)
src/charon-tkm/Makefile.am
src/charon-tkm/src/charon-tkm.c

index 44586dc..94216ca 100644 (file)
@@ -27,7 +27,6 @@ PLUGINS = \
        gmp \
        hmac \
        kernel-netlink \
-       nonce \
        pem \
        pkcs1 \
        pkcs8 \
index 3e52fa4..c9c27ba 100644 (file)
@@ -33,6 +33,7 @@
 #include <threading/thread.h>
 
 #include "tkm.h"
+#include "tkm_nonceg.h"
 
 /**
  * PID file, in which charon-tkm stores its process id
@@ -267,6 +268,14 @@ int main(int argc, char *argv[])
 
        DBG1(DBG_DMN, "Starting charon with TKM backend (strongSwan "VERSION")");
 
+       /* register TKM specific plugins */
+       static plugin_feature_t features[] = {
+               PLUGIN_REGISTER(NONCE_GEN, tkm_nonceg_create),
+               PLUGIN_PROVIDE(NONCE_GEN)
+       };
+       lib->plugins->add_static_features(lib->plugins, "tkm-backend", features,
+                       countof(features), TRUE);
+
        /* initialize daemon */
        if (!charon->initialize(charon, PLUGINS))
        {