aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_trait_truth_uuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_trait_truth_uuid.c')
-rw-r--r--src/testing/testing_api_trait_truth_uuid.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/testing/testing_api_trait_truth_uuid.c b/src/testing/testing_api_trait_truth_uuid.c
index 38a7336..6c171fd 100644
--- a/src/testing/testing_api_trait_truth_uuid.c
+++ b/src/testing/testing_api_trait_truth_uuid.c
@@ -17,7 +17,7 @@
17 <http://www.gnu.org/licenses/> 17 <http://www.gnu.org/licenses/>
18*/ 18*/
19/** 19/**
20 * @file lib/testing_api_trait_truth_pub.c 20 * @file lib/testing_api_trait_truth_uuid.c
21 * @brief traits to offer a UUID for some truth 21 * @brief traits to offer a UUID for some truth
22 * @author Christian Grothoff 22 * @author Christian Grothoff
23 * @author Dominik Meister 23 * @author Dominik Meister
@@ -26,20 +26,13 @@
26#include "platform.h" 26#include "platform.h"
27#include "anastasis_testing_lib.h" 27#include "anastasis_testing_lib.h"
28 28
29
29#define ANASTASIS_TESTING_TRAIT_TRUTH_UUID "anastasis-truth-uuid" 30#define ANASTASIS_TESTING_TRAIT_TRUTH_UUID "anastasis-truth-uuid"
30 31
31 32
32/**
33 * Obtain an public key from @a cmd.
34 *
35 * @param cmd command to extract the number from.
36 * @param index the number's index number.
37 * @param u[out] set to the number coming from @a cmd.
38 * @return #GNUNET_OK on success.
39 */
40int 33int
41ANASTASIS_TESTING_get_trait_truth_uuid 34ANASTASIS_TESTING_get_trait_truth_uuid (
42 (const struct TALER_TESTING_Command *cmd, 35 const struct TALER_TESTING_Command *cmd,
43 unsigned int index, 36 unsigned int index,
44 const struct ANASTASIS_CRYPTO_TruthUUIDP **tpk) 37 const struct ANASTASIS_CRYPTO_TruthUUIDP **tpk)
45{ 38{
@@ -50,16 +43,9 @@ ANASTASIS_TESTING_get_trait_truth_uuid
50} 43}
51 44
52 45
53/**
54 * Offer a truth public key.
55 *
56 * @param index the number's index number.
57 * @param tpk the public key to offer.
58 * @return #GNUNET_OK on success.
59 */
60struct TALER_TESTING_Trait 46struct TALER_TESTING_Trait
61ANASTASIS_TESTING_make_trait_truth_uuid 47ANASTASIS_TESTING_make_trait_truth_uuid (
62 (unsigned int index, 48 unsigned int index,
63 const struct ANASTASIS_CRYPTO_TruthUUIDP *tpk) 49 const struct ANASTASIS_CRYPTO_TruthUUIDP *tpk)
64{ 50{
65 struct TALER_TESTING_Trait ret = { 51 struct TALER_TESTING_Trait ret = {
@@ -67,8 +53,9 @@ ANASTASIS_TESTING_make_trait_truth_uuid
67 .trait_name = ANASTASIS_TESTING_TRAIT_TRUTH_UUID, 53 .trait_name = ANASTASIS_TESTING_TRAIT_TRUTH_UUID,
68 .ptr = (const void *) tpk 54 .ptr = (const void *) tpk
69 }; 55 };
56
70 return ret; 57 return ret;
71} 58}
72 59
73 60
74/* end of testing_api_trait_truth_pub.c */ 61/* end of testing_api_trait_truth_uuid.c */