charon-tkm: Register tkm nonce generator
[strongswan.git] / src / charon-tkm / src / charon-tkm.c
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))
        {