#define TEST_IP_DNS "131.159.74.67"
#define TEST_RECORD_CNAME_SERVER "server.gads"
#define TEST_RECORD_CNAME_PLUS "server.+"
-#define TEST_RECORD_CNAME_ZKEY "www.188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey"
+#define TEST_RECORD_CNAME_ZKEY "www.J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey"
#define TEST_RECORD_CNAME_DNS "gnunet.org"
#define TEST_RECORD_NAME_SERVER "server"
#define TEST_RECORD_NAME_PLUS "www"
#define TEST_RECORD_NAME_ZKEY "www2"
#define TEST_RECORD_NAME_DNS "www3"
-#define KEYFILE_BOB "zonefiles/188JSUMKEF25GVU8TTV0PBNNN8JVCPUEDFV1UHJJU884JD25V0T0.zkey"
+#define KEYFILE_BOB "zonefiles/J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey"
/* Task handle to use to schedule test failure */
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_CNAME)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_CNAME)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CNAME: %s\n", rd[i].data);
if (0 == strcmp(rd[i].data, TEST_RECORD_CNAME_SERVER))
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_A)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
{
memcpy(&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
}
}
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_CNAME,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_DNSPARSER_TYPE_CNAME,
GNUNET_YES,
NULL,
&on_lookup_result_cname, TEST_DOMAIN_PLUS);
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_A)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
{
memcpy (&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
"No resolution!\n");
}
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_DNS, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_DNS, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_dns, TEST_DOMAIN_DNS);
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_A)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
{
memcpy(&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No resolution!\n");
}
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_ZKEY, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_ZKEY, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_zkey, TEST_DOMAIN_ZKEY);
GNUNET_SCHEDULER_shutdown ();
return;
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_plus, TEST_DOMAIN_PLUS);
const struct GNUNET_CONFIGURATION_Handle *ccfg,
struct GNUNET_TESTING_Peer *peer)
{
- struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey;
+ struct GNUNET_CRYPTO_EccPublicKey alice_pkey;
struct GNUNET_CRYPTO_EccPrivateKey *alice_key;
struct GNUNET_CRYPTO_EccPrivateKey *bob_key;
char* alice_keyfile;
rd.record_type = GNUNET_DNSPARSER_TYPE_A;
rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
- GNUNET_NAMESTORE_record_create (namestore_handle,
- alice_key,
- TEST_RECORD_NAME_SERVER,
- &rd,
- NULL,
- NULL);
+ GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
+ alice_key,
+ TEST_RECORD_NAME_SERVER,
+ 1, &rd,
+ NULL,
+ NULL);
rd.data_size = strlen (TEST_RECORD_CNAME_PLUS);
rd.data = TEST_RECORD_CNAME_PLUS;
- rd.record_type = GNUNET_GNS_RECORD_CNAME;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_CNAME;
- GNUNET_NAMESTORE_record_create (namestore_handle,
- alice_key,
- TEST_RECORD_NAME_PLUS,
- &rd,
- NULL,
- NULL);
+ GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
+ alice_key,
+ TEST_RECORD_NAME_PLUS,
+ 1, &rd,
+ NULL,
+ NULL);
rd.data_size = strlen (TEST_RECORD_CNAME_ZKEY);
rd.data = TEST_RECORD_CNAME_ZKEY;
- rd.record_type = GNUNET_GNS_RECORD_CNAME;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_CNAME;
- GNUNET_NAMESTORE_record_create (namestore_handle,
- alice_key,
- TEST_RECORD_NAME_ZKEY,
- &rd,
- NULL,
- NULL);
+ GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
+ alice_key,
+ TEST_RECORD_NAME_ZKEY,
+ 1, &rd,
+ NULL,
+ NULL);
rd.data_size = strlen (TEST_RECORD_CNAME_DNS);
rd.data = TEST_RECORD_CNAME_DNS;
- rd.record_type = GNUNET_GNS_RECORD_CNAME;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_CNAME;
- GNUNET_NAMESTORE_record_create (namestore_handle,
- alice_key,
- TEST_RECORD_NAME_DNS,
- &rd,
- NULL,
- NULL);
+ GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
+ alice_key,
+ TEST_RECORD_NAME_DNS,
+ 1, &rd,
+ NULL,
+ NULL);
GNUNET_assert(1 == inet_pton (AF_INET, TEST_IP_ZKEY, &web));
rd.data_size = sizeof(struct in_addr);
rd.data = &web;
rd.record_type = GNUNET_DNSPARSER_TYPE_A;
- GNUNET_NAMESTORE_record_create (namestore_handle,
- bob_key,
- TEST_RECORD_NAME_PLUS,
- &rd,
- &commence_testing,
- NULL);
+ GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
+ bob_key,
+ TEST_RECORD_NAME_PLUS,
+ 1, &rd,
+ &commence_testing,
+ NULL);
GNUNET_CRYPTO_ecc_key_free(alice_key);
GNUNET_CRYPTO_ecc_key_free(bob_key);
}