* @param reason kind of progress we are making
*/
static void
-unindex_directory_scan_cb (void *cls,
- const char *filename,
+unindex_directory_scan_cb (void *cls,
+ const char *filename,
int is_directory,
enum GNUNET_FS_DirScannerProgressUpdateReason reason)
{
ex = NULL;
uc->dscan = GNUNET_FS_directory_scan_start (uc->filename,
GNUNET_NO, ex,
- &unindex_directory_scan_cb,
+ &unindex_directory_scan_cb,
uc);
GNUNET_free_non_null (ex);
}
* Continuation called to notify client about result of the remove
* operation for the UBlock.
*
- * @param cls the 'struct GNUNET_FS_UnindexContext *'
+ * @param cls the 'struct GNUNET_FS_UnindexContext *'
* @param success GNUNET_SYSERR on failure (including timeout/queue drop)
* GNUNET_NO if content was already there
* GNUNET_YES (or other positive value) on success
struct GNUNET_FS_UnindexContext *uc = cls;
uc->dqe = NULL;
- if (success != GNUNET_YES)
+ if (success != GNUNET_YES)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Failed to remove UBlock: %s\n"),
- msg);
+ msg);
uc->ksk_offset++;
GNUNET_FS_unindex_do_remove_kblocks_ (uc);
}
if (0 == uc->first_uid)
{
/* remember UID of first result to detect cycles */
- uc->first_uid = uid;
+ uc->first_uid = uid;
}
else if (uid == uc->first_uid)
{
/* no more additional results */
uc->ksk_offset++;
GNUNET_FS_unindex_do_remove_kblocks_ (uc);
- return;
+ return;
}
GNUNET_assert (GNUNET_BLOCK_TYPE_FS_UBLOCK == type);
if (size < sizeof (struct UBlock))
goto get_next;
}
{
- char pt[size - sizeof (struct UBlock)];
- struct GNUNET_CRYPTO_EccPublicSignKey anon_pub;
+ char pt[size - sizeof (struct UBlock)];
+ struct GNUNET_CRYPTO_EcdsaPublicKey anon_pub;
const char *keyword;
-
- GNUNET_CRYPTO_ecc_key_get_public_for_signature (GNUNET_CRYPTO_ecc_key_get_anonymous (),
+
+ GNUNET_CRYPTO_ecdsa_key_get_public (GNUNET_CRYPTO_ecdsa_key_get_anonymous (),
&anon_pub);
keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1];
GNUNET_FS_ublock_decrypt_ (&ub[1], size - sizeof (struct UBlock),
GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc)
{
const char *keyword;
- const struct GNUNET_CRYPTO_EccPrivateKey *anon;
- struct GNUNET_CRYPTO_EccPublicSignKey anon_pub;
- struct GNUNET_CRYPTO_EccPublicSignKey dpub;
+ const struct GNUNET_CRYPTO_EcdsaPrivateKey *anon;
+ struct GNUNET_CRYPTO_EcdsaPublicKey anon_pub;
+ struct GNUNET_CRYPTO_EcdsaPublicKey dpub;
if (NULL == uc->dsh)
uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg);
unindex_finish (uc);
return;
}
- anon = GNUNET_CRYPTO_ecc_key_get_anonymous ();
- GNUNET_CRYPTO_ecc_key_get_public_for_signature (anon, &anon_pub);
+ anon = GNUNET_CRYPTO_ecdsa_key_get_anonymous ();
+ GNUNET_CRYPTO_ecdsa_key_get_public (anon, &anon_pub);
keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1];
- GNUNET_CRYPTO_ecc_public_key_derive (&anon_pub,
+ GNUNET_CRYPTO_ecdsa_public_key_derive (&anon_pub,
keyword,
"fs-ublock",
&dpub);
* @return NULL on error, otherwise handle
*/
struct GNUNET_FS_UnindexContext *
-GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
+GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
const char *filename,
void *cctx)
{
if (GNUNET_OK != GNUNET_DISK_file_size (filename, &size, GNUNET_YES, GNUNET_YES))
return NULL;
- ret = GNUNET_malloc (sizeof (struct GNUNET_FS_UnindexContext));
+ ret = GNUNET_new (struct GNUNET_FS_UnindexContext);
ret->h = h;
ret->filename = GNUNET_strdup (filename);
ret->start_time = GNUNET_TIME_absolute_get ();