{
char *dn;
char *ret;
- struct GNUNET_CRYPTO_EccPublicKey pub;
- struct GNUNET_CRYPTO_ShortHashCode hc;
- struct GNUNET_CRYPTO_ShortHashAsciiEncoded enc;
+ struct GNUNET_CRYPTO_EccPublicSignKey pub;
+ struct GNUNET_HashCode hc;
+ struct GNUNET_CRYPTO_HashAsciiEncoded enc;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (h->cfg, "FS", "UPDATE_DIR",
"fs", "UPDATE_DIR");
return NULL;
}
- GNUNET_CRYPTO_ecc_key_get_public (ns, &pub);
- GNUNET_CRYPTO_short_hash (&pub, sizeof (pub), &hc);
- GNUNET_CRYPTO_short_hash_to_enc (&hc,
- &enc);
- GNUNET_asprintf (&ret, "%s%s%s",
- dn,
- DIR_SEPARATOR_STR,
- (const char *) enc.short_encoding);
+ GNUNET_CRYPTO_ecc_key_get_public_for_signature (ns, &pub);
+ GNUNET_CRYPTO_hash (&pub, sizeof (pub), &hc);
+ GNUNET_CRYPTO_hash_to_enc (&hc,
+ &enc);
+ GNUNET_asprintf (&ret, "%s%s%s",
+ dn,
+ DIR_SEPARATOR_STR,
+ (const char *) enc.encoding);
GNUNET_free (dn);
return ret;
}
/**
* Release memory occupied by UIG datastructure.
- *
+ *
* @param uig data structure to free
*/
static void
END:
if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to read `%s': %s\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to read `%s': %s\n"),
fn, emsg);
GNUNET_free (emsg);
}
* @param msg error message (or NULL)
*/
static void
-sks_publish_cont (void *cls,
+sks_publish_cont (void *cls,
const char *msg)
{
struct GNUNET_FS_PublishSksContext *psc = cls;
uig = read_update_information_graph (psc->h,
&psc->ns);
GNUNET_array_append (uig->update_nodes,
- uig->update_node_count,
+ uig->update_node_count,
psc->nsn);
psc->nsn = NULL;
write_update_information_graph (uig);
sks_uri = GNUNET_new (struct GNUNET_FS_Uri);
sks_uri->type = GNUNET_FS_URI_SKS;
sks_uri->data.sks.identifier = GNUNET_strdup (identifier);
- GNUNET_CRYPTO_ecc_key_get_public (ns,
+ GNUNET_CRYPTO_ecc_key_get_public_for_signature (ns,
&sks_uri->data.sks.ns);
psc = GNUNET_new (struct GNUNET_FS_PublishSksContext);
* GNUNET_NO if not.
*/
static int
-process_update_node (void *cls,
- const struct GNUNET_HashCode *key,
+process_update_node (void *cls,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct ProcessUpdateClosure *pc = cls;
struct NamespaceUpdateNode *nsn = value;
pc->ip (pc->ip_cls,
- nsn->id,
- nsn->uri,
+ nsn->id,
+ nsn->uri,
nsn->md,
nsn->update);
return GNUNET_YES;
*/
static int
find_trees (void *cls,
- const struct GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct FindTreeClosure *fc = cls;
fc.tree_array[fc.id] = nsn;
nsn->tree_id = fc.id;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"TREE of node `%s' is %u\n", nsn->id,
fc.id);
}