aboutsummaryrefslogtreecommitdiff
path: root/brandt.h
diff options
context:
space:
mode:
Diffstat (limited to 'brandt.h')
-rw-r--r--brandt.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/brandt.h b/brandt.h
index 6d68f0a..fab8ebf 100644
--- a/brandt.h
+++ b/brandt.h
@@ -126,13 +126,11 @@ BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx);
/**
- * Verify an auction description blob and parse it's fields. See BRANDT_new()
+ * Parse an auction description data block. See BRANDT_new()
* for an explanation of the different auction description fields.
*
* @param[in] auction_desc The auction description blob published by the seller.
* @param[in] auction_desc_len Length of @a auction_desc in bytes.
- * @param[in] description The description text in application choosen format.
- * @param[in] description_len Length of @a description in bytes.
* @param[out] time_start Starting time of the auction. May be NULL.
* @param[out] time_round Maximum round time of the auction. May be NULL.
* @param[out] num_prices Amount of possible prices. May be NULL.
@@ -140,15 +138,13 @@ BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx);
* @param[out] outcome_public Outcome setting. May be NULL.
*/
int
-BRANDT_verify_desc (const void *auction_desc,
- size_t auction_desc_len,
- const void *description,
- uint32_t description_len,
- struct GNUNET_TIME_Absolute *time_start,
- struct GNUNET_TIME_Relative *time_round,
- uint16_t *num_prices,
- uint16_t *m,
- uint16_t *outcome_public);
+BRANDT_parse_desc (const void *auction_desc,
+ size_t auction_desc_len,
+ struct GNUNET_TIME_Absolute *time_start,
+ struct GNUNET_TIME_Relative *time_round,
+ uint16_t *num_prices,
+ uint16_t *m,
+ uint16_t *outcome_public);
/**
@@ -160,9 +156,10 @@ BRANDT_verify_desc (const void *auction_desc,
* @param[in] auction_closure Closure pointer representing the auction. This
* will not be touched by libbrandt itself. It is only passed to the callbacks.
* @param[in] auction_desc The auction information data published by the seller.
- * This is an opaque data structure. It will be parsed and checked by
- * BRANDT_join().
- * @param[in] auction_desc_len The length in bytes of the @a auction_desc
+ * This is opaque to the application. Its content will be parsed. The
+ * application MUST check the signature on this data block before passing it to
+ * libbrandt!
+ * @param[in] auction_desc_len The length in byte of the @a auction_desc
* structure.
* @return A pointer, which should only be remembered and passed to
* libbrandt functions when the client needs to refer to this auction. This is a
@@ -175,8 +172,6 @@ BRANDT_join (BRANDT_CbResult result,
void *auction_closure,
const void *auction_desc,
size_t auction_desc_len,
- const void *description,
- uint32_t description_len,
uint16_t bid);
@@ -196,9 +191,10 @@ BRANDT_join (BRANDT_CbResult result,
* @param[in] result Pointer to the result callback function
* @param[in] auction_closure Closure pointer representing the auction. This
* will not be touched by libbrandt. It is only passed to the callbacks.
- * @param[out] auction_desc The auction information data a an opaque data
- * structure. It will be generated by BRANDT_new() and should be distributed to
- * all possibly interested bidders.
+ * @param[out] auction_desc The auction information data as an opaque data
+ * structure. It is generated by this function and should be distributed to
+ * all possibly interested bidders. The seller MUST sign this data block before
+ * publishing it!
* @param[out] auction_desc_len The length in bytes of the @a auction_desc
* structure. Will be filled by BRANDT_new().
* @param[in] num_prices The amount of possible valuations for the sold item(s).
@@ -223,8 +219,6 @@ BRANDT_new (BRANDT_CbResult result,
void *auction_closure,
void **auction_desc,
size_t *auction_desc_len,
- const void *description,
- uint32_t description_len,
struct GNUNET_TIME_Absolute time_start,
struct GNUNET_TIME_Relative time_round,
uint16_t num_prices,