publish a UBLOCK in GNUnet More...
#include "gnunet_util_lib.h"
#include "gnunet_datastore_service.h"
#include "gnunet_fs_service.h"
#include "gnunet_identity_service.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | GNUNET_FS_UBlockContinuation) (void *cls, const char *emsg) |
Signature of a function called as the continuation of a UBlock publication. More... | |
Functions | |
void | GNUNET_FS_ublock_decrypt_ (const void *input, size_t input_len, const struct GNUNET_CRYPTO_EcdsaPublicKey *ns, const char *label, void *output) |
Decrypt the given UBlock, storing the result in output. More... | |
struct GNUNET_FS_PublishUblockContext * | GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h, struct GNUNET_DATASTORE_Handle *dsh, const char *label, const char *ulabel, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const struct GNUNET_FS_MetaData *meta, const struct GNUNET_FS_Uri *uri, const struct GNUNET_FS_BlockOptions *bo, enum GNUNET_FS_PublishOptions options, GNUNET_FS_UBlockContinuation cont, void *cont_cls) |
Publish a UBlock. More... | |
void | GNUNET_FS_publish_ublock_cancel_ (struct GNUNET_FS_PublishUblockContext *uc) |
Abort UBlock publishing operation. More... | |
publish a UBLOCK in GNUnet
Definition in file fs_publish_ublock.h.
typedef void(* GNUNET_FS_UBlockContinuation) (void *cls, const char *emsg) |
Signature of a function called as the continuation of a UBlock publication.
cls | closure |
emsg | error message, NULL on success |
Definition at line 68 of file fs_publish_ublock.h.
void GNUNET_FS_ublock_decrypt_ | ( | const void * | input, |
size_t | input_len, | ||
const struct GNUNET_CRYPTO_EcdsaPublicKey * | ns, | ||
const char * | label, | ||
void * | output | ||
) |
Decrypt the given UBlock, storing the result in output.
input | input data |
input_len | number of bytes in input |
ns | public key under which the UBlock was stored |
label | label under which the UBlock was stored |
output | where to write the result, has input_len bytes |
Definition at line 66 of file fs_publish_ublock.c.
References derive_ublock_encryption_key(), GNUNET_CRYPTO_symmetric_decrypt(), and ns.
Referenced by decrypt_block_with_keyword(), process_kblock_for_unindex(), and process_sblock().
struct GNUNET_FS_PublishUblockContext * GNUNET_FS_publish_ublock_ | ( | struct GNUNET_FS_Handle * | h, |
struct GNUNET_DATASTORE_Handle * | dsh, | ||
const char * | label, | ||
const char * | ulabel, | ||
const struct GNUNET_CRYPTO_EcdsaPrivateKey * | ns, | ||
const struct GNUNET_FS_MetaData * | meta, | ||
const struct GNUNET_FS_Uri * | uri, | ||
const struct GNUNET_FS_BlockOptions * | bo, | ||
enum GNUNET_FS_PublishOptions | options, | ||
GNUNET_FS_UBlockContinuation | cont, | ||
void * | cont_cls | ||
) |
Publish a UBlock.
h | handle to the file sharing subsystem |
dsh | datastore handle to use for storage operation |
label | identifier to use |
ulabel | update label to use, may be an empty string for none |
ns | namespace to publish in |
meta | metadata to use |
uri | URI to refer to in the UBlock |
bo | per-block options |
options | publication options |
cont | continuation |
cont_cls | closure for cont |
Definition at line 153 of file fs_publish_ublock.c.
References _, GNUNET_FS_BlockOptions::anonymity_level, bo, GNUNET_FS_BlockOptions::content_priority, derive_ublock_encryption_key(), dsh, GNUNET_FS_BlockOptions::expiration_time, GNUNET_assert, GNUNET_BLOCK_TYPE_FS_UBLOCK, GNUNET_break, GNUNET_CRYPTO_ecdsa_key_get_public(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_ecdsa_sign_(), GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_symmetric_encrypt(), GNUNET_DATASTORE_put(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_FS_meta_data_get_serialized_size(), GNUNET_FS_meta_data_serialize(), GNUNET_FS_META_DATA_SERIALIZE_PART, GNUNET_FS_uri_to_string(), GNUNET_log, GNUNET_malloc, GNUNET_memcpy, GNUNET_new, GNUNET_OK, GNUNET_SCHEDULER_add_now(), GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK, MAX_UBLOCK_SIZE, meta, ns, pub, UBlock::purpose, GNUNET_CRYPTO_EccSignaturePurpose::purpose, GNUNET_FS_BlockOptions::replication_level, run_cont(), UBlock::signature, GNUNET_CRYPTO_EccSignaturePurpose::size, size, ublock_put_cont(), uc, uri, and UBlock::verification_key.
Referenced by GNUNET_FS_publish_sks(), and publish_ksk_cont().
void GNUNET_FS_publish_ublock_cancel_ | ( | struct GNUNET_FS_PublishUblockContext * | uc | ) |
Abort UBlock publishing operation.
uc | operation to abort. |
Definition at line 289 of file fs_publish_ublock.c.
References GNUNET_DATASTORE_cancel(), GNUNET_free, GNUNET_SCHEDULER_cancel(), and uc.
Referenced by GNUNET_FS_publish_ksk_cancel(), and GNUNET_FS_publish_sks_cancel().