aes \
constraints \
hmac \
+ kernel-netlink \
pem \
pkcs1 \
pkcs8 \
#include <hydra.h>
#include <daemon.h>
-#include <plugins/kernel_netlink/kernel_netlink_net.h>
#include <library.h>
#include <utils/backtrace.h>
#include <threading/thread.h>
PLUGIN_PROVIDE(PUBKEY_VERIFY, SIGN_RSA_EMSA_PKCS1_SHA256),
PLUGIN_CALLBACK(kernel_ipsec_register, tkm_kernel_ipsec_create),
PLUGIN_PROVIDE(CUSTOM, "kernel-ipsec"),
- PLUGIN_DEPENDS(RNG, RNG_WEAK),
- PLUGIN_CALLBACK(kernel_net_register, kernel_netlink_net_create),
- PLUGIN_PROVIDE(CUSTOM, "kernel-net"),
-
};
lib->plugins->add_static_features(lib->plugins, "tkm-backend", features,
countof(features), TRUE);
private_tkm_kernel_ipsec_t *this, host_t *src, host_t *dst,
u_int8_t protocol, u_int32_t reqid, u_int32_t *spi)
{
+ if (!this->rng)
+ {
+ this->rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK);
+ if (!this->rng)
+ {
+ DBG1(DBG_KNL, "unable to create RNG");
+ return FAILED;
+ }
+ }
+
DBG1(DBG_KNL, "getting SPI for reqid {%u}", reqid);
const bool result = this->rng->get_bytes(this->rng, sizeof(u_int32_t),
(u_int8_t *)spi);
.destroy = _destroy,
},
},
- .rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK),
.sad = tkm_kernel_sad_create(),
);
- if (!this->rng)
- {
- DBG1(DBG_KNL, "unable to create RNG");
- destroy(this);
- return NULL;
- }
if (!this->sad)
{
DBG1(DBG_KNL, "unable to create SAD");
#include <library.h>
#include <hydra.h>
#include <daemon.h>
-#include <plugins/kernel_netlink/kernel_netlink_net.h>
#include "tkm.h"
#include "tkm_nonceg.h"
PLUGIN_PROVIDE(DH, MODP_4096_BIT),
PLUGIN_CALLBACK(kernel_ipsec_register, tkm_kernel_ipsec_create),
PLUGIN_PROVIDE(CUSTOM, "kernel-ipsec"),
- PLUGIN_DEPENDS(RNG, RNG_WEAK),
- PLUGIN_CALLBACK(kernel_net_register, kernel_netlink_net_create),
- PLUGIN_PROVIDE(CUSTOM, "kernel-net"),
};
lib->plugins->add_static_features(lib->plugins, "tkm-tests", features,
countof(features), TRUE);