start_resolver_lookup (struct GNS_ResolverHandle *rh)
{
struct AuthorityChain *ac;
- char *x;
char *y;
- char *pkey;
if ( ( (GNUNET_YES == is_canonical (rh->name)) &&
(0 != strcmp (GNUNET_GNS_TLD, rh->name)) ) ||
/* Name ends with ".zkey", try to replace authority zone with zkey
authority */
GNUNET_free (resolver_lookup_get_next_label (rh)); /* will return "zkey" */
- x = resolver_lookup_get_next_label (rh); /* will return 'x' coordinate */
y = resolver_lookup_get_next_label (rh); /* will return 'y' coordinate */
- GNUNET_asprintf (&pkey,
- "%s%s",
- x, y);
- if ( (NULL == x) ||
- (NULL == y) ||
+ if ( (NULL == y) ||
(GNUNET_OK !=
- GNUNET_CRYPTO_ecdsa_public_key_from_string (pkey,
- strlen (pkey),
- &rh->authority_zone)) )
+ GNUNET_CRYPTO_ecdsa_public_key_from_string (y,
+ strlen (y),
+ &rh->authority_zone)) )
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Hostname `%s' is not well-formed, resolution fails\n"),
rh->name);
rh->task_id = GNUNET_SCHEDULER_add_now (&fail_resolution, rh);
}
- GNUNET_free_non_null (x);
GNUNET_free_non_null (y);
- GNUNET_free (pkey);
}
else
{
gnunet-identity -C testego -c test_gns_lookup.conf
gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
-RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.$DELEGATED_PKEY'.zkey' -t A -c test_gns_lookup.conf`
+RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.${DELEGATED_PKEY}.zkey -t A -c test_gns_lookup.conf`
gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
then
exit 0
else
- echo "Failed to resolve to proper IP, got $RES_IP."
+ echo "Failed to resolve to proper IP, got $RES_IP, wanted $TEST_IP."
exit 1
fi