diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-13 20:48:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-13 20:48:40 +0000 |
commit | 552f62d37e09178773edab8139d5dc01990a5302 (patch) | |
tree | a8f19c2ee6a58b3ebff388da2379e197eb0de033 /src | |
parent | db86f1902be1867324f773bf20f37a4c4108aa65 (diff) | |
download | gnunet-552f62d37e09178773edab8139d5dc01990a5302.tar.gz gnunet-552f62d37e09178773edab8139d5dc01990a5302.zip |
-fix FTBFS
Diffstat (limited to 'src')
-rw-r--r-- | src/pt/Makefile.am | 1 | ||||
-rw-r--r-- | src/pt/test_gns_vpn.c | 19 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/pt/Makefile.am b/src/pt/Makefile.am index 76d5d8c80..2bec16329 100644 --- a/src/pt/Makefile.am +++ b/src/pt/Makefile.am | |||
@@ -70,6 +70,7 @@ test_gns_vpn_SOURCES = \ | |||
70 | test_gns_vpn.c | 70 | test_gns_vpn.c |
71 | test_gns_vpn_LDADD = -lmicrohttpd @LIBGNURL@ \ | 71 | test_gns_vpn_LDADD = -lmicrohttpd @LIBGNURL@ \ |
72 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | 72 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ |
73 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
73 | $(top_builddir)/src/testing/libgnunettesting.la \ | 74 | $(top_builddir)/src/testing/libgnunettesting.la \ |
74 | $(top_builddir)/src/util/libgnunetutil.la | 75 | $(top_builddir)/src/util/libgnunetutil.la |
75 | test_gns_vpn_CPPFLAGS = \ | 76 | test_gns_vpn_CPPFLAGS = \ |
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index e686ce8b4..eaf94dfa7 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <curl/curl.h> | 27 | #include <curl/curl.h> |
28 | #include <microhttpd.h> | 28 | #include <microhttpd.h> |
29 | #include "gnunet_namestore_service.h" | 29 | #include "gnunet_namestore_service.h" |
30 | #include "gnunet_gnsrecord_lib.h" | ||
30 | #include "gnunet_gns_service.h" | 31 | #include "gnunet_gns_service.h" |
31 | #include "gnunet_testing_lib.h" | 32 | #include "gnunet_testing_lib.h" |
32 | 33 | ||
@@ -244,7 +245,7 @@ static void | |||
244 | start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 245 | start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
245 | { | 246 | { |
246 | GNUNET_asprintf (&url, | 247 | GNUNET_asprintf (&url, |
247 | "http://%s/hello_world", | 248 | "http://%s/hello_world", |
248 | TEST_DOMAIN); | 249 | TEST_DOMAIN); |
249 | curl = curl_easy_init (); | 250 | curl = curl_easy_init (); |
250 | curl_easy_setopt (curl, CURLOPT_URL, url); | 251 | curl_easy_setopt (curl, CURLOPT_URL, url); |
@@ -363,7 +364,7 @@ run (void *cls, | |||
363 | enum MHD_FLAG flags; | 364 | enum MHD_FLAG flags; |
364 | struct GNUNET_PeerIdentity id; | 365 | struct GNUNET_PeerIdentity id; |
365 | struct GNUNET_CRYPTO_HashAsciiEncoded peername; | 366 | struct GNUNET_CRYPTO_HashAsciiEncoded peername; |
366 | struct GNUNET_CRYPTO_EddsaPrivateKey *host_key; | 367 | struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key; |
367 | struct GNUNET_GNSRECORD_Data rd; | 368 | struct GNUNET_GNSRECORD_Data rd; |
368 | char *rd_string; | 369 | char *rd_string; |
369 | char *zone_keyfile; | 370 | char *zone_keyfile; |
@@ -388,13 +389,17 @@ run (void *cls, | |||
388 | "ZONEKEY", | 389 | "ZONEKEY", |
389 | &zone_keyfile)) | 390 | &zone_keyfile)) |
390 | { | 391 | { |
391 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to get key from cfg\n"); | 392 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
393 | "Failed to get key from cfg\n"); | ||
392 | return; | 394 | return; |
393 | } | 395 | } |
394 | 396 | ||
395 | host_key = GNUNET_CRYPTO_eddsa_key_create_from_file (zone_keyfile); | 397 | zone_key = GNUNET_CRYPTO_ecdsa_key_create_from_file (zone_keyfile); |
396 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; | 398 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; |
397 | GNUNET_asprintf (&rd_string, "6 %s %s", (char*)&peername, "www.gnu."); | 399 | GNUNET_asprintf (&rd_string, |
400 | "6 %s %s", | ||
401 | (char*) &peername, | ||
402 | "www.gnu."); | ||
398 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_string_to_value (GNUNET_GNSRECORD_TYPE_VPN, | 403 | GNUNET_assert (GNUNET_OK == GNUNET_GNSRECORD_string_to_value (GNUNET_GNSRECORD_TYPE_VPN, |
399 | rd_string, | 404 | rd_string, |
400 | (void**)&rd.data, | 405 | (void**)&rd.data, |
@@ -402,7 +407,7 @@ run (void *cls, | |||
402 | rd.record_type = GNUNET_GNSRECORD_TYPE_VPN; | 407 | rd.record_type = GNUNET_GNSRECORD_TYPE_VPN; |
403 | 408 | ||
404 | GNUNET_NAMESTORE_records_store (namestore, | 409 | GNUNET_NAMESTORE_records_store (namestore, |
405 | host_key, | 410 | zone_key, |
406 | "www", | 411 | "www", |
407 | 1, &rd, | 412 | 1, &rd, |
408 | &commence_testing, | 413 | &commence_testing, |
@@ -410,7 +415,7 @@ run (void *cls, | |||
410 | GNUNET_free ((void**)rd.data); | 415 | GNUNET_free ((void**)rd.data); |
411 | GNUNET_free (rd_string); | 416 | GNUNET_free (rd_string); |
412 | GNUNET_free (zone_keyfile); | 417 | GNUNET_free (zone_keyfile); |
413 | GNUNET_free (host_key); | 418 | GNUNET_free (zone_key); |
414 | } | 419 | } |
415 | 420 | ||
416 | 421 | ||