diff options
Diffstat (limited to 'src/fs/fs_search.c')
-rw-r--r-- | src/fs/fs_search.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index eaf26f73f..25b34d99c 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -589,7 +589,7 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, const char *id_update, | |||
589 | */ | 589 | */ |
590 | static int | 590 | static int |
591 | decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc, | 591 | decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc, |
592 | const struct GNUNET_PseudonymIdentifier *verification_key, | 592 | const struct GNUNET_FS_PseudonymIdentifier *verification_key, |
593 | const void *edata, | 593 | const void *edata, |
594 | size_t edata_size, | 594 | size_t edata_size, |
595 | char *data) | 595 | char *data) |
@@ -600,7 +600,7 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc, | |||
600 | int i; | 600 | int i; |
601 | 601 | ||
602 | GNUNET_CRYPTO_hash (verification_key, | 602 | GNUNET_CRYPTO_hash (verification_key, |
603 | sizeof (struct GNUNET_PseudonymIdentifier), | 603 | sizeof (struct GNUNET_FS_PseudonymIdentifier), |
604 | &q); | 604 | &q); |
605 | /* find key */ | 605 | /* find key */ |
606 | for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) | 606 | for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) |
@@ -965,7 +965,7 @@ transmit_search_request (void *cls, size_t size, void *buf) | |||
965 | struct GNUNET_HashCode signing_key; | 965 | struct GNUNET_HashCode signing_key; |
966 | struct GNUNET_HashCode ns_hash; | 966 | struct GNUNET_HashCode ns_hash; |
967 | struct GNUNET_HashCode id_hash; | 967 | struct GNUNET_HashCode id_hash; |
968 | struct GNUNET_PseudonymIdentifier verification_key; | 968 | struct GNUNET_FS_PseudonymIdentifier verification_key; |
969 | unsigned int sqms; | 969 | unsigned int sqms; |
970 | uint32_t options; | 970 | uint32_t options; |
971 | 971 | ||
@@ -1039,7 +1039,7 @@ transmit_search_request (void *cls, size_t size, void *buf) | |||
1039 | sizeof (sc->uri->data.sks.ns), &ns_hash); | 1039 | sizeof (sc->uri->data.sks.ns), &ns_hash); |
1040 | GNUNET_CRYPTO_hash_xor (&id_hash, &ns_hash, &key); | 1040 | GNUNET_CRYPTO_hash_xor (&id_hash, &ns_hash, &key); |
1041 | GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &signing_key); | 1041 | GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &signing_key); |
1042 | GNUNET_PSEUDONYM_derive_verification_key (&sc->uri->data.sks.ns, | 1042 | GNUNET_FS_pseudonym_derive_verification_key (&sc->uri->data.sks.ns, |
1043 | &signing_key, | 1043 | &signing_key, |
1044 | &verification_key); | 1044 | &verification_key); |
1045 | GNUNET_CRYPTO_hash (&verification_key, | 1045 | GNUNET_CRYPTO_hash (&verification_key, |
@@ -1208,17 +1208,17 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc) | |||
1208 | unsigned int i; | 1208 | unsigned int i; |
1209 | const char *keyword; | 1209 | const char *keyword; |
1210 | struct GNUNET_HashCode signing_key; | 1210 | struct GNUNET_HashCode signing_key; |
1211 | struct GNUNET_PseudonymHandle *ph; | 1211 | struct GNUNET_FS_PseudonymHandle *ph; |
1212 | struct GNUNET_PseudonymIdentifier anon; | 1212 | struct GNUNET_FS_PseudonymIdentifier anon; |
1213 | struct GNUNET_PseudonymIdentifier verification_key; | 1213 | struct GNUNET_FS_PseudonymIdentifier verification_key; |
1214 | 1214 | ||
1215 | GNUNET_assert (NULL == sc->client); | 1215 | GNUNET_assert (NULL == sc->client); |
1216 | if (GNUNET_FS_uri_test_ksk (sc->uri)) | 1216 | if (GNUNET_FS_uri_test_ksk (sc->uri)) |
1217 | { | 1217 | { |
1218 | GNUNET_assert (0 != sc->uri->data.ksk.keywordCount); | 1218 | GNUNET_assert (0 != sc->uri->data.ksk.keywordCount); |
1219 | ph = GNUNET_PSEUDONYM_get_anonymous_pseudonym_handle (); | 1219 | ph = GNUNET_FS_pseudonym_get_anonymous_pseudonym_handle (); |
1220 | GNUNET_PSEUDONYM_get_identifier (ph, &anon); | 1220 | GNUNET_FS_pseudonym_get_identifier (ph, &anon); |
1221 | GNUNET_PSEUDONYM_destroy (ph); | 1221 | GNUNET_FS_pseudonym_destroy (ph); |
1222 | sc->requests = | 1222 | sc->requests = |
1223 | GNUNET_malloc (sizeof (struct SearchRequestEntry) * | 1223 | GNUNET_malloc (sizeof (struct SearchRequestEntry) * |
1224 | sc->uri->data.ksk.keywordCount); | 1224 | sc->uri->data.ksk.keywordCount); |
@@ -1227,10 +1227,10 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc) | |||
1227 | keyword = &sc->uri->data.ksk.keywords[i][1]; | 1227 | keyword = &sc->uri->data.ksk.keywords[i][1]; |
1228 | GNUNET_CRYPTO_hash (keyword, strlen (keyword), &sc->requests[i].ukey); | 1228 | GNUNET_CRYPTO_hash (keyword, strlen (keyword), &sc->requests[i].ukey); |
1229 | GNUNET_CRYPTO_hash (&sc->requests[i].ukey, sizeof (struct GNUNET_HashCode), &signing_key); | 1229 | GNUNET_CRYPTO_hash (&sc->requests[i].ukey, sizeof (struct GNUNET_HashCode), &signing_key); |
1230 | GNUNET_PSEUDONYM_derive_verification_key (&anon, | 1230 | GNUNET_FS_pseudonym_derive_verification_key (&anon, |
1231 | &signing_key, | 1231 | &signing_key, |
1232 | &verification_key); | 1232 | &verification_key); |
1233 | GNUNET_CRYPTO_hash (&verification_key, sizeof (struct GNUNET_PseudonymIdentifier), | 1233 | GNUNET_CRYPTO_hash (&verification_key, sizeof (struct GNUNET_FS_PseudonymIdentifier), |
1234 | &sc->requests[i].uquery); | 1234 | &sc->requests[i].uquery); |
1235 | sc->requests[i].mandatory = (sc->uri->data.ksk.keywords[i][0] == '+'); | 1235 | sc->requests[i].mandatory = (sc->uri->data.ksk.keywords[i][0] == '+'); |
1236 | if (sc->requests[i].mandatory) | 1236 | if (sc->requests[i].mandatory) |