aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-06 14:18:31 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-06 14:18:31 +0000
commitfe76c075e315c0351e2fe465434ae39087daf014 (patch)
tree436887ccaf331932a3c13a8b9d2a2a710dad4be6 /src/namestore
parent7eb2835d8a494c83aedb720a2ac6f6e5ba23f22f (diff)
downloadgnunet-fe76c075e315c0351e2fe465434ae39087daf014.tar.gz
gnunet-fe76c075e315c0351e2fe465434ae39087daf014.zip
moving to new, fixed-size encoding of public and private ECC keys everywhere, also improving ECC API to better support ECRS/GADS operations
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-namestore.c6
-rw-r--r--src/namestore/gnunet-service-namestore.c61
-rw-r--r--src/namestore/namestore.h15
-rw-r--r--src/namestore/namestore_api.c32
-rw-r--r--src/namestore/plugin_namestore_postgres.c14
-rw-r--r--src/namestore/plugin_namestore_sqlite.c12
-rw-r--r--src/namestore/test_namestore_api.c4
-rw-r--r--src/namestore/test_namestore_api_create.c12
-rw-r--r--src/namestore/test_namestore_api_create_update.c4
-rw-r--r--src/namestore/test_namestore_api_lookup.c8
-rw-r--r--src/namestore/test_namestore_api_lookup_specific_type.c10
-rw-r--r--src/namestore/test_namestore_api_monitoring.c6
-rw-r--r--src/namestore/test_namestore_api_put.c2
-rw-r--r--src/namestore/test_namestore_api_remove.c8
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c4
-rw-r--r--src/namestore/test_namestore_api_sign_verify.c2
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c10
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c6
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c8
-rw-r--r--src/namestore/test_plugin_namestore.c10
21 files changed, 114 insertions, 126 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 56e2859d0..50a8601f8 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -305,7 +305,7 @@ del_continuation (void *cls,
305 */ 305 */
306static void 306static void
307display_record (void *cls, 307display_record (void *cls,
308 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 308 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
309 struct GNUNET_TIME_Absolute expire, 309 struct GNUNET_TIME_Absolute expire,
310 const char *name, 310 const char *name,
311 unsigned int rd_len, 311 unsigned int rd_len,
@@ -396,7 +396,7 @@ sync_cb (void *cls)
396 */ 396 */
397static void 397static void
398get_existing_record (void *cls, 398get_existing_record (void *cls,
399 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 399 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
400 struct GNUNET_TIME_Absolute freshness, 400 struct GNUNET_TIME_Absolute freshness,
401 const char *rec_name, 401 const char *rec_name,
402 unsigned int rd_count, 402 unsigned int rd_count,
@@ -453,7 +453,7 @@ testservice_task (void *cls,
453 int result) 453 int result)
454{ 454{
455 const struct GNUNET_CONFIGURATION_Handle *cfg = cls; 455 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
456 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pub; 456 struct GNUNET_CRYPTO_EccPublicKey pub;
457 struct GNUNET_NAMESTORE_RecordData rd; 457 struct GNUNET_NAMESTORE_RecordData rd;
458 458
459 if (GNUNET_YES != result) 459 if (GNUNET_YES != result)
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index f8663775b..a4e463642 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -283,10 +283,9 @@ write_key_to_file (const char *filename,
283 struct GNUNET_NAMESTORE_CryptoContainer *c) 283 struct GNUNET_NAMESTORE_CryptoContainer *c)
284{ 284{
285 struct GNUNET_CRYPTO_EccPrivateKey *ret = c->privkey; 285 struct GNUNET_CRYPTO_EccPrivateKey *ret = c->privkey;
286 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded *enc;
287 struct GNUNET_DISK_FileHandle *fd; 286 struct GNUNET_DISK_FileHandle *fd;
288 struct GNUNET_CRYPTO_ShortHashCode zone; 287 struct GNUNET_CRYPTO_ShortHashCode zone;
289 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 288 struct GNUNET_CRYPTO_EccPublicKey pubkey;
290 struct GNUNET_CRYPTO_EccPrivateKey *privkey; 289 struct GNUNET_CRYPTO_EccPrivateKey *privkey;
291 290
292 fd = GNUNET_DISK_file_open (filename, 291 fd = GNUNET_DISK_file_open (filename,
@@ -305,7 +304,7 @@ write_key_to_file (const char *filename,
305 } 304 }
306 GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey); 305 GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey);
307 GNUNET_CRYPTO_short_hash (&pubkey, 306 GNUNET_CRYPTO_short_hash (&pubkey,
308 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 307 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
309 &zone); 308 &zone);
310 GNUNET_CRYPTO_ecc_key_free (privkey); 309 GNUNET_CRYPTO_ecc_key_free (privkey);
311 if (0 == memcmp (&zone, &c->zone, sizeof(zone))) 310 if (0 == memcmp (&zone, &c->zone, sizeof(zone)))
@@ -326,17 +325,21 @@ write_key_to_file (const char *filename,
326 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename); 325 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename);
327 return GNUNET_SYSERR; 326 return GNUNET_SYSERR;
328 } 327 }
329 if (GNUNET_YES != GNUNET_DISK_file_lock (fd, 0, sizeof (struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded), GNUNET_YES)) 328 if (GNUNET_YES !=
329 GNUNET_DISK_file_lock (fd, 0,
330 sizeof (struct GNUNET_CRYPTO_EccPrivateKey),
331 GNUNET_YES))
330 { 332 {
331 GNUNET_break (GNUNET_YES == GNUNET_DISK_file_close (fd)); 333 GNUNET_break (GNUNET_YES == GNUNET_DISK_file_close (fd));
332 return GNUNET_SYSERR; 334 return GNUNET_SYSERR;
333 } 335 }
334 enc = GNUNET_CRYPTO_ecc_encode_key (ret); 336 GNUNET_assert (sizeof (struct GNUNET_CRYPTO_EccPrivateKey) ==
335 GNUNET_assert (NULL != enc); 337 GNUNET_DISK_file_write (fd, ret,
336 GNUNET_assert (ntohs (enc->size) == GNUNET_DISK_file_write (fd, enc, ntohs (enc->size))); 338 sizeof (struct GNUNET_CRYPTO_EccPrivateKey)));
337 GNUNET_free (enc);
338 GNUNET_DISK_file_sync (fd); 339 GNUNET_DISK_file_sync (fd);
339 if (GNUNET_YES != GNUNET_DISK_file_unlock (fd, 0, sizeof (struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded))) 340 if (GNUNET_YES !=
341 GNUNET_DISK_file_unlock (fd, 0,
342 sizeof (struct GNUNET_CRYPTO_EccPrivateKey)))
340 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); 343 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
341 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); 344 GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd));
342 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 345 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -387,14 +390,14 @@ zone_to_disk_it (void *cls,
387static void 390static void
388learn_private_key (struct GNUNET_CRYPTO_EccPrivateKey *pkey) 391learn_private_key (struct GNUNET_CRYPTO_EccPrivateKey *pkey)
389{ 392{
390 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pub; 393 struct GNUNET_CRYPTO_EccPublicKey pub;
391 struct GNUNET_HashCode long_hash; 394 struct GNUNET_HashCode long_hash;
392 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; 395 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
393 struct GNUNET_NAMESTORE_CryptoContainer *cc; 396 struct GNUNET_NAMESTORE_CryptoContainer *cc;
394 397
395 GNUNET_CRYPTO_ecc_key_get_public (pkey, &pub); 398 GNUNET_CRYPTO_ecc_key_get_public (pkey, &pub);
396 GNUNET_CRYPTO_short_hash (&pub, 399 GNUNET_CRYPTO_short_hash (&pub,
397 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 400 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
398 &pubkey_hash); 401 &pubkey_hash);
399 GNUNET_CRYPTO_short_hash_double (&pubkey_hash, &long_hash); 402 GNUNET_CRYPTO_short_hash_double (&pubkey_hash, &long_hash);
400 403
@@ -643,7 +646,7 @@ struct LookupNameContext
643 */ 646 */
644static void 647static void
645handle_lookup_name_it (void *cls, 648handle_lookup_name_it (void *cls,
646 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 649 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
647 struct GNUNET_TIME_Absolute expire, 650 struct GNUNET_TIME_Absolute expire,
648 const char *name, 651 const char *name,
649 unsigned int rd_count, 652 unsigned int rd_count,
@@ -680,7 +683,7 @@ handle_lookup_name_it (void *cls,
680 if (NULL != zone_key) 683 if (NULL != zone_key)
681 { 684 {
682 GNUNET_CRYPTO_short_hash (zone_key, 685 GNUNET_CRYPTO_short_hash (zone_key,
683 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 686 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
684 &zone_key_hash); 687 &zone_key_hash);
685 GNUNET_CRYPTO_short_hash_double (&zone_key_hash, &long_hash); 688 GNUNET_CRYPTO_short_hash_double (&zone_key_hash, &long_hash);
686 if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash))) 689 if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash)))
@@ -991,7 +994,7 @@ static void
991send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc, 994send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc,
992 struct GNUNET_SERVER_Client *client, 995 struct GNUNET_SERVER_Client *client,
993 uint32_t request_id, 996 uint32_t request_id,
994 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 997 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
995 struct GNUNET_TIME_Absolute expire, 998 struct GNUNET_TIME_Absolute expire,
996 const char *name, 999 const char *name,
997 unsigned int rd_count, 1000 unsigned int rd_count,
@@ -1198,16 +1201,14 @@ handle_record_create (void *cls,
1198 size_t msg_size; 1201 size_t msg_size;
1199 size_t msg_size_exp; 1202 size_t msg_size_exp;
1200 size_t rd_ser_len; 1203 size_t rd_ser_len;
1201 size_t key_len;
1202 uint32_t rid; 1204 uint32_t rid;
1203 const char *pkey_tmp;
1204 const char *name_tmp; 1205 const char *name_tmp;
1205 char *conv_name; 1206 char *conv_name;
1206 const char *rd_ser; 1207 const char *rd_ser;
1207 unsigned int rd_count; 1208 unsigned int rd_count;
1208 int res; 1209 int res;
1209 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; 1210 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
1210 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 1211 struct GNUNET_CRYPTO_EccPublicKey pubkey;
1211 1212
1212 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1213 "Received `%s' message\n", "NAMESTORE_RECORD_CREATE"); 1214 "Received `%s' message\n", "NAMESTORE_RECORD_CREATE");
@@ -1229,8 +1230,8 @@ handle_record_create (void *cls,
1229 msg_size = ntohs (message->size); 1230 msg_size = ntohs (message->size);
1230 rd_count = ntohs (rp_msg->rd_count); 1231 rd_count = ntohs (rp_msg->rd_count);
1231 rd_ser_len = ntohs (rp_msg->rd_len); 1232 rd_ser_len = ntohs (rp_msg->rd_len);
1232 key_len = ntohs (rp_msg->pkey_len); 1233 GNUNET_break (0 == ntohs (rp_msg->reserved));
1233 msg_size_exp = sizeof (struct RecordCreateMessage) + key_len + name_len + rd_ser_len; 1234 msg_size_exp = sizeof (struct RecordCreateMessage) + name_len + rd_ser_len;
1234 if (msg_size != msg_size_exp) 1235 if (msg_size != msg_size_exp)
1235 { 1236 {
1236 GNUNET_break (0); 1237 GNUNET_break (0);
@@ -1243,8 +1244,7 @@ handle_record_create (void *cls,
1243 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 1244 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1244 return; 1245 return;
1245 } 1246 }
1246 pkey_tmp = (const char *) &rp_msg[1]; 1247 name_tmp = (const char *) &rp_msg[1];
1247 name_tmp = &pkey_tmp[key_len];
1248 rd_ser = &name_tmp[name_len]; 1248 rd_ser = &name_tmp[name_len];
1249 if ('\0' != name_tmp[name_len -1]) 1249 if ('\0' != name_tmp[name_len -1])
1250 { 1250 {
@@ -1252,13 +1252,8 @@ handle_record_create (void *cls,
1252 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 1252 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1253 return; 1253 return;
1254 } 1254 }
1255 if (NULL == (pkey = GNUNET_CRYPTO_ecc_decode_key (pkey_tmp, key_len, 1255 pkey = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey);
1256 GNUNET_NO))) 1256 memcpy (pkey, &rp_msg->private_key, sizeof (struct GNUNET_CRYPTO_EccPrivateKey));
1257 {
1258 GNUNET_break (0);
1259 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1260 return;
1261 }
1262 { 1257 {
1263 struct GNUNET_NAMESTORE_RecordData rd[rd_count]; 1258 struct GNUNET_NAMESTORE_RecordData rd[rd_count];
1264 1259
@@ -1274,7 +1269,7 @@ handle_record_create (void *cls,
1274 /* Extracting and converting private key */ 1269 /* Extracting and converting private key */
1275 GNUNET_CRYPTO_ecc_key_get_public (pkey, &pubkey); 1270 GNUNET_CRYPTO_ecc_key_get_public (pkey, &pubkey);
1276 GNUNET_CRYPTO_short_hash (&pubkey, 1271 GNUNET_CRYPTO_short_hash (&pubkey,
1277 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 1272 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
1278 &pubkey_hash); 1273 &pubkey_hash);
1279 learn_private_key (pkey); 1274 learn_private_key (pkey);
1280 conv_name = GNUNET_NAMESTORE_normalize_string (name_tmp); 1275 conv_name = GNUNET_NAMESTORE_normalize_string (name_tmp);
@@ -1373,7 +1368,7 @@ struct ZoneToNameCtx
1373 */ 1368 */
1374static void 1369static void
1375handle_zone_to_name_it (void *cls, 1370handle_zone_to_name_it (void *cls,
1376 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 1371 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
1377 struct GNUNET_TIME_Absolute expire, 1372 struct GNUNET_TIME_Absolute expire,
1378 const char *name, 1373 const char *name,
1379 unsigned int rd_count, 1374 unsigned int rd_count,
@@ -1552,7 +1547,7 @@ struct ZoneIterationProcResult
1552 */ 1547 */
1553static void 1548static void
1554zone_iteraterate_proc (void *cls, 1549zone_iteraterate_proc (void *cls,
1555 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 1550 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
1556 struct GNUNET_TIME_Absolute expire, 1551 struct GNUNET_TIME_Absolute expire,
1557 const char *name, 1552 const char *name,
1558 unsigned int rd_count, 1553 unsigned int rd_count,
@@ -1633,7 +1628,7 @@ zone_iteraterate_proc (void *cls,
1633 /* compute / obtain signature, but only if we (a) have records and (b) expiration times were 1628 /* compute / obtain signature, but only if we (a) have records and (b) expiration times were
1634 converted to absolute expiration times */ 1629 converted to absolute expiration times */
1635 GNUNET_CRYPTO_short_hash (zone_key, 1630 GNUNET_CRYPTO_short_hash (zone_key,
1636 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 1631 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
1637 &zone_hash); 1632 &zone_hash);
1638 GNUNET_CRYPTO_short_hash_double (&zone_hash, &long_hash); 1633 GNUNET_CRYPTO_short_hash_double (&zone_hash, &long_hash);
1639 if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash))) 1634 if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash)))
@@ -1976,7 +1971,7 @@ monitor_next (void *cls,
1976 */ 1971 */
1977static void 1972static void
1978monitor_iterate_cb (void *cls, 1973monitor_iterate_cb (void *cls,
1979 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 1974 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
1980 struct GNUNET_TIME_Absolute expire, 1975 struct GNUNET_TIME_Absolute expire,
1981 const char *name, 1976 const char *name,
1982 unsigned int rd_count, 1977 unsigned int rd_count,
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h
index 7245e1631..58ecbf65d 100644
--- a/src/namestore/namestore.h
+++ b/src/namestore/namestore.h
@@ -166,7 +166,7 @@ struct LookupNameResponseMessage
166 /** 166 /**
167 * The public key for the name 167 * The public key for the name
168 */ 168 */
169 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded public_key; 169 struct GNUNET_CRYPTO_EccPublicKey public_key;
170 170
171 /* 0-terminated name and serialized record data */ 171 /* 0-terminated name and serialized record data */
172 /* rd_len bytes serialized record data */ 172 /* rd_len bytes serialized record data */
@@ -216,7 +216,7 @@ struct RecordPutMessage
216 /** 216 /**
217 * The public key 217 * The public key
218 */ 218 */
219 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded public_key; 219 struct GNUNET_CRYPTO_EccPublicKey public_key;
220 220
221 /* name (0-terminated) followed by "rd_count" serialized records */ 221 /* name (0-terminated) followed by "rd_count" serialized records */
222 222
@@ -271,15 +271,16 @@ struct RecordCreateMessage
271 uint16_t rd_count; 271 uint16_t rd_count;
272 272
273 /** 273 /**
274 * private key length 274 * always zero
275 */ 275 */
276 uint16_t pkey_len; 276 uint16_t reserved;
277
278 struct GNUNET_CRYPTO_EccPrivateKey private_key;
277 279
278 /* followed by: 280 /* followed by:
279 * GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private key with length pkey_len
280 * name with length name_len 281 * name with length name_len
281 * serialized record data with length rd_len 282 * serialized record data with length rd_len
282 * */ 283 */
283}; 284};
284 285
285 286
@@ -366,7 +367,7 @@ struct ZoneToNameResponseMessage
366 /** 367 /**
367 * Publik key 368 * Publik key
368 */ 369 */
369 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded zone_key; 370 struct GNUNET_CRYPTO_EccPublicKey zone_key;
370 371
371}; 372};
372 373
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 19ba86980..c5b213954 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -266,7 +266,7 @@ handle_lookup_name_response (struct GNUNET_NAMESTORE_QueueEntry *qe,
266 const char * rd_tmp; 266 const char * rd_tmp;
267 const struct GNUNET_CRYPTO_EccSignature *signature; 267 const struct GNUNET_CRYPTO_EccSignature *signature;
268 struct GNUNET_TIME_Absolute expire; 268 struct GNUNET_TIME_Absolute expire;
269 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *public_key_tmp; 269 const struct GNUNET_CRYPTO_EccPublicKey *public_key_tmp;
270 size_t exp_msg_len; 270 size_t exp_msg_len;
271 size_t msg_len; 271 size_t msg_len;
272 size_t name_len; 272 size_t name_len;
@@ -518,7 +518,7 @@ handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze,
518 const struct LookupNameResponseMessage *msg, 518 const struct LookupNameResponseMessage *msg,
519 size_t size) 519 size_t size)
520{ 520{
521 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubdummy; 521 struct GNUNET_CRYPTO_EccPublicKey pubdummy;
522 size_t msg_len; 522 size_t msg_len;
523 size_t exp_msg_len; 523 size_t exp_msg_len;
524 size_t name_len; 524 size_t name_len;
@@ -931,7 +931,7 @@ GNUNET_NAMESTORE_disconnect (struct GNUNET_NAMESTORE_Handle *h)
931 */ 931 */
932struct GNUNET_NAMESTORE_QueueEntry * 932struct GNUNET_NAMESTORE_QueueEntry *
933GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h, 933GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h,
934 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 934 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
935 const char *name, 935 const char *name,
936 struct GNUNET_TIME_Absolute freshness, 936 struct GNUNET_TIME_Absolute freshness,
937 unsigned int rd_count, 937 unsigned int rd_count,
@@ -1016,7 +1016,7 @@ GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h,
1016 * @return GNUNET_OK if the signature is valid 1016 * @return GNUNET_OK if the signature is valid
1017 */ 1017 */
1018int 1018int
1019GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *public_key, 1019GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_EccPublicKey *public_key,
1020 const struct GNUNET_TIME_Absolute freshness, 1020 const struct GNUNET_TIME_Absolute freshness,
1021 const char *name, 1021 const char *name,
1022 unsigned int rd_count, 1022 unsigned int rd_count,
@@ -1087,16 +1087,13 @@ GNUNET_NAMESTORE_record_put_by_authority (struct GNUNET_NAMESTORE_Handle *h,
1087{ 1087{
1088 struct GNUNET_NAMESTORE_QueueEntry *qe; 1088 struct GNUNET_NAMESTORE_QueueEntry *qe;
1089 struct PendingMessage *pe; 1089 struct PendingMessage *pe;
1090 char * name_tmp; 1090 char *name_tmp;
1091 char * pkey_tmp; 1091 char *rd_ser;
1092 char * rd_ser;
1093 size_t rd_ser_len; 1092 size_t rd_ser_len;
1094 size_t msg_size; 1093 size_t msg_size;
1095 size_t name_len; 1094 size_t name_len;
1096 size_t key_len;
1097 uint32_t rid; 1095 uint32_t rid;
1098 struct RecordCreateMessage * msg; 1096 struct RecordCreateMessage *msg;
1099 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded * pkey_enc;
1100 1097
1101 GNUNET_assert (NULL != h); 1098 GNUNET_assert (NULL != h);
1102 GNUNET_assert (NULL != pkey); 1099 GNUNET_assert (NULL != pkey);
@@ -1115,13 +1112,9 @@ GNUNET_NAMESTORE_record_put_by_authority (struct GNUNET_NAMESTORE_Handle *h,
1115 qe->op_id = rid; 1112 qe->op_id = rid;
1116 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe); 1113 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe);
1117 1114
1118 pkey_enc = GNUNET_CRYPTO_ecc_encode_key (pkey);
1119 GNUNET_assert (NULL != pkey_enc);
1120
1121 /* setup msg */ 1115 /* setup msg */
1122 key_len = ntohs (pkey_enc->size);
1123 rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); 1116 rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd);
1124 msg_size = sizeof (struct RecordCreateMessage) + key_len + name_len + rd_ser_len; 1117 msg_size = sizeof (struct RecordCreateMessage) + name_len + rd_ser_len;
1125 pe = GNUNET_malloc (sizeof (struct PendingMessage) + msg_size); 1118 pe = GNUNET_malloc (sizeof (struct PendingMessage) + msg_size);
1126 pe->size = msg_size; 1119 pe->size = msg_size;
1127 pe->is_init = GNUNET_NO; 1120 pe->is_init = GNUNET_NO;
@@ -1132,15 +1125,14 @@ GNUNET_NAMESTORE_record_put_by_authority (struct GNUNET_NAMESTORE_Handle *h,
1132 msg->name_len = htons (name_len); 1125 msg->name_len = htons (name_len);
1133 msg->rd_count = htons (rd_count); 1126 msg->rd_count = htons (rd_count);
1134 msg->rd_len = htons (rd_ser_len); 1127 msg->rd_len = htons (rd_ser_len);
1135 msg->pkey_len = htons (key_len); 1128 msg->reserved = htons (0);
1136 msg->expire = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS); 1129 msg->expire = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_FOREVER_ABS);
1137 pkey_tmp = (char *) &msg[1]; 1130 msg->private_key = *pkey;
1138 memcpy (pkey_tmp, pkey_enc, key_len); 1131
1139 name_tmp = &pkey_tmp[key_len]; 1132 name_tmp = (char *) &msg[1];
1140 memcpy (name_tmp, name, name_len); 1133 memcpy (name_tmp, name, name_len);
1141 rd_ser = &name_tmp[name_len]; 1134 rd_ser = &name_tmp[name_len];
1142 GNUNET_break (rd_ser_len == GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser)); 1135 GNUNET_break (rd_ser_len == GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser));
1143 GNUNET_free (pkey_enc);
1144 1136
1145 LOG (GNUNET_ERROR_TYPE_DEBUG, 1137 LOG (GNUNET_ERROR_TYPE_DEBUG,
1146 "Sending `%s' message for name `%s' with size %u\n", 1138 "Sending `%s' message for name `%s' with size %u\n",
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c
index 070549b33..64bfa631c 100644
--- a/src/namestore/plugin_namestore_postgres.c
+++ b/src/namestore/plugin_namestore_postgres.c
@@ -1,6 +1,6 @@
1 /* 1 /*
2 * This file is part of GNUnet 2 * This file is part of GNUnet
3 * (C) 2009, 2011, 2012 Christian Grothoff (and other contributing authors) 3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 * 4 *
5 * GNUnet is free software; you can redistribute it and/or modify 5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published 6 * it under the terms of the GNU General Public License as published
@@ -269,7 +269,7 @@ namestore_postgres_remove_records (void *cls,
269 */ 269 */
270static int 270static int
271namestore_postgres_put_records (void *cls, 271namestore_postgres_put_records (void *cls,
272 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 272 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
273 struct GNUNET_TIME_Absolute expire, 273 struct GNUNET_TIME_Absolute expire,
274 const char *name, 274 const char *name,
275 unsigned int rd_count, 275 unsigned int rd_count,
@@ -287,7 +287,7 @@ namestore_postgres_put_records (void *cls,
287 unsigned int i; 287 unsigned int i;
288 288
289 GNUNET_CRYPTO_short_hash (zone_key, 289 GNUNET_CRYPTO_short_hash (zone_key,
290 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 290 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
291 &zone); 291 &zone);
292 (void) namestore_postgres_remove_records (plugin, &zone, name); 292 (void) namestore_postgres_remove_records (plugin, &zone, name);
293 name_len = strlen (name); 293 name_len = strlen (name);
@@ -327,7 +327,7 @@ namestore_postgres_put_records (void *cls,
327 (const char *) &rvalue_be 327 (const char *) &rvalue_be
328 }; 328 };
329 int paramLengths[] = { 329 int paramLengths[] = {
330 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 330 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
331 name_len, 331 name_len,
332 sizeof (uint32_t), 332 sizeof (uint32_t),
333 data_size, 333 data_size,
@@ -378,7 +378,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
378{ 378{
379 unsigned int record_count; 379 unsigned int record_count;
380 size_t data_size; 380 size_t data_size;
381 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key; 381 const struct GNUNET_CRYPTO_EccPublicKey *zone_key;
382 const struct GNUNET_CRYPTO_EccSignature *sig; 382 const struct GNUNET_CRYPTO_EccSignature *sig;
383 struct GNUNET_TIME_Absolute expiration; 383 struct GNUNET_TIME_Absolute expiration;
384 const char *data; 384 const char *data;
@@ -406,7 +406,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
406 } 406 }
407 GNUNET_assert (1 == cnt); 407 GNUNET_assert (1 == cnt);
408 if ((6 != PQnfields (res)) || 408 if ((6 != PQnfields (res)) ||
409 (sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) != PQgetlength (res, 0, 0)) || 409 (sizeof (struct GNUNET_CRYPTO_EccPublicKey) != PQgetlength (res, 0, 0)) ||
410 (sizeof (uint32_t) != PQfsize (res, 2)) || 410 (sizeof (uint32_t) != PQfsize (res, 2)) ||
411 (sizeof (uint64_t) != PQfsize (res, 4)) || 411 (sizeof (uint64_t) != PQfsize (res, 4)) ||
412 (sizeof (struct GNUNET_CRYPTO_EccSignature) != PQgetlength (res, 0, 5))) 412 (sizeof (struct GNUNET_CRYPTO_EccSignature) != PQgetlength (res, 0, 5)))
@@ -415,7 +415,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
415 PQclear (res); 415 PQclear (res);
416 return GNUNET_SYSERR; 416 return GNUNET_SYSERR;
417 } 417 }
418 zone_key = (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *) PQgetvalue (res, 0, 0); 418 zone_key = (const struct GNUNET_CRYPTO_EccPublicKey *) PQgetvalue (res, 0, 0);
419 name = PQgetvalue (res, 0, 1); 419 name = PQgetvalue (res, 0, 1);
420 name_len = PQgetlength (res, 0, 1); 420 name_len = PQgetlength (res, 0, 1);
421 record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); 421 record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2));
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index 6c76d12e9..6ee3de495 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -1,6 +1,6 @@
1 /* 1 /*
2 * This file is part of GNUnet 2 * This file is part of GNUnet
3 * (C) 2009, 2011, 2012 Christian Grothoff (and other contributing authors) 3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 * 4 *
5 * GNUnet is free software; you can redistribute it and/or modify 5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published 6 * it under the terms of the GNU General Public License as published
@@ -450,7 +450,7 @@ namestore_sqlite_remove_records (void *cls,
450 */ 450 */
451static int 451static int
452namestore_sqlite_put_records (void *cls, 452namestore_sqlite_put_records (void *cls,
453 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 453 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
454 struct GNUNET_TIME_Absolute expire, 454 struct GNUNET_TIME_Absolute expire,
455 const char *name, 455 const char *name,
456 unsigned int rd_count, 456 unsigned int rd_count,
@@ -467,7 +467,7 @@ namestore_sqlite_put_records (void *cls,
467 size_t data_size; 467 size_t data_size;
468 unsigned int i; 468 unsigned int i;
469 469
470 GNUNET_CRYPTO_short_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &zone); 470 GNUNET_CRYPTO_short_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &zone);
471 (void) namestore_sqlite_remove_records (plugin, &zone, name); 471 (void) namestore_sqlite_remove_records (plugin, &zone, name);
472 name_len = strlen (name); 472 name_len = strlen (name);
473 GNUNET_CRYPTO_short_hash (name, name_len, &nh); 473 GNUNET_CRYPTO_short_hash (name, name_len, &nh);
@@ -497,7 +497,7 @@ namestore_sqlite_put_records (void *cls,
497 GNUNET_break (0); 497 GNUNET_break (0);
498 return GNUNET_SYSERR; 498 return GNUNET_SYSERR;
499 } 499 }
500 if ((SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 1, zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), SQLITE_STATIC)) || 500 if ((SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 1, zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKey), SQLITE_STATIC)) ||
501 (SQLITE_OK != sqlite3_bind_text (plugin->put_records, 2, name, -1, SQLITE_STATIC)) || 501 (SQLITE_OK != sqlite3_bind_text (plugin->put_records, 2, name, -1, SQLITE_STATIC)) ||
502 (SQLITE_OK != sqlite3_bind_int (plugin->put_records, 3, rd_count)) || 502 (SQLITE_OK != sqlite3_bind_int (plugin->put_records, 3, rd_count)) ||
503 (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 4, data, data_size, SQLITE_STATIC)) || 503 (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 4, data, data_size, SQLITE_STATIC)) ||
@@ -560,7 +560,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
560 int sret; 560 int sret;
561 unsigned int record_count; 561 unsigned int record_count;
562 size_t data_size; 562 size_t data_size;
563 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key; 563 const struct GNUNET_CRYPTO_EccPublicKey *zone_key;
564 const struct GNUNET_CRYPTO_EccSignature *sig; 564 const struct GNUNET_CRYPTO_EccSignature *sig;
565 struct GNUNET_TIME_Absolute expiration; 565 struct GNUNET_TIME_Absolute expiration;
566 const char *data; 566 const char *data;
@@ -578,7 +578,7 @@ get_record_and_call_iterator (struct Plugin *plugin,
578 expiration.abs_value = (uint64_t) sqlite3_column_int64 (stmt, 4); 578 expiration.abs_value = (uint64_t) sqlite3_column_int64 (stmt, 4);
579 sig = sqlite3_column_blob (stmt, 5); 579 sig = sqlite3_column_blob (stmt, 5);
580 580
581 if ( (sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) != sqlite3_column_bytes (stmt, 0)) || 581 if ( (sizeof (struct GNUNET_CRYPTO_EccPublicKey) != sqlite3_column_bytes (stmt, 0)) ||
582 (sizeof (struct GNUNET_CRYPTO_EccSignature) != sqlite3_column_bytes (stmt, 5)) ) 582 (sizeof (struct GNUNET_CRYPTO_EccSignature) != sqlite3_column_bytes (stmt, 5)) )
583 { 583 {
584 GNUNET_break (0); 584 GNUNET_break (0);
diff --git a/src/namestore/test_namestore_api.c b/src/namestore/test_namestore_api.c
index 32dd4844c..3397b35f1 100644
--- a/src/namestore/test_namestore_api.c
+++ b/src/namestore/test_namestore_api.c
@@ -41,7 +41,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
41 41
42static struct GNUNET_CRYPTO_EccPrivateKey *privkey; 42static struct GNUNET_CRYPTO_EccPrivateKey *privkey;
43 43
44static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 44static struct GNUNET_CRYPTO_EccPublicKey pubkey;
45 45
46static struct GNUNET_CRYPTO_ShortHashCode zone; 46static struct GNUNET_CRYPTO_ShortHashCode zone;
47 47
@@ -96,7 +96,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
96 96
97static void 97static void
98name_lookup_proc (void *cls, 98name_lookup_proc (void *cls,
99 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 99 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
100 struct GNUNET_TIME_Absolute expire, 100 struct GNUNET_TIME_Absolute expire,
101 const char *name, 101 const char *name,
102 unsigned int rd_count, 102 unsigned int rd_count,
diff --git a/src/namestore/test_namestore_api_create.c b/src/namestore/test_namestore_api_create.c
index aba18c192..4eac96df6 100644
--- a/src/namestore/test_namestore_api_create.c
+++ b/src/namestore/test_namestore_api_create.c
@@ -52,7 +52,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
52 52
53static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 53static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
54 54
55static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 55static struct GNUNET_CRYPTO_EccPublicKey pubkey;
56 56
57static struct GNUNET_CRYPTO_ShortHashCode s_zone; 57static struct GNUNET_CRYPTO_ShortHashCode s_zone;
58 58
@@ -108,7 +108,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
108 108
109static void 109static void
110name_lookup_second_proc (void *cls, 110name_lookup_second_proc (void *cls,
111 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 111 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
112 struct GNUNET_TIME_Absolute expire, 112 struct GNUNET_TIME_Absolute expire,
113 const char *n, 113 const char *n,
114 unsigned int rd_count, 114 unsigned int rd_count,
@@ -122,7 +122,7 @@ name_lookup_second_proc (void *cls,
122 if (n != NULL) 122 if (n != NULL)
123 { 123 {
124 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); 124 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n");
125 if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) 125 if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey)))
126 { 126 {
127 GNUNET_break (0); 127 GNUNET_break (0);
128 failed = GNUNET_YES; 128 failed = GNUNET_YES;
@@ -203,7 +203,7 @@ create_second_cont (void *cls, int32_t success, const char *emsg)
203 203
204static void 204static void
205name_lookup_initial_proc (void *cls, 205name_lookup_initial_proc (void *cls,
206 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 206 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
207 struct GNUNET_TIME_Absolute expire, 207 struct GNUNET_TIME_Absolute expire,
208 const char *n, 208 const char *n,
209 unsigned int rd_count, 209 unsigned int rd_count,
@@ -219,7 +219,7 @@ name_lookup_initial_proc (void *cls,
219 if (n != NULL) 219 if (n != NULL)
220 { 220 {
221 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); 221 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n");
222 if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) 222 if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey)))
223 { 223 {
224 GNUNET_break (0); 224 GNUNET_break (0);
225 failed = GNUNET_YES; 225 failed = GNUNET_YES;
@@ -353,7 +353,7 @@ run (void *cls,
353 GNUNET_NAMESTORE_records_serialize(1, s_first_record, rd_ser_len, rd_ser); 353 GNUNET_NAMESTORE_records_serialize(1, s_first_record, rd_ser_len, rd_ser);
354 354
355 /* create random zone hash */ 355 /* create random zone hash */
356 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); 356 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &s_zone);
357 357
358 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_NAMESTORE_short_h2s (&s_zone)); 358 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_NAMESTORE_short_h2s (&s_zone));
359 nsh = GNUNET_NAMESTORE_connect (cfg); 359 nsh = GNUNET_NAMESTORE_connect (cfg);
diff --git a/src/namestore/test_namestore_api_create_update.c b/src/namestore/test_namestore_api_create_update.c
index 28211d439..f1e66963f 100644
--- a/src/namestore/test_namestore_api_create_update.c
+++ b/src/namestore/test_namestore_api_create_update.c
@@ -52,7 +52,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
52 52
53static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 53static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
54 54
55static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 55static struct GNUNET_CRYPTO_EccPublicKey pubkey;
56 56
57static struct GNUNET_CRYPTO_EccSignature *s_signature; 57static struct GNUNET_CRYPTO_EccSignature *s_signature;
58 58
@@ -243,7 +243,7 @@ run (void *cls,
243 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_first_record, 1); 243 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_first_record, 1);
244 244
245 /* create random zone hash */ 245 /* create random zone hash */
246 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); 246 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &s_zone);
247 247
248 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_NAMESTORE_short_h2s (&s_zone)); 248 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_NAMESTORE_short_h2s (&s_zone));
249 nsh = GNUNET_NAMESTORE_connect (cfg); 249 nsh = GNUNET_NAMESTORE_connect (cfg);
diff --git a/src/namestore/test_namestore_api_lookup.c b/src/namestore/test_namestore_api_lookup.c
index 7673e0fa7..d8f6fe056 100644
--- a/src/namestore/test_namestore_api_lookup.c
+++ b/src/namestore/test_namestore_api_lookup.c
@@ -45,7 +45,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
45 45
46static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 46static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
47 47
48static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 48static struct GNUNET_CRYPTO_EccPublicKey pubkey;
49 49
50static struct GNUNET_CRYPTO_EccSignature *s_signature; 50static struct GNUNET_CRYPTO_EccSignature *s_signature;
51 51
@@ -105,7 +105,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
105 105
106static void 106static void
107name_lookup_proc (void *cls, 107name_lookup_proc (void *cls,
108 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 108 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
109 struct GNUNET_TIME_Absolute expire, 109 struct GNUNET_TIME_Absolute expire,
110 const char *n, 110 const char *n,
111 unsigned int rd_count, 111 unsigned int rd_count,
@@ -119,7 +119,7 @@ name_lookup_proc (void *cls,
119 { 119 {
120 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); 120 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n");
121 if (0 != memcmp (zone_key, &pubkey, 121 if (0 != memcmp (zone_key, &pubkey,
122 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) 122 sizeof (struct GNUNET_CRYPTO_EccPublicKey)))
123 { 123 {
124 GNUNET_break (0); 124 GNUNET_break (0);
125 } 125 }
@@ -243,7 +243,7 @@ run (void *cls,
243 243
244 /* create random zone hash */ 244 /* create random zone hash */
245 GNUNET_CRYPTO_short_hash (&pubkey, 245 GNUNET_CRYPTO_short_hash (&pubkey,
246 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), 246 sizeof (struct GNUNET_CRYPTO_EccPublicKey),
247 &s_zone); 247 &s_zone);
248 nsh = GNUNET_NAMESTORE_connect (cfg); 248 nsh = GNUNET_NAMESTORE_connect (cfg);
249 GNUNET_break (NULL != nsh); 249 GNUNET_break (NULL != nsh);
diff --git a/src/namestore/test_namestore_api_lookup_specific_type.c b/src/namestore/test_namestore_api_lookup_specific_type.c
index 49988ed3f..28632c83f 100644
--- a/src/namestore/test_namestore_api_lookup_specific_type.c
+++ b/src/namestore/test_namestore_api_lookup_specific_type.c
@@ -50,7 +50,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
50 50
51static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 51static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
52 52
53static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 53static struct GNUNET_CRYPTO_EccPublicKey pubkey;
54 54
55static struct GNUNET_CRYPTO_EccSignature *s_signature; 55static struct GNUNET_CRYPTO_EccSignature *s_signature;
56 56
@@ -110,7 +110,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
110 110
111static void 111static void
112name_lookup_existing_record_type (void *cls, 112name_lookup_existing_record_type (void *cls,
113 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 113 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
114 struct GNUNET_TIME_Absolute expire, 114 struct GNUNET_TIME_Absolute expire,
115 const char *n, 115 const char *n,
116 unsigned int rd_count, 116 unsigned int rd_count,
@@ -121,7 +121,7 @@ name_lookup_existing_record_type (void *cls,
121 121
122 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore returned %u records\n", rd_count); 122 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore returned %u records\n", rd_count);
123 123
124 if ((NULL == n) || (0 != memcmp(zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)))) 124 if ((NULL == n) || (0 != memcmp(zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey))))
125 { 125 {
126 GNUNET_break(0); 126 GNUNET_break(0);
127 failed = GNUNET_YES; 127 failed = GNUNET_YES;
@@ -156,7 +156,7 @@ name_lookup_existing_record_type (void *cls,
156 156
157static void 157static void
158name_lookup_non_existing_record_type (void *cls, 158name_lookup_non_existing_record_type (void *cls,
159 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 159 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
160 struct GNUNET_TIME_Absolute expire, 160 struct GNUNET_TIME_Absolute expire,
161 const char *n, 161 const char *n,
162 unsigned int rd_count, 162 unsigned int rd_count,
@@ -300,7 +300,7 @@ run (void *cls,
300 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); 300 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS);
301 301
302 /* create random zone hash */ 302 /* create random zone hash */
303 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); 303 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &s_zone);
304 nsh = GNUNET_NAMESTORE_connect (cfg); 304 nsh = GNUNET_NAMESTORE_connect (cfg);
305 GNUNET_break (NULL != nsh); 305 GNUNET_break (NULL != nsh);
306 GNUNET_break (s_rd != NULL); 306 GNUNET_break (s_rd != NULL);
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index b3147c43a..c103952fa 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -39,13 +39,13 @@ static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task;
39 39
40static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 40static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
41 41
42static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 42static struct GNUNET_CRYPTO_EccPublicKey pubkey;
43 43
44static struct GNUNET_HashCode zone; 44static struct GNUNET_HashCode zone;
45 45
46static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 46static struct GNUNET_CRYPTO_EccPrivateKey * privkey2;
47 47
48static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2; 48static struct GNUNET_CRYPTO_EccPublicKey pubkey2;
49 49
50static struct GNUNET_HashCode zone2; 50static struct GNUNET_HashCode zone2;
51 51
@@ -152,7 +152,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
152 152
153static void 153static void
154zone_proc (void *cls, 154zone_proc (void *cls,
155 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 155 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
156 struct GNUNET_TIME_Absolute expire, 156 struct GNUNET_TIME_Absolute expire,
157 const char *name, 157 const char *name,
158 unsigned int rd_count, 158 unsigned int rd_count,
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c
index df5cb336e..ff99b60f9 100644
--- a/src/namestore/test_namestore_api_put.c
+++ b/src/namestore/test_namestore_api_put.c
@@ -44,7 +44,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
44 44
45static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 45static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
46 46
47static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 47static struct GNUNET_CRYPTO_EccPublicKey pubkey;
48 48
49static struct GNUNET_NAMESTORE_RecordData *s_rd; 49static struct GNUNET_NAMESTORE_RecordData *s_rd;
50 50
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c
index 77edd3fa9..f278b30db 100644
--- a/src/namestore/test_namestore_api_remove.c
+++ b/src/namestore/test_namestore_api_remove.c
@@ -51,7 +51,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
51 51
52static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 52static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
53 53
54static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 54static struct GNUNET_CRYPTO_EccPublicKey pubkey;
55 55
56static struct GNUNET_CRYPTO_EccSignature *s_signature; 56static struct GNUNET_CRYPTO_EccSignature *s_signature;
57 57
@@ -109,7 +109,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
109 109
110static void 110static void
111name_lookup_proc (void *cls, 111name_lookup_proc (void *cls,
112 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 112 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
113 struct GNUNET_TIME_Absolute expire, 113 struct GNUNET_TIME_Absolute expire,
114 const char *n, 114 const char *n,
115 unsigned int rd_count, 115 unsigned int rd_count,
@@ -124,7 +124,7 @@ name_lookup_proc (void *cls,
124 "Lookup for name `%s' returned %u records\n", n, rd_count); 124 "Lookup for name `%s' returned %u records\n", n, rd_count);
125 if (0 != memcmp (zone_key, 125 if (0 != memcmp (zone_key,
126 &pubkey, 126 &pubkey,
127 sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) 127 sizeof (struct GNUNET_CRYPTO_EccPublicKey)))
128 { 128 {
129 GNUNET_break (0); 129 GNUNET_break (0);
130 failed = GNUNET_YES; 130 failed = GNUNET_YES;
@@ -254,7 +254,7 @@ run (void *cls,
254 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); 254 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS);
255 255
256 /* create random zone hash */ 256 /* create random zone hash */
257 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); 257 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &s_zone);
258 258
259 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_NAMESTORE_short_h2s (&s_zone)); 259 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_NAMESTORE_short_h2s (&s_zone));
260 nsh = GNUNET_NAMESTORE_connect (cfg); 260 nsh = GNUNET_NAMESTORE_connect (cfg);
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c
index 4e207257e..a85bc8c05 100644
--- a/src/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/namestore/test_namestore_api_remove_not_existing_record.c
@@ -51,7 +51,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
51 51
52static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 52static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
53 53
54static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 54static struct GNUNET_CRYPTO_EccPublicKey pubkey;
55 55
56static struct GNUNET_CRYPTO_EccSignature *s_signature; 56static struct GNUNET_CRYPTO_EccSignature *s_signature;
57 57
@@ -202,7 +202,7 @@ run (void *cls,
202 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); 202 s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS);
203 203
204 /* create random zone hash */ 204 /* create random zone hash */
205 GNUNET_CRYPTO_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); 205 GNUNET_CRYPTO_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &s_zone);
206 206
207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_h2s_full(&s_zone)); 207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_h2s_full(&s_zone));
208 nsh = GNUNET_NAMESTORE_connect (cfg); 208 nsh = GNUNET_NAMESTORE_connect (cfg);
diff --git a/src/namestore/test_namestore_api_sign_verify.c b/src/namestore/test_namestore_api_sign_verify.c
index 647cc59be..e2913991c 100644
--- a/src/namestore/test_namestore_api_sign_verify.c
+++ b/src/namestore/test_namestore_api_sign_verify.c
@@ -44,7 +44,7 @@
44 44
45static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 45static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
46 46
47static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 47static struct GNUNET_CRYPTO_EccPublicKey pubkey;
48 48
49static struct GNUNET_NAMESTORE_RecordData *s_rd; 49static struct GNUNET_NAMESTORE_RecordData *s_rd;
50 50
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index f2d77d2ac..63e4adf40 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -39,13 +39,13 @@ static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task;
39 39
40static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 40static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
41 41
42static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 42static struct GNUNET_CRYPTO_EccPublicKey pubkey;
43 43
44static struct GNUNET_HashCode zone; 44static struct GNUNET_HashCode zone;
45 45
46static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 46static struct GNUNET_CRYPTO_EccPrivateKey * privkey2;
47 47
48static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2; 48static struct GNUNET_CRYPTO_EccPublicKey pubkey2;
49 49
50static struct GNUNET_HashCode zone2; 50static struct GNUNET_HashCode zone2;
51 51
@@ -179,7 +179,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
179 179
180static void 180static void
181zone_proc (void *cls, 181zone_proc (void *cls,
182 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 182 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
183 struct GNUNET_TIME_Absolute expire, 183 struct GNUNET_TIME_Absolute expire,
184 const char *name, 184 const char *name,
185 unsigned int rd_count, 185 unsigned int rd_count,
@@ -204,7 +204,7 @@ zone_proc (void *cls,
204 if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature)) 204 if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature))
205 { 205 {
206 struct GNUNET_HashCode zone_key_hash; 206 struct GNUNET_HashCode zone_key_hash;
207 GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &zone_key_hash); 207 GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &zone_key_hash);
208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value); 208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value);
209 209
210 failed = GNUNET_YES; 210 failed = GNUNET_YES;
@@ -354,7 +354,7 @@ create_record (unsigned int count)
354 */ 354 */
355static void 355static void
356empty_zone_proc (void *cls, 356empty_zone_proc (void *cls,
357 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 357 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
358 struct GNUNET_TIME_Absolute expire, 358 struct GNUNET_TIME_Absolute expire,
359 const char *name, 359 const char *name,
360 unsigned int rd_count, 360 unsigned int rd_count,
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 3dce51d90..020c8358f 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -39,13 +39,13 @@ static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task;
39 39
40static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 40static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
41 41
42static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 42static struct GNUNET_CRYPTO_EccPublicKey pubkey;
43 43
44static struct GNUNET_CRYPTO_ShortHashCode zone; 44static struct GNUNET_CRYPTO_ShortHashCode zone;
45 45
46static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 46static struct GNUNET_CRYPTO_EccPrivateKey * privkey2;
47 47
48static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2; 48static struct GNUNET_CRYPTO_EccPublicKey pubkey2;
49 49
50static struct GNUNET_CRYPTO_ShortHashCode zone2; 50static struct GNUNET_CRYPTO_ShortHashCode zone2;
51 51
@@ -174,7 +174,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
174 174
175static void 175static void
176zone_proc (void *cls, 176zone_proc (void *cls,
177 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 177 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
178 struct GNUNET_TIME_Absolute expire, 178 struct GNUNET_TIME_Absolute expire,
179 const char *name, 179 const char *name,
180 unsigned int rd_count, 180 unsigned int rd_count,
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index 9c1829e91..5d44555d1 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -38,13 +38,13 @@ static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task;
38 38
39static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 39static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
40 40
41static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 41static struct GNUNET_CRYPTO_EccPublicKey pubkey;
42 42
43static struct GNUNET_HashCode zone; 43static struct GNUNET_HashCode zone;
44 44
45static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 45static struct GNUNET_CRYPTO_EccPrivateKey * privkey2;
46 46
47static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2; 47static struct GNUNET_CRYPTO_EccPublicKey pubkey2;
48 48
49static struct GNUNET_HashCode zone2; 49static struct GNUNET_HashCode zone2;
50 50
@@ -177,7 +177,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
177 177
178static void 178static void
179zone_proc (void *cls, 179zone_proc (void *cls,
180 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 180 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
181 struct GNUNET_TIME_Absolute expire, 181 struct GNUNET_TIME_Absolute expire,
182 const char *name, 182 const char *name,
183 unsigned int rd_count, 183 unsigned int rd_count,
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index f0b712eb9..e1fefec09 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -45,7 +45,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
45 45
46static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 46static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
47 47
48static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; 48static struct GNUNET_CRYPTO_EccPublicKey pubkey;
49 49
50static struct GNUNET_TIME_Absolute expire; 50static struct GNUNET_TIME_Absolute expire;
51 51
@@ -98,7 +98,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
98 98
99static void 99static void
100zone_to_name_proc (void *cls, 100zone_to_name_proc (void *cls,
101 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 101 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
102 struct GNUNET_TIME_Absolute expire, 102 struct GNUNET_TIME_Absolute expire,
103 const char *n, 103 const char *n,
104 unsigned int rd_count, 104 unsigned int rd_count,
@@ -125,7 +125,7 @@ zone_to_name_proc (void *cls,
125 fail = GNUNET_YES; 125 fail = GNUNET_YES;
126 GNUNET_break (0); 126 GNUNET_break (0);
127 } 127 }
128 if ((zone_key == NULL) || (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)))) 128 if ((zone_key == NULL) || (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey))))
129 { 129 {
130 fail = GNUNET_YES; 130 fail = GNUNET_YES;
131 GNUNET_break (0); 131 GNUNET_break (0);
@@ -182,7 +182,7 @@ run (void *cls,
182 GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); 182 GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey);
183 183
184 /* zone hash */ 184 /* zone hash */
185 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); 185 GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &s_zone);
186 GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value); 186 GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value);
187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_NAMESTORE_short_h2s (&s_zone_value)); 187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_NAMESTORE_short_h2s (&s_zone_value));
188 188
diff --git a/src/namestore/test_plugin_namestore.c b/src/namestore/test_plugin_namestore.c
index b7d2341e4..35c9e920f 100644
--- a/src/namestore/test_plugin_namestore.c
+++ b/src/namestore/test_plugin_namestore.c
@@ -95,7 +95,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg)
95 */ 95 */
96static void 96static void
97test_record (void *cls, 97test_record (void *cls,
98 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, 98 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
99 struct GNUNET_TIME_Absolute expire, 99 struct GNUNET_TIME_Absolute expire,
100 const char *name, 100 const char *name,
101 unsigned int rd_count, 101 unsigned int rd_count,
@@ -104,7 +104,7 @@ test_record (void *cls,
104{ 104{
105 int *idp = cls; 105 int *idp = cls;
106 int id = *idp; 106 int id = *idp;
107 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded tzone_key; 107 struct GNUNET_CRYPTO_EccPublicKey tzone_key;
108 char tname[64]; 108 char tname[64];
109 unsigned int trd_count = 1 + (id % 1024); 109 unsigned int trd_count = 1 + (id % 1024);
110 struct GNUNET_CRYPTO_EccSignature tsignature; 110 struct GNUNET_CRYPTO_EccSignature tsignature;
@@ -122,7 +122,7 @@ test_record (void *cls,
122 memset (&tzone_key, (id % 241), sizeof (tzone_key)); 122 memset (&tzone_key, (id % 241), sizeof (tzone_key));
123 memset (&tsignature, (id % 243), sizeof (tsignature)); 123 memset (&tsignature, (id % 243), sizeof (tsignature));
124 GNUNET_assert (0 == strcmp (name, tname)); 124 GNUNET_assert (0 == strcmp (name, tname));
125 GNUNET_assert (0 == memcmp (&tzone_key, zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))); 125 GNUNET_assert (0 == memcmp (&tzone_key, zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKey)));
126 GNUNET_assert (0 == memcmp (&tsignature, signature, sizeof (struct GNUNET_CRYPTO_EccSignature))); 126 GNUNET_assert (0 == memcmp (&tsignature, signature, sizeof (struct GNUNET_CRYPTO_EccSignature)));
127} 127}
128 128
@@ -139,7 +139,7 @@ get_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id)
139static void 139static void
140put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) 140put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id)
141{ 141{
142 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded zone_key; 142 struct GNUNET_CRYPTO_EccPublicKey zone_key;
143 struct GNUNET_TIME_Absolute expire; 143 struct GNUNET_TIME_Absolute expire;
144 char name[64]; 144 char name[64];
145 unsigned int rd_count = 1 + (id % 1024); 145 unsigned int rd_count = 1 + (id % 1024);
@@ -175,7 +175,7 @@ run (void *cls, char *const *args, const char *cfgfile,
175 const struct GNUNET_CONFIGURATION_Handle *cfg) 175 const struct GNUNET_CONFIGURATION_Handle *cfg)
176{ 176{
177 struct GNUNET_NAMESTORE_PluginFunctions *nsp; 177 struct GNUNET_NAMESTORE_PluginFunctions *nsp;
178 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded zone_key; 178 struct GNUNET_CRYPTO_EccPublicKey zone_key;
179 struct GNUNET_CRYPTO_ShortHashCode zone; 179 struct GNUNET_CRYPTO_ShortHashCode zone;
180 180
181 ok = 0; 181 ok = 0;