#### Integrate those with the respective subsystems ####
-# Zone for shortening by gns-proxy,
-# (remove this entry to disable shortening)
-gnunet-identity -e short-zone -s gns-short $options
-
# Default zone for 'gnunet-gns' lookups
gnunet-identity -e master-zone -s gns-master $options
# Get the public keys as strings (so we can create PKEY records)
MASTER=`gnunet-identity -d $options | grep master-zone | awk '{print $3}'`
-SHORT=`gnunet-identity -d $options | grep short-zone | awk '{print $3}'`
PRIVATE=`gnunet-identity -d $options | grep private-zone | awk '{print $3}'`
PIN=DWJASSPE33MRN8T6Q0PENRNBTQY0E6ZYGTRCDP5DGPBF2CRJMJEG
-# Link short and private zones into master zone
+# Link private zone into master zone
if (gnunet-namestore -z master-zone -D -n private -t PKEY | grep "PKEY: $PRIVATE" 1>/dev/null)
then
echo "Private zone link exists, skipping"
else
gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE $options
fi
-if (gnunet-namestore -z master-zone -D -n short -t PKEY | grep "PKEY: $SHORT" 1>/dev/null)
-then
- echo "Shorten zone link exists, skipping"
-else
- gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT $options
-fi
# Link GNUnet's FCFS zone into master zone under label "pin"
if (gnunet-namestore -z master-zone -D -n pin -t PKEY | grep "PKEY: $PIN" 1>/dev/null)
*/
static struct GNUNET_CRYPTO_EcdsaPrivateKey master_pk;
-/**
- * String version of PKEY for short-zone.
- */
-static char *short_zone_pkey;
-
/**
* String version of PKEY for private-zone.
*/
*/
static int found_private_rec = GNUNET_NO;
-/**
- * Set to GNUNET_YES if short record was found;
- */
-static int found_short_rec = GNUNET_NO;
-
/**
* Set to GNUNET_YES if pin record was found;
*/
{
if (0 == strcmp (rname, "private"))
check_pkey (rd_len, rd, private_zone_pkey, &found_private_rec);
- else if (0 == strcmp (rname, "short"))
- check_pkey (rd_len, rd, short_zone_pkey, &found_short_rec);
else if (0 == strcmp (rname, "pin"))
check_pkey (rd_len, rd, pin_zone_pkey, &found_pin_rec);
}
return;
}
}
- if (!found_short_rec)
- {
- if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
- "gnunet-namestore",
- "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", "short", "-p", "-t", "PKEY", "-V", short_zone_pkey, NULL))
- {
- ret = 9;
- return;
- }
- }
if (!found_pin_rec)
{
if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
/**
- * Get master-zone, short-zone and private-zone keys.
+ * Get master-zone and private-zone keys.
*
* This function is initially called for all egos and then again
* whenever a ego's identifier changes or if it is deleted. At the
if (NULL == ego)
{
if (NULL == master_zone_pkey ||
- NULL == short_zone_pkey ||
NULL == private_zone_pkey)
{
ret = 11;
master_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
master_pk = *GNUNET_IDENTITY_ego_get_private_key (ego);
}
- else if (NULL == short_zone_pkey && 0 == strcmp ("short-zone", identifier))
- short_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
else if (NULL == private_zone_pkey && 0 == strcmp ("private-zone", identifier))
private_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
}
{
GNUNET_free_non_null (master_zone_pkey);
master_zone_pkey = NULL;
- GNUNET_free_non_null (short_zone_pkey);
- short_zone_pkey = NULL;
GNUNET_free_non_null (private_zone_pkey);
private_zone_pkey = NULL;
if (NULL != list_it)
"gnunet-identity", "-C", "master-zone", NULL))
return;
- if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
- "gnunet-identity",
- "gnunet-identity", "-C", "short-zone", NULL))
- return;
-
if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
"gnunet-identity",
"gnunet-identity", "-C", "private-zone", NULL))
"gnunet-identity", "-C", "sks-zone", NULL))
return;
- if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
- "gnunet-identity",
- "gnunet-identity", "-e", "short-zone", "-s", "gns-short", NULL))
- return;
-
if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
"gnunet-identity",
"gnunet-identity", "-e", "master-zone", "-s", "gns-master", NULL))