From 19d73a8facd4534c2ad2ab37bbdf047e715af2d5 Mon Sep 17 00:00:00 2001 From: Alessio Vanni Date: Fri, 20 Mar 2020 15:35:54 +0100 Subject: [PATCH] Make gnunet-namestore honour expiration dates when importing an URI --- src/namestore/gnunet-namestore.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 4c8fd5ce8..25dfda59b 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c @@ -1193,6 +1193,23 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg) ret = 1; return; } + if (NULL == expirationstring) + { + fprintf (stderr, + _ ("Missing option `%s' for operation `%s'\n"), + "-e", + _ ("add")); + GNUNET_SCHEDULER_shutdown (); + ret = 1; + return; + } + if (GNUNET_OK != parse_expiration (expirationstring, &etime_is_rel, &etime)) + { + fprintf (stderr, _ ("Invalid time format `%s'\n"), expirationstring); + GNUNET_SCHEDULER_shutdown (); + ret = 1; + return; + } memset (&rd, 0, sizeof(rd)); rd.data = &pkey; rd.data_size = sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey); -- 2.25.1