diff options
Diffstat (limited to 'src/fs/fs_unindex.c')
-rw-r--r-- | src/fs/fs_unindex.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index 132109c59..cfe73d617 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -553,10 +553,9 @@ void | |||
553 | GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc) | 553 | GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc) |
554 | { | 554 | { |
555 | const char *keyword; | 555 | const char *keyword; |
556 | struct GNUNET_FS_PseudonymHandle *ph; | 556 | const struct GNUNET_CRYPTO_EccPrivateKey *anon; |
557 | struct GNUNET_FS_PseudonymIdentifier anon; | 557 | struct GNUNET_CRYPTO_EccPublicKey anon_pub; |
558 | struct GNUNET_FS_PseudonymIdentifier verification_key; | 558 | struct GNUNET_CRYPTO_EccPublicKey dpub; |
559 | struct GNUNET_HashCode signing_key; | ||
560 | 559 | ||
561 | if (NULL == uc->dsh) | 560 | if (NULL == uc->dsh) |
562 | uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg); | 561 | uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg); |
@@ -574,18 +573,14 @@ GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc) | |||
574 | unindex_finish (uc); | 573 | unindex_finish (uc); |
575 | return; | 574 | return; |
576 | } | 575 | } |
577 | /* FIXME: code duplication with fs_search.c here... */ | 576 | anon = GNUNET_CRYPTO_ecc_key_get_anonymous (); |
578 | ph = GNUNET_FS_pseudonym_get_anonymous_pseudonym_handle (); | 577 | GNUNET_CRYPTO_ecc_key_get_public (anon, &anon_pub); |
579 | GNUNET_FS_pseudonym_get_identifier (ph, &anon); | ||
580 | GNUNET_FS_pseudonym_destroy (ph); | ||
581 | keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1]; | 578 | keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1]; |
582 | GNUNET_CRYPTO_hash (keyword, strlen (keyword), &uc->ukey); | 579 | GNUNET_CRYPTO_ecc_public_key_derive (&anon_pub, |
583 | GNUNET_CRYPTO_hash (&uc->ukey, sizeof (struct GNUNET_HashCode), &signing_key); | 580 | keyword, |
584 | GNUNET_FS_pseudonym_derive_verification_key (&anon, | 581 | &dpub); |
585 | &signing_key, | 582 | GNUNET_CRYPTO_hash (&dpub, |
586 | &verification_key); | 583 | sizeof (dpub), |
587 | GNUNET_CRYPTO_hash (&verification_key, | ||
588 | sizeof (struct GNUNET_FS_PseudonymIdentifier), | ||
589 | &uc->uquery); | 584 | &uc->uquery); |
590 | uc->first_uid = 0; | 585 | uc->first_uid = 0; |
591 | uc->dqe = GNUNET_DATASTORE_get_key (uc->dsh, | 586 | uc->dqe = GNUNET_DATASTORE_get_key (uc->dsh, |