[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30544 - gnunet/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30544 - gnunet/src/gns |
Date: |
Tue, 5 Nov 2013 21:52:02 +0100 |
Author: grothoff
Date: 2013-11-05 21:52:02 +0100 (Tue, 05 Nov 2013)
New Revision: 30544
Modified:
gnunet/src/gns/gnunet-service-gns_resolver.c
gnunet/src/gns/test_gns_zkey_lookup.sh
Log:
-fixing zkey resolution
Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c 2013-11-05 20:50:28 UTC
(rev 30543)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c 2013-11-05 20:52:02 UTC
(rev 30544)
@@ -1999,9 +1999,7 @@
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)) ) ||
@@ -2038,26 +2036,19 @@
/* 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
{
Modified: gnunet/src/gns/test_gns_zkey_lookup.sh
===================================================================
--- gnunet/src/gns/test_gns_zkey_lookup.sh 2013-11-05 20:50:28 UTC (rev
30543)
+++ gnunet/src/gns/test_gns_zkey_lookup.sh 2013-11-05 20:52:02 UTC (rev
30544)
@@ -10,7 +10,7 @@
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
@@ -19,6 +19,6 @@
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30544 - gnunet/src/gns,
gnunet <=