/**
* @file fs/fs_namespace.c
* @brief publishing to namespaces, and tracking updateable entries
+ * for our namespaces
* @author Christian Grothoff
*/
#include "platform.h"
* Return the name of the directory in which we store
* the update information graph for the given local namespace.
*
+ * @param h file-sharing handle
* @param ns namespace handle
* @return NULL on error, otherwise the name of the directory
*/
{
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_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.short_encoding);
+ (const char *) enc.encoding);
GNUNET_free (dn);
return ret;
}
/**
- * Write the namespace update node graph to a file.
+ * Write a namespace's update node graph to a file.
*
- * @param ns namespace to dump
+ * @param uig update information graph to dump
*/
static void
write_update_information_graph (struct GNUNET_FS_UpdateInformationGraph *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);