From ae7ddcdcc9c48e4e3f56109eeee958f19800446f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Mar 2013 05:52:32 +0000 Subject: [PATCH] -if we do not use ephemeral keys, use validity of 'forever' --- src/core/gnunet-service-core_kx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index ac3da79f6..29687c466 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c @@ -1495,8 +1495,18 @@ sign_ephemeral_key () sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) + sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)); current_ekm.creation_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); - current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_add (REKEY_FREQUENCY, - REKEY_TOLERANCE))); + if (GNUNET_YES == + GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg, + "core", + "USE_EPHEMERAL_KEYS")) + { + current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_add (REKEY_FREQUENCY, + REKEY_TOLERANCE))); + } + else + { + current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS); + } GNUNET_CRYPTO_ecc_key_get_public (my_ephemeral_key, ¤t_ekm.ephemeral_key); current_ekm.origin_public_key = my_public_key; -- 2.25.1