charon.crypto_test.rng_true = no
Whether to test RNG with TRUE quality; requires a lot of entropy.
+charon.delete_rekeyed = no
+ Delete CHILD_SAs right after they got successfully rekeyed (IKEv1 only).
+
+ Delete CHILD_SAs right after they got successfully rekeyed (IKEv1 only).
+ Reduces the number of stale CHILD_SAs in scenarios with a lot of rekeyings.
+ However, this might cause problems with implementations that continue to
+ use rekeyed SAs until they expire.
+
charon.dh_exponent_ansi_x9_42 = yes
Use ANSI X9.42 DH exponent size or optimum size matched to cryptographic
strength.
*/
u_int32_t rekey;
+ /**
+ * Delete old child after successful rekey
+ */
+ bool delete;
+
/**
* Negotiated mode, tunnel or transport
*/
if (old)
{
charon->bus->child_rekey(charon->bus, old, this->child_sa);
- /* rekeyed CHILD_SAs stay installed until they expire */
+ /* rekeyed CHILD_SAs stay installed until they expire or are deleted
+ * by the other peer */
old->set_state(old, CHILD_REKEYED);
+ /* as initiator we delete the CHILD_SA if configured to do so */
+ if (this->initiator && this->delete)
+ {
+ this->ike_sa->queue_task(this->ike_sa,
+ (task_t*)quick_delete_create(this->ike_sa,
+ this->proposal->get_protocol(this->proposal),
+ this->rekey, TRUE, FALSE));
+ }
}
else
{
.tsi = tsi ? tsi->clone(tsi) : NULL,
.tsr = tsr ? tsr->clone(tsr) : NULL,
.proto = PROTO_ESP,
+ .delete = lib->settings->get_bool(lib->settings,
+ "%s.delete_rekeyed", FALSE, lib->ns),
);
if (config)