From: Christian Grothoff Date: Mon, 4 Mar 2013 05:52:32 +0000 (+0000) Subject: -if we do not use ephemeral keys, use validity of 'forever' X-Git-Tag: initial-import-from-subversion-38251~9773 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ae7ddcdcc9c48e4e3f56109eeee958f19800446f;p=oweals%2Fgnunet.git -if we do not use ephemeral keys, use validity of 'forever' --- 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;