ztn_ctx.rid = rid;
ztn_ctx.nc = nc;
- char * z_tmp = strdup (GNUNET_short_h2s (&ztn_msg->zone));
+ struct GNUNET_CRYPTO_ShortHashAsciiEncoded z_tmp;
+ GNUNET_CRYPTO_short_hash_to_enc(&ztn_msg->zone, &z_tmp);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up name for zone `%s' in zone `%s'\n",
- z_tmp,
+ (char *) &z_tmp,
GNUNET_short_h2s (&ztn_msg->value_zone));
- GNUNET_free (z_tmp);
GSN_database->zone_to_name (GSN_database->cls, &ztn_msg->zone, &ztn_msg->value_zone, &handle_zone_to_name_it, &ztn_ctx);
GNUNET_CRYPTO_rsa_key_get_public(privkey, c->pubkey);
GNUNET_CRYPTO_short_hash(c->pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &c->zone);
- //GNUNET_CRYPTO_short_hash_to_enc (&name_hase, &name_enc);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found zonefile for zone `%s'\n", GNUNET_short_h2s (&c->zone));
GNUNET_CRYPTO_short_hash_double (&c->zone, &long_hash);
GNUNET_CONTAINER_multihashmap_put(zonekeys, &long_hash, c, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
size_t rd_ser_len;
- /* load privat key */
+ /* load privat key from file not included in zonekey dir */
privkey = GNUNET_CRYPTO_rsa_key_create_from_file("test_hostkey");
GNUNET_assert (privkey != NULL);
/* get public key */
/* create random zone hash */
GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone);
-
start_arm (cfgfile);
GNUNET_assert (arm != NULL);
/* zone hash */
GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone);
GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s (&s_zone_value));
struct GNUNET_NAMESTORE_RecordData rd;
rd.expiration = GNUNET_TIME_absolute_get();