diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-06-23 14:12:48 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-06-23 14:13:12 +0200 |
commit | 17a49aabbb796839236cde428f82ae69a1665bcb (patch) | |
tree | 53438b5439637fb297fdb7299e2a4cfbab83c3e4 /src/gns/gnunet-gns-import.c | |
parent | a0b43a2805e5abd47783ef225b6c2407cfe9cc32 (diff) | |
download | gnunet-17a49aabbb796839236cde428f82ae69a1665bcb.tar.gz gnunet-17a49aabbb796839236cde428f82ae69a1665bcb.zip |
kill short zone remenants
Diffstat (limited to 'src/gns/gnunet-gns-import.c')
-rw-r--r-- | src/gns/gnunet-gns-import.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c index 49f6e495f..3b9b0a081 100644 --- a/src/gns/gnunet-gns-import.c +++ b/src/gns/gnunet-gns-import.c | |||
@@ -60,11 +60,6 @@ static char *master_zone_pkey; | |||
60 | static struct GNUNET_CRYPTO_EcdsaPrivateKey master_pk; | 60 | static struct GNUNET_CRYPTO_EcdsaPrivateKey master_pk; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * String version of PKEY for short-zone. | ||
64 | */ | ||
65 | static char *short_zone_pkey; | ||
66 | |||
67 | /** | ||
68 | * String version of PKEY for private-zone. | 63 | * String version of PKEY for private-zone. |
69 | */ | 64 | */ |
70 | static char *private_zone_pkey; | 65 | static char *private_zone_pkey; |
@@ -80,11 +75,6 @@ static char *pin_zone_pkey = "72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRK | |||
80 | static int found_private_rec = GNUNET_NO; | 75 | static int found_private_rec = GNUNET_NO; |
81 | 76 | ||
82 | /** | 77 | /** |
83 | * Set to GNUNET_YES if short record was found; | ||
84 | */ | ||
85 | static int found_short_rec = GNUNET_NO; | ||
86 | |||
87 | /** | ||
88 | * Set to GNUNET_YES if pin record was found; | 78 | * Set to GNUNET_YES if pin record was found; |
89 | */ | 79 | */ |
90 | static int found_pin_rec = GNUNET_NO; | 80 | static int found_pin_rec = GNUNET_NO; |
@@ -219,8 +209,6 @@ zone_iterator (void *cls, | |||
219 | { | 209 | { |
220 | if (0 == strcmp (rname, "private")) | 210 | if (0 == strcmp (rname, "private")) |
221 | check_pkey (rd_len, rd, private_zone_pkey, &found_private_rec); | 211 | check_pkey (rd_len, rd, private_zone_pkey, &found_private_rec); |
222 | else if (0 == strcmp (rname, "short")) | ||
223 | check_pkey (rd_len, rd, short_zone_pkey, &found_short_rec); | ||
224 | else if (0 == strcmp (rname, "pin")) | 212 | else if (0 == strcmp (rname, "pin")) |
225 | check_pkey (rd_len, rd, pin_zone_pkey, &found_pin_rec); | 213 | check_pkey (rd_len, rd, pin_zone_pkey, &found_pin_rec); |
226 | } | 214 | } |
@@ -242,16 +230,6 @@ zone_iteration_error (void *cls) | |||
242 | return; | 230 | return; |
243 | } | 231 | } |
244 | } | 232 | } |
245 | if (!found_short_rec) | ||
246 | { | ||
247 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, | ||
248 | "gnunet-namestore", | ||
249 | "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", "short", "-p", "-t", "PKEY", "-V", short_zone_pkey, NULL)) | ||
250 | { | ||
251 | ret = 9; | ||
252 | return; | ||
253 | } | ||
254 | } | ||
255 | if (!found_pin_rec) | 233 | if (!found_pin_rec) |
256 | { | 234 | { |
257 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, | 235 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, |
@@ -274,7 +252,7 @@ zone_iteration_finished (void *cls) | |||
274 | 252 | ||
275 | 253 | ||
276 | /** | 254 | /** |
277 | * Get master-zone, short-zone and private-zone keys. | 255 | * Get master-zone and private-zone keys. |
278 | * | 256 | * |
279 | * This function is initially called for all egos and then again | 257 | * This function is initially called for all egos and then again |
280 | * whenever a ego's identifier changes or if it is deleted. At the | 258 | * whenever a ego's identifier changes or if it is deleted. At the |
@@ -316,7 +294,6 @@ get_ego (void *cls, | |||
316 | if (NULL == ego) | 294 | if (NULL == ego) |
317 | { | 295 | { |
318 | if (NULL == master_zone_pkey || | 296 | if (NULL == master_zone_pkey || |
319 | NULL == short_zone_pkey || | ||
320 | NULL == private_zone_pkey) | 297 | NULL == private_zone_pkey) |
321 | { | 298 | { |
322 | ret = 11; | 299 | ret = 11; |
@@ -340,8 +317,6 @@ get_ego (void *cls, | |||
340 | master_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 317 | master_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); |
341 | master_pk = *GNUNET_IDENTITY_ego_get_private_key (ego); | 318 | master_pk = *GNUNET_IDENTITY_ego_get_private_key (ego); |
342 | } | 319 | } |
343 | else if (NULL == short_zone_pkey && 0 == strcmp ("short-zone", identifier)) | ||
344 | short_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | ||
345 | else if (NULL == private_zone_pkey && 0 == strcmp ("private-zone", identifier)) | 320 | else if (NULL == private_zone_pkey && 0 == strcmp ("private-zone", identifier)) |
346 | private_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 321 | private_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); |
347 | } | 322 | } |
@@ -357,8 +332,6 @@ shutdown_task (void *cls) | |||
357 | { | 332 | { |
358 | GNUNET_free_non_null (master_zone_pkey); | 333 | GNUNET_free_non_null (master_zone_pkey); |
359 | master_zone_pkey = NULL; | 334 | master_zone_pkey = NULL; |
360 | GNUNET_free_non_null (short_zone_pkey); | ||
361 | short_zone_pkey = NULL; | ||
362 | GNUNET_free_non_null (private_zone_pkey); | 335 | GNUNET_free_non_null (private_zone_pkey); |
363 | private_zone_pkey = NULL; | 336 | private_zone_pkey = NULL; |
364 | if (NULL != list_it) | 337 | if (NULL != list_it) |
@@ -411,11 +384,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
411 | 384 | ||
412 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, | 385 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, |
413 | "gnunet-identity", | 386 | "gnunet-identity", |
414 | "gnunet-identity", "-C", "short-zone", NULL)) | ||
415 | return; | ||
416 | |||
417 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, | ||
418 | "gnunet-identity", | ||
419 | "gnunet-identity", "-C", "private-zone", NULL)) | 387 | "gnunet-identity", "-C", "private-zone", NULL)) |
420 | return; | 388 | return; |
421 | 389 | ||
@@ -426,11 +394,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
426 | 394 | ||
427 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, | 395 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, |
428 | "gnunet-identity", | 396 | "gnunet-identity", |
429 | "gnunet-identity", "-e", "short-zone", "-s", "gns-short", NULL)) | ||
430 | return; | ||
431 | |||
432 | if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, | ||
433 | "gnunet-identity", | ||
434 | "gnunet-identity", "-e", "master-zone", "-s", "gns-master", NULL)) | 397 | "gnunet-identity", "-e", "master-zone", "-s", "gns-master", NULL)) |
435 | return; | 398 | return; |
436 | 399 | ||