diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-10-19 13:31:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-10-19 13:31:03 +0000 |
commit | 8da608f0e8391f0159c1e8faf43e8085a9309ce0 (patch) | |
tree | d12ec36ef7f7e6fce12a5c1499069f4c076f5637 /src/fs/fs_tree.c | |
parent | 6ee357f1ac32f1ca6c8012a2d17f09901eb2ed50 (diff) | |
download | gnunet-8da608f0e8391f0159c1e8faf43e8085a9309ce0.tar.gz gnunet-8da608f0e8391f0159c1e8faf43e8085a9309ce0.zip |
fixes
Diffstat (limited to 'src/fs/fs_tree.c')
-rw-r--r-- | src/fs/fs_tree.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index 2108b4831..3dbf478df 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -301,16 +301,6 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te) | |||
301 | pt_block = &te->chk_tree[te->current_depth * | 301 | pt_block = &te->chk_tree[te->current_depth * |
302 | CHK_PER_INODE]; | 302 | CHK_PER_INODE]; |
303 | } | 303 | } |
304 | off = compute_chk_offset (te->chk_tree_depth - te->current_depth, | ||
305 | te->publish_offset); | ||
306 | mychk = &te->chk_tree[(te->current_depth-1)*CHK_PER_INODE+off]; | ||
307 | GNUNET_CRYPTO_hash (pt_block, pt_size, &mychk->key); | ||
308 | GNUNET_CRYPTO_hash_to_aes_key (&mychk->key, &sk, &iv); | ||
309 | GNUNET_CRYPTO_aes_encrypt (pt_block, | ||
310 | pt_size, | ||
311 | &sk, | ||
312 | &iv, | ||
313 | enc); | ||
314 | if (0 == te->current_depth) | 304 | if (0 == te->current_depth) |
315 | { | 305 | { |
316 | te->uri = GNUNET_malloc (sizeof(struct GNUNET_FS_Uri)); | 306 | te->uri = GNUNET_malloc (sizeof(struct GNUNET_FS_Uri)); |
@@ -324,6 +314,16 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te) | |||
324 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 314 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
325 | return; | 315 | return; |
326 | } | 316 | } |
317 | off = compute_chk_offset (te->chk_tree_depth - te->current_depth, | ||
318 | te->publish_offset); | ||
319 | mychk = &te->chk_tree[(te->current_depth-1)*CHK_PER_INODE+off]; | ||
320 | GNUNET_CRYPTO_hash (pt_block, pt_size, &mychk->key); | ||
321 | GNUNET_CRYPTO_hash_to_aes_key (&mychk->key, &sk, &iv); | ||
322 | GNUNET_CRYPTO_aes_encrypt (pt_block, | ||
323 | pt_size, | ||
324 | &sk, | ||
325 | &iv, | ||
326 | enc); | ||
327 | if (NULL != te->proc) | 327 | if (NULL != te->proc) |
328 | te->proc (te->cls, | 328 | te->proc (te->cls, |
329 | &mychk->query, | 329 | &mychk->query, |