aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gnsrecord/gnsrecord_crypto.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index a17a64480..8cf8e532f 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -106,11 +106,12 @@ GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
106 rdc[i] = rd[i]; 106 rdc[i] = rd[i];
107 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) 107 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
108 { 108 {
109 struct GNUNET_TIME_Relative t;
110
109 /* encrypted blocks must never have relative expiration times, convert! */ 111 /* encrypted blocks must never have relative expiration times, convert! */
110 rdc[i].flags &= ~GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; 112 rdc[i].flags &= ~GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
111 rdc[i].expiration_time = GNUNET_TIME_absolute_add (now, 113 t.rel_value_us = rdc[i].expiration_time;
112 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS, 114 rdc[i].expiration_time = GNUNET_TIME_absolute_add (now, t).abs_value_us;
113 rdc[i].expiration_time)).abs_value_us;
114 } 115 }
115 } 116 }
116 /* serialize */ 117 /* serialize */