* @author Martin Schanzenbach
*/
#include "platform.h"
-#include "gnunet_testing_lib-new.h"
+#include "gnunet_testing_lib.h"
#include "gnunet_core_service.h"
#include "block_dns.h"
#include "gnunet_signatures.h"
#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 */
const struct GNUNET_CONFIGURATION_Handle *ccfg,
struct GNUNET_TESTING_Peer *peer)
{
- struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
- struct GNUNET_CRYPTO_RsaPrivateKey *alice_key;
- struct GNUNET_CRYPTO_RsaPrivateKey *bob_key;
+ struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey;
+ struct GNUNET_CRYPTO_EccPrivateKey *alice_key;
+ struct GNUNET_CRYPTO_EccPrivateKey *bob_key;
char* alice_keyfile;
struct GNUNET_NAMESTORE_RecordData rd;
const char* ip = TEST_IP_PLUS;
return;
}
- alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile);
- GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey);
+ alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile);
+ GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey);
GNUNET_free(alice_keyfile);
- bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB);
+ bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB);
rd.expiration_time = UINT64_MAX;
GNUNET_assert(1 == inet_pton (AF_INET, ip, &web));
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;
- 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;
- 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;
- 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_CRYPTO_rsa_key_free(alice_key);
- GNUNET_CRYPTO_rsa_key_free(bob_key);
+ 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);
}