aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-04 05:52:32 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-04 05:52:32 +0000
commitae7ddcdcc9c48e4e3f56109eeee958f19800446f (patch)
tree27d5f52228a33d6b40076eaeb01a85d7096f57a9 /src/core
parente914d958b8e1a904b6ddb22b23b8bac3a7ebc4fa (diff)
downloadgnunet-ae7ddcdcc9c48e4e3f56109eeee958f19800446f.tar.gz
gnunet-ae7ddcdcc9c48e4e3f56109eeee958f19800446f.zip
-if we do not use ephemeral keys, use validity of 'forever'
Diffstat (limited to 'src/core')
-rw-r--r--src/core/gnunet-service-core_kx.c14
1 files 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 ()
1495 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) + 1495 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) +
1496 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)); 1496 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded));
1497 current_ekm.creation_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 1497 current_ekm.creation_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
1498 current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_add (REKEY_FREQUENCY, 1498 if (GNUNET_YES ==
1499 REKEY_TOLERANCE))); 1499 GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg,
1500 "core",
1501 "USE_EPHEMERAL_KEYS"))
1502 {
1503 current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_add (REKEY_FREQUENCY,
1504 REKEY_TOLERANCE)));
1505 }
1506 else
1507 {
1508 current_ekm.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS);
1509 }
1500 GNUNET_CRYPTO_ecc_key_get_public (my_ephemeral_key, 1510 GNUNET_CRYPTO_ecc_key_get_public (my_ephemeral_key,
1501 &current_ekm.ephemeral_key); 1511 &current_ekm.ephemeral_key);
1502 current_ekm.origin_public_key = my_public_key; 1512 current_ekm.origin_public_key = my_public_key;