#include <utils/backtrace.h>
#include <threading/thread.h>
#include <sa/keymat.h>
+#include <credentials/sets/mem_cred.h>
#include "tkm.h"
#include "tkm_nonceg.h"
#include "tkm_listener.h"
#include "tkm_kernel_ipsec.h"
#include "tkm_public_key.h"
+#include "tkm_private_key.h"
/**
* TKM bus listener for IKE authorize events.
dmn_name = "charon-tkm";
}
+ /* credential set and TKM private key */
+ mem_cred_t *creds;
+ tkm_private_key_t *key;
+
struct sigaction action;
int status = SS_RC_INITIALIZATION_FAILED;
listener = tkm_listener_create();
charon->bus->add_listener(charon->bus, &listener->listener);
+ /* register TKM private key */
+ creds = mem_cred_create();
+ key = tkm_private_key_init();
+ creds->add_key(creds, (private_key_t *)key);
+ lib->credmgr->add_set(lib->credmgr, (credential_set_t*)creds);
+
/* add handler for SEGV and ILL,
* INT and TERM are handled by sigwait() in run() */
action.sa_handler = segv_handler;
status = 0;
charon->bus->remove_listener(charon->bus, &listener->listener);
listener->destroy(listener);
+ creds->destroy(creds);
deinit:
libcharon_deinit();