diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-14 22:15:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-14 22:15:55 +0000 |
commit | 6c8fa85819a2b02b3c4a175a08c1779283eda209 (patch) | |
tree | 3d635a2aa58f321fbb8779b6e086113558dc1c52 /src/fs/fs_api.h | |
parent | 6d7c1dd00a193fc054d1f1588ae7c98dc95b6257 (diff) | |
download | gnunet-6c8fa85819a2b02b3c4a175a08c1779283eda209.tar.gz gnunet-6c8fa85819a2b02b3c4a175a08c1779283eda209.zip |
fix key management issue with LOC signing identified in #3559
Diffstat (limited to 'src/fs/fs_api.h')
-rw-r--r-- | src/fs/fs_api.h | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h index 46f398e86..157662a65 100644 --- a/src/fs/fs_api.h +++ b/src/fs/fs_api.h | |||
@@ -416,15 +416,17 @@ struct GNUNET_FS_FileInformation | |||
416 | * @param cls closure | 416 | * @param cls closure |
417 | * @param client handle to use for FS communication | 417 | * @param client handle to use for FS communication |
418 | */ | 418 | */ |
419 | typedef void (*GNUNET_FS_QueueStart) (void *cls, | 419 | typedef void |
420 | struct GNUNET_CLIENT_Connection * client); | 420 | (*GNUNET_FS_QueueStart) (void *cls, |
421 | struct GNUNET_CLIENT_Connection *client); | ||
421 | 422 | ||
422 | 423 | ||
423 | /** | 424 | /** |
424 | * The job must now stop to run and should destry the client handle as | 425 | * The job must now stop to run and should destry the client handle as |
425 | * soon as possible (ideally prior to returning). | 426 | * soon as possible (ideally prior to returning). |
426 | */ | 427 | */ |
427 | typedef void (*GNUNET_FS_QueueStop) (void *cls); | 428 | typedef void |
429 | (*GNUNET_FS_QueueStop) (void *cls); | ||
428 | 430 | ||
429 | 431 | ||
430 | 432 | ||
@@ -680,7 +682,7 @@ GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qe); | |||
680 | * that the caller might need to go backwards | 682 | * that the caller might need to go backwards |
681 | * a bit at times | 683 | * a bit at times |
682 | * @param max maximum number of bytes that should be | 684 | * @param max maximum number of bytes that should be |
683 | * copied to buf; readers are not allowed | 685 | * copied to @a buf; readers are not allowed |
684 | * to provide less data unless there is an error; | 686 | * to provide less data unless there is an error; |
685 | * a value of "0" will be used at the end to allow | 687 | * a value of "0" will be used at the end to allow |
686 | * the reader to clean up its internal state | 688 | * the reader to clean up its internal state |
@@ -689,12 +691,15 @@ GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qe); | |||
689 | * @return number of bytes written, usually "max", 0 on error | 691 | * @return number of bytes written, usually "max", 0 on error |
690 | */ | 692 | */ |
691 | size_t | 693 | size_t |
692 | GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset, size_t max, void *buf, | 694 | GNUNET_FS_data_reader_file_ (void *cls, |
695 | uint64_t offset, | ||
696 | size_t max, | ||
697 | void *buf, | ||
693 | char **emsg); | 698 | char **emsg); |
694 | 699 | ||
695 | 700 | ||
696 | /** | 701 | /** |
697 | * Create the closure for the 'GNUNET_FS_data_reader_file_' callback. | 702 | * Create the closure for the #GNUNET_FS_data_reader_file_() callback. |
698 | * | 703 | * |
699 | * @param filename file to read | 704 | * @param filename file to read |
700 | * @return closure to use | 705 | * @return closure to use |
@@ -712,23 +717,26 @@ GNUNET_FS_make_file_reader_context_ (const char *filename); | |||
712 | * that the caller might need to go backwards | 717 | * that the caller might need to go backwards |
713 | * a bit at times | 718 | * a bit at times |
714 | * @param max maximum number of bytes that should be | 719 | * @param max maximum number of bytes that should be |
715 | * copied to buf; readers are not allowed | 720 | * copied to @a buf; readers are not allowed |
716 | * to provide less data unless there is an error; | 721 | * to provide less data unless there is an error; |
717 | * a value of "0" will be used at the end to allow | 722 | * a value of "0" will be used at the end to allow |
718 | * the reader to clean up its internal state | 723 | * the reader to clean up its internal state |
719 | * @param buf where the reader should write the data | 724 | * @param buf where the reader should write the data |
720 | * @param emsg location for the reader to store an error message | 725 | * @param emsg location for the reader to store an error message |
721 | * @return number of bytes written, usually "max", 0 on error | 726 | * @return number of bytes written, usually @a max, 0 on error |
722 | */ | 727 | */ |
723 | size_t | 728 | size_t |
724 | GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max, void *buf, | 729 | GNUNET_FS_data_reader_copy_ (void *cls, |
730 | uint64_t offset, | ||
731 | size_t max, | ||
732 | void *buf, | ||
725 | char **emsg); | 733 | char **emsg); |
726 | 734 | ||
727 | 735 | ||
728 | /** | 736 | /** |
729 | * Notification of FS that a search probe has made progress. | 737 | * Notification of FS that a search probe has made progress. |
730 | * This function is used INSTEAD of the client's event handler | 738 | * This function is used INSTEAD of the client's event handler |
731 | * for downloads where the GNUNET_FS_DOWNLOAD_IS_PROBE flag is set. | 739 | * for downloads where the #GNUNET_FS_DOWNLOAD_IS_PROBE flag is set. |
732 | * | 740 | * |
733 | * @param cls closure, always NULL (!), actual closure | 741 | * @param cls closure, always NULL (!), actual closure |
734 | * is in the client-context of the info struct | 742 | * is in the client-context of the info struct |
@@ -738,7 +746,7 @@ GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max, void *buf, | |||
738 | * for this operation; should be set to NULL for | 746 | * for this operation; should be set to NULL for |
739 | * SUSPEND and STOPPED events). The value returned | 747 | * SUSPEND and STOPPED events). The value returned |
740 | * will be passed to future callbacks in the respective | 748 | * will be passed to future callbacks in the respective |
741 | * field in the GNUNET_FS_ProgressInfo struct. | 749 | * field in the `struct GNUNET_FS_ProgressInfo`. |
742 | */ | 750 | */ |
743 | void * | 751 | void * |
744 | GNUNET_FS_search_probe_progress_ (void *cls, | 752 | GNUNET_FS_search_probe_progress_ (void *cls, |
@@ -764,7 +772,8 @@ GNUNET_FS_publish_main_ (void *cls, | |||
764 | * @param file_id computed hash, NULL on error | 772 | * @param file_id computed hash, NULL on error |
765 | */ | 773 | */ |
766 | void | 774 | void |
767 | GNUNET_FS_unindex_process_hash_ (void *cls, const struct GNUNET_HashCode * file_id); | 775 | GNUNET_FS_unindex_process_hash_ (void *cls, |
776 | const struct GNUNET_HashCode *file_id); | ||
768 | 777 | ||
769 | 778 | ||
770 | /** | 779 | /** |
@@ -890,6 +899,7 @@ GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc); | |||
890 | void | 899 | void |
891 | GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); | 900 | GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); |
892 | 901 | ||
902 | |||
893 | /** | 903 | /** |
894 | * Remove serialization/deserialization file from disk. | 904 | * Remove serialization/deserialization file from disk. |
895 | * | 905 | * |
@@ -898,7 +908,8 @@ GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); | |||
898 | * @param ent entity identifier | 908 | * @param ent entity identifier |
899 | */ | 909 | */ |
900 | void | 910 | void |
901 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, | 911 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, |
912 | const char *ext, | ||
902 | const char *ent); | 913 | const char *ent); |
903 | 914 | ||
904 | 915 | ||
@@ -991,7 +1002,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc); | |||
991 | * Create SUSPEND event for the given publish operation | 1002 | * Create SUSPEND event for the given publish operation |
992 | * and then clean up our state (without stop signal). | 1003 | * and then clean up our state (without stop signal). |
993 | * | 1004 | * |
994 | * @param cls the 'struct GNUNET_FS_PublishContext' to signal for | 1005 | * @param cls the `struct GNUNET_FS_PublishContext` to signal for |
995 | */ | 1006 | */ |
996 | void | 1007 | void |
997 | GNUNET_FS_publish_signal_suspend_ (void *cls); | 1008 | GNUNET_FS_publish_signal_suspend_ (void *cls); |
@@ -1021,7 +1032,7 @@ GNUNET_FS_download_signal_suspend_ (void *cls); | |||
1021 | * Create SUSPEND event for the given unindex operation | 1032 | * Create SUSPEND event for the given unindex operation |
1022 | * and then clean up our state (without stop signal). | 1033 | * and then clean up our state (without stop signal). |
1023 | * | 1034 | * |
1024 | * @param cls the 'struct GNUNET_FS_UnindexContext' to signal for | 1035 | * @param cls the `struct GNUNET_FS_UnindexContext` to signal for |
1025 | */ | 1036 | */ |
1026 | void | 1037 | void |
1027 | GNUNET_FS_unindex_signal_suspend_ (void *cls); | 1038 | GNUNET_FS_unindex_signal_suspend_ (void *cls); |
@@ -1212,6 +1223,11 @@ struct GNUNET_FS_PublishContext | |||
1212 | struct GNUNET_FS_Handle *h; | 1223 | struct GNUNET_FS_Handle *h; |
1213 | 1224 | ||
1214 | /** | 1225 | /** |
1226 | * Connection to FS service (only used for LOC URI signing). | ||
1227 | */ | ||
1228 | struct GNUNET_CLIENT_Handle *fs_client; | ||
1229 | |||
1230 | /** | ||
1215 | * Our top-level activity entry (if we are top-level, otherwise NULL). | 1231 | * Our top-level activity entry (if we are top-level, otherwise NULL). |
1216 | */ | 1232 | */ |
1217 | struct TopLevelActivity *top; | 1233 | struct TopLevelActivity *top; |