summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_trait_salt.c24
-rw-r--r--src/testing/testing_api_trait_truth_uuid.c29
-rw-r--r--src/testing/testing_cmd_challenge_answer.c2
-rw-r--r--src/testing/testing_cmd_policy_create.c2
-rw-r--r--src/testing/testing_cmd_recover_secret.c14
-rw-r--r--src/testing/testing_cmd_secret_share.c2
-rw-r--r--src/testing/testing_cmd_truth_upload.c2
-rw-r--r--src/testing/testing_trait_challenge.c21
-rw-r--r--src/testing/testing_trait_core_secret.c21
-rw-r--r--src/testing/testing_trait_policy.c21
-rw-r--r--src/testing/testing_trait_truth.c21
11 files changed, 36 insertions, 123 deletions
diff --git a/src/testing/testing_api_trait_salt.c b/src/testing/testing_api_trait_salt.c
index 116742f..c4ceb55 100644
--- a/src/testing/testing_api_trait_salt.c
+++ b/src/testing/testing_api_trait_salt.c
@@ -29,17 +29,9 @@
#define ANASTASIS_TESTING_TRAIT_SALT "anastasis-provider-salt"
-/**
- * Obtain a salt from @a cmd.
- *
- * @param cmd command to extract the salt from.
- * @param index the salt's index number.
- * @param s[out] set to the salt coming from @a cmd.
- * @return #GNUNET_OK on success.
- */
int
-ANASTASIS_TESTING_get_trait_salt
- (const struct TALER_TESTING_Command *cmd,
+ANASTASIS_TESTING_get_trait_salt (
+ const struct TALER_TESTING_Command *cmd,
unsigned int index,
const struct ANASTASIS_CRYPTO_ProviderSaltP **s)
{
@@ -50,16 +42,9 @@ ANASTASIS_TESTING_get_trait_salt
}
-/**
- * Offer an salt.
- *
- * @param index the salt's index number.
- * @param u the salt to offer.
- * @return #GNUNET_OK on success.
- */
struct TALER_TESTING_Trait
-ANASTASIS_TESTING_make_trait_salt
- (unsigned int index,
+ANASTASIS_TESTING_make_trait_salt (
+ unsigned int index,
const struct ANASTASIS_CRYPTO_ProviderSaltP *s)
{
struct TALER_TESTING_Trait ret = {
@@ -67,6 +52,7 @@ ANASTASIS_TESTING_make_trait_salt
.trait_name = ANASTASIS_TESTING_TRAIT_SALT,
.ptr = (const void *) s
};
+
return ret;
}
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 @@
<http://www.gnu.org/licenses/>
*/
/**
- * @file lib/testing_api_trait_truth_pub.c
+ * @file lib/testing_api_trait_truth_uuid.c
* @brief traits to offer a UUID for some truth
* @author Christian Grothoff
* @author Dominik Meister
@@ -26,20 +26,13 @@
#include "platform.h"
#include "anastasis_testing_lib.h"
+
#define ANASTASIS_TESTING_TRAIT_TRUTH_UUID "anastasis-truth-uuid"
-/**
- * Obtain an public key from @a cmd.
- *
- * @param cmd command to extract the number from.
- * @param index the number's index number.
- * @param u[out] set to the number coming from @a cmd.
- * @return #GNUNET_OK on success.
- */
int
-ANASTASIS_TESTING_get_trait_truth_uuid
- (const struct TALER_TESTING_Command *cmd,
+ANASTASIS_TESTING_get_trait_truth_uuid (
+ const struct TALER_TESTING_Command *cmd,
unsigned int index,
const struct ANASTASIS_CRYPTO_TruthUUIDP **tpk)
{
@@ -50,16 +43,9 @@ ANASTASIS_TESTING_get_trait_truth_uuid
}
-/**
- * Offer a truth public key.
- *
- * @param index the number's index number.
- * @param tpk the public key to offer.
- * @return #GNUNET_OK on success.
- */
struct TALER_TESTING_Trait
-ANASTASIS_TESTING_make_trait_truth_uuid
- (unsigned int index,
+ANASTASIS_TESTING_make_trait_truth_uuid (
+ unsigned int index,
const struct ANASTASIS_CRYPTO_TruthUUIDP *tpk)
{
struct TALER_TESTING_Trait ret = {
@@ -67,8 +53,9 @@ ANASTASIS_TESTING_make_trait_truth_uuid
.trait_name = ANASTASIS_TESTING_TRAIT_TRUTH_UUID,
.ptr = (const void *) tpk
};
+
return ret;
}
-/* end of testing_api_trait_truth_pub.c */
+/* end of testing_api_trait_truth_uuid.c */
diff --git a/src/testing/testing_cmd_challenge_answer.c b/src/testing/testing_cmd_challenge_answer.c
index b243d61..bca7d6b 100644
--- a/src/testing/testing_cmd_challenge_answer.c
+++ b/src/testing/testing_cmd_challenge_answer.c
@@ -488,7 +488,7 @@ challenge_cleanup (void *cls,
* Offer internal data to other commands.
*
* @param cls closure
- * @param ret[out] result (could be anything)
+ * @param[out] ret result (could be anything)
* @param trait name of the trait
* @param index index number of the object to extract.
* @return #GNUNET_OK on success
diff --git a/src/testing/testing_cmd_policy_create.c b/src/testing/testing_cmd_policy_create.c
index fc9ed44..964fb91 100644
--- a/src/testing/testing_cmd_policy_create.c
+++ b/src/testing/testing_cmd_policy_create.c
@@ -146,7 +146,7 @@ policy_create_cleanup (void *cls,
* Offer internal data to other commands.
*
* @param cls closure
- * @param ret[out] result (could be anything)
+ * @param[out] ret result (could be anything)
* @param trait name of the trait
* @param index index number of the object to extract.
* @return #GNUNET_OK on success
diff --git a/src/testing/testing_cmd_recover_secret.c b/src/testing/testing_cmd_recover_secret.c
index a95bdd2..6fc3861 100644
--- a/src/testing/testing_cmd_recover_secret.c
+++ b/src/testing/testing_cmd_recover_secret.c
@@ -47,12 +47,12 @@ struct RecoverSecretState
struct ANASTASIS_Recovery *recovery;
/**
- * Reference to download command we expect to lookup.
+ * Reference to download command we expect to look up.
*/
const char *download_reference;
/**
- * Reference to download command we expect to lookup.
+ * Reference to core secret share we expect to look up.
*/
const char *core_secret_reference;
@@ -129,7 +129,7 @@ policy_lookup_cb (void *cls,
* On success, the secret is returned in @a secret.
*
* @param cls closure
- * @param ec error code
+ * @param rc error code
* @param secret contains the core secret which is passed to the user
* @param secret_size defines the size of the core secret
*/
@@ -214,9 +214,9 @@ recover_secret_run (void *cls,
}
if (NULL != rss->core_secret_reference)
{
- ref = TALER_TESTING_interpreter_lookup_command
- (is,
- rss->core_secret_reference);
+ ref = TALER_TESTING_interpreter_lookup_command (
+ is,
+ rss->core_secret_reference);
if (NULL == ref)
{
GNUNET_break (0);
@@ -302,7 +302,7 @@ recover_secret_cleanup (void *cls,
* Offer internal data to other commands.
*
* @param cls closure
- * @param ret[out] result (could be anything)
+ * @param[out] ret result (could be anything)
* @param trait name of the trait
* @param index index number of the object to extract.
* @return #GNUNET_OK on success
diff --git a/src/testing/testing_cmd_secret_share.c b/src/testing/testing_cmd_secret_share.c
index b80006e..cecfd86 100644
--- a/src/testing/testing_cmd_secret_share.c
+++ b/src/testing/testing_cmd_secret_share.c
@@ -355,7 +355,7 @@ secret_share_cleanup (void *cls,
* Offer internal data to other commands.
*
* @param cls closure
- * @param ret[out] result (could be anything)
+ * @param[out] ret result (could be anything)
* @param trait name of the trait
* @param index index number of the object to extract.
* @return #GNUNET_OK on success
diff --git a/src/testing/testing_cmd_truth_upload.c b/src/testing/testing_cmd_truth_upload.c
index a9a3161..87dec9d 100644
--- a/src/testing/testing_cmd_truth_upload.c
+++ b/src/testing/testing_cmd_truth_upload.c
@@ -272,7 +272,7 @@ truth_upload_cleanup (void *cls,
* Offer internal data to other commands.
*
* @param cls closure
- * @param ret[out] result (could be anything)
+ * @param[out] ret result (could be anything)
* @param trait name of the trait
* @param index index number of the object to extract.
* @return #GNUNET_OK on success
diff --git a/src/testing/testing_trait_challenge.c b/src/testing/testing_trait_challenge.c
index 5c40d8e..da981d7 100644
--- a/src/testing/testing_trait_challenge.c
+++ b/src/testing/testing_trait_challenge.c
@@ -28,14 +28,7 @@
#define ANASTASIS_TESTING_TRAIT_CHALLENGE "anastasis-challenge"
-/**
- * Obtain a challenge from @a cmd.
- *
- * @param cmd command to extract the challenge from.
- * @param index the index of the challenge
- * @param c[out] set to the challenge coming from @a cmd.
- * @return #GNUNET_OK on success.
- */
+
int
ANASTASIS_TESTING_get_trait_challenge (const struct TALER_TESTING_Command *cmd,
unsigned int index,
@@ -48,17 +41,9 @@ ANASTASIS_TESTING_get_trait_challenge (const struct TALER_TESTING_Command *cmd,
}
-/**
- * Offer a challenge.
- *
- * @param index the challenge index number.
- * @param c the challenge to offer.
- * @return #GNUNET_OK on success.
- */
struct TALER_TESTING_Trait
-ANASTASIS_TESTING_make_trait_challenge
- (unsigned int index,
- const struct ANASTASIS_Challenge *c)
+ANASTASIS_TESTING_make_trait_challenge (unsigned int index,
+ const struct ANASTASIS_Challenge *c)
{
struct TALER_TESTING_Trait ret = {
.index = index,
diff --git a/src/testing/testing_trait_core_secret.c b/src/testing/testing_trait_core_secret.c
index 100a249..98eb0db 100644
--- a/src/testing/testing_trait_core_secret.c
+++ b/src/testing/testing_trait_core_secret.c
@@ -29,14 +29,6 @@
#define ANASTASIS_TESTING_TRAIT_CORE_SECRET "anastasis-core-secret"
-/**
- * Obtain the core secret from @a cmd.
- *
- * @param cmd command to extract the core secret from.
- * @param index the index of the core secret (usually 0)
- * @param s[out] set to the core secret coming from @a cmd.
- * @return #GNUNET_OK on success.
- */
int
ANASTASIS_TESTING_get_trait_core_secret (const struct
TALER_TESTING_Command *cmd,
@@ -50,23 +42,16 @@ ANASTASIS_TESTING_get_trait_core_secret (const struct
}
-/**
- * Offer the core secret.
- *
- * @param index the core secret's index number (usually 0).
- * @param s the core secret to offer.
- * @return #GNUNET_OK on success.
- */
struct TALER_TESTING_Trait
-ANASTASIS_TESTING_make_trait_core_secret
- (unsigned int index,
- const void *s)
+ANASTASIS_TESTING_make_trait_core_secret (unsigned int index,
+ const void *s)
{
struct TALER_TESTING_Trait ret = {
.index = index,
.trait_name = ANASTASIS_TESTING_TRAIT_CORE_SECRET,
.ptr = s
};
+
return ret;
}
diff --git a/src/testing/testing_trait_policy.c b/src/testing/testing_trait_policy.c
index 45e773c..1a6e572 100644
--- a/src/testing/testing_trait_policy.c
+++ b/src/testing/testing_trait_policy.c
@@ -29,14 +29,6 @@
#define ANASTASIS_TESTING_TRAIT_POLICY "anastasis-policy"
-/**
- * Obtain a policy from @a cmd.
- *
- * @param cmd command to extract the policy from.
- * @param index the index of the policy
- * @param t[out] set to the policy coming from @a cmd.
- * @return #GNUNET_OK on success.
- */
int
ANASTASIS_TESTING_get_trait_policy (const struct TALER_TESTING_Command *cmd,
unsigned int index,
@@ -49,23 +41,16 @@ ANASTASIS_TESTING_get_trait_policy (const struct TALER_TESTING_Command *cmd,
}
-/**
- * Offer a policy.
- *
- * @param index the policy's index number.
- * @param t the policy to offer.
- * @return #GNUNET_OK on success.
- */
struct TALER_TESTING_Trait
-ANASTASIS_TESTING_make_trait_policy
- (unsigned int index,
- const struct ANASTASIS_Policy *p)
+ANASTASIS_TESTING_make_trait_policy (unsigned int index,
+ const struct ANASTASIS_Policy *p)
{
struct TALER_TESTING_Trait ret = {
.index = index,
.trait_name = ANASTASIS_TESTING_TRAIT_POLICY,
.ptr = (const void *) p
};
+
return ret;
}
diff --git a/src/testing/testing_trait_truth.c b/src/testing/testing_trait_truth.c
index 51696e1..36b33d6 100644
--- a/src/testing/testing_trait_truth.c
+++ b/src/testing/testing_trait_truth.c
@@ -29,14 +29,6 @@
#define ANASTASIS_TESTING_TRAIT_TRUTH "anastasis-truth"
-/**
- * Obtain a truth from @a cmd.
- *
- * @param cmd command to extract the truth from.
- * @param index the index of the truth
- * @param t[out] set to the truth coming from @a cmd.
- * @return #GNUNET_OK on success.
- */
int
ANASTASIS_TESTING_get_trait_truth (const struct TALER_TESTING_Command *cmd,
unsigned int index,
@@ -49,23 +41,16 @@ ANASTASIS_TESTING_get_trait_truth (const struct TALER_TESTING_Command *cmd,
}
-/**
- * Offer a truth.
- *
- * @param index the truth's index number.
- * @param t the truth to offer.
- * @return #GNUNET_OK on success.
- */
struct TALER_TESTING_Trait
-ANASTASIS_TESTING_make_trait_truth
- (unsigned int index,
- const struct ANASTASIS_Truth *t)
+ANASTASIS_TESTING_make_trait_truth (unsigned int index,
+ const struct ANASTASIS_Truth *t)
{
struct TALER_TESTING_Trait ret = {
.index = index,
.trait_name = ANASTASIS_TESTING_TRAIT_TRUTH,
.ptr = (const void *) t
};
+
return ret;
}