From ed7b39b035fa18b777b71ddc568deff2f7977c82 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 2 Aug 2021 11:46:53 +0200 Subject: -more documentation fixes --- src/include/anastasis_database_plugin.h | 48 ++++++------ src/include/anastasis_service.h | 10 +-- src/restclient/anastasis_api_keyshare_lookup.c | 2 +- src/stasis/plugin_anastasis_postgres.c | 101 ++++++++++++------------- src/testing/test_anastasis.c | 2 +- src/testing/test_anastasis_api.c | 2 +- src/testing/testing_api_cmd_config.c | 2 +- src/testing/testing_api_cmd_keyshare_lookup.c | 2 +- src/testing/testing_api_cmd_policy_lookup.c | 2 +- src/testing/testing_api_cmd_policy_store.c | 2 +- src/testing/testing_api_cmd_truth_store.c | 2 +- src/testing/testing_api_helpers.c | 2 +- src/testing/testing_api_trait_account_priv.c | 2 +- src/testing/testing_api_trait_account_pub.c | 2 +- src/testing/testing_api_trait_code.c | 2 +- src/testing/testing_api_trait_eks.c | 2 +- src/testing/testing_api_trait_hash.c | 25 ++---- src/testing/testing_api_trait_payment_secret.c | 26 ++----- src/testing/testing_api_trait_salt.c | 2 +- src/testing/testing_api_trait_truth_key.c | 2 +- src/testing/testing_api_trait_truth_uuid.c | 2 +- src/testing/testing_cmd_challenge_answer.c | 2 +- src/testing/testing_cmd_policy_create.c | 2 +- src/testing/testing_cmd_recover_secret.c | 2 +- src/testing/testing_cmd_secret_share.c | 2 +- src/testing/testing_cmd_truth_upload.c | 2 +- src/testing/testing_trait_challenge.c | 2 +- src/testing/testing_trait_core_secret.c | 2 +- src/testing/testing_trait_policy.c | 2 +- src/testing/testing_trait_truth.c | 2 +- src/util/anastasis_crypto.c | 2 +- src/util/os_installation.c | 2 +- 32 files changed, 116 insertions(+), 148 deletions(-) (limited to 'src') diff --git a/src/include/anastasis_database_plugin.h b/src/include/anastasis_database_plugin.h index 488a5af..5f52ae1 100644 --- a/src/include/anastasis_database_plugin.h +++ b/src/include/anastasis_database_plugin.h @@ -244,11 +244,11 @@ struct ANASTASIS_DatabasePlugin * Store encrypted recovery document. * * @param cls closure - * @param anastasis_pub public key of the user's account + * @param account_pub public key of the user's account * @param account_sig signature affirming storage request - * @param data_hash hash of @a data - * @param data contains encrypted_recovery_document - * @param data_size size of data blob + * @param recovery_data_hash hash of @a data + * @param recovery_data contains encrypted recovery document + * @param recovery_data_size size of @a recovery_data blob * @param payment_secret identifier for the payment, used to later charge on uploads * @param[out] version set to the version assigned to the document by the database * @return transaction status, 0 if upload could not be finished because @a payment_secret @@ -257,11 +257,11 @@ struct ANASTASIS_DatabasePlugin enum ANASTASIS_DB_StoreStatus (*store_recovery_document)( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, const struct ANASTASIS_AccountSignatureP *account_sig, - const struct GNUNET_HashCode *data_hash, - const void *data, - size_t data_size, + const struct GNUNET_HashCode *recovery_data_hash, + const void *recovery_data, + size_t recovery_data_size, const struct ANASTASIS_PaymentSecretP *payment_secret, uint32_t *version); @@ -270,7 +270,7 @@ struct ANASTASIS_DatabasePlugin * Fetch recovery document for user according given version. * * @param cls closure - * @param anastasis_pub public key of the user's account + * @param account_pub public key of the user's account * @param version the version number of the policy the user requests * @param[out] account_sig signature * @param[out] recovery_data_hash hash of the current recovery data @@ -281,7 +281,7 @@ struct ANASTASIS_DatabasePlugin enum GNUNET_DB_QueryStatus (*get_recovery_document)( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, uint32_t version, struct ANASTASIS_AccountSignatureP *account_sig, struct GNUNET_HashCode *recovery_data_hash, @@ -293,7 +293,7 @@ struct ANASTASIS_DatabasePlugin * Fetch latest recovery document for user. * * @param cls closure - * @param anastasis_pub public key of the user's account + * @param account_pub public key of the user's account * @param account_sig signature * @param recovery_data_hash hash of the current recovery data * @param[out] data_size set to size of @a data blob @@ -304,7 +304,7 @@ struct ANASTASIS_DatabasePlugin enum GNUNET_DB_QueryStatus (*get_latest_recovery_document)( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, struct ANASTASIS_AccountSignatureP *account_sig, struct GNUNET_HashCode *recovery_data_hash, size_t *data_size, @@ -318,11 +318,10 @@ struct ANASTASIS_DatabasePlugin * @param cls closure * @param truth_uuid the identifier for the Truth * @param key_share_data contains information of an EncryptedKeyShare - * @param method name of method - * @param nonce nonce used to compute encryption key for encrypted_truth - * @param aes_gcm_tag authentication tag of encrypted_truth + * @param mime_type presumed mime type of data in @a encrypted_truth * @param encrypted_truth contains the encrypted Truth which includes the ground truth i.e. H(challenge answer), phonenumber, SMS * @param encrypted_truth_size the size of the Truth + * @param method name of method * @param truth_expiration time till the according data will be stored * @return transaction status */ @@ -379,7 +378,7 @@ struct ANASTASIS_DatabasePlugin * current @a recovery_document_hash. * * @param cls closure - * @param anastasis_pub account identifier + * @param account_pub account identifier * @param[out] paid_until until when is the account paid up? * @param[out] recovery_data_hash set to hash of @a recovery document * @param[out] version set to the recovery policy version @@ -388,7 +387,7 @@ struct ANASTASIS_DatabasePlugin enum ANASTASIS_DB_AccountStatus (*lookup_account)( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, struct GNUNET_TIME_Absolute *paid_until, struct GNUNET_HashCode *recovery_data_hash, uint32_t *version); @@ -420,7 +419,6 @@ struct ANASTASIS_DatabasePlugin * @param payment_secret payment secret which the user must provide with every upload * @param truth_uuid unique identifier of the truth the user must satisfy the challenge * @param[out] paid bool value to show if payment is paid - * @param[out] valid_counter bool value to show if post_counter is > 0 * @return transaction status */ enum GNUNET_DB_QueryStatus @@ -444,7 +442,7 @@ struct ANASTASIS_DatabasePlugin enum GNUNET_DB_QueryStatus (*increment_lifetime)( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, const struct ANASTASIS_PaymentSecretP *payment_identifier, struct GNUNET_TIME_Relative lifetime, struct GNUNET_TIME_Absolute *paid_until); @@ -463,7 +461,7 @@ struct ANASTASIS_DatabasePlugin enum GNUNET_DB_QueryStatus (*update_lifetime)( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, const struct ANASTASIS_PaymentSecretP *payment_identifier, struct GNUNET_TIME_Absolute eol); @@ -474,7 +472,7 @@ struct ANASTASIS_DatabasePlugin * when we increment the account's lifetime.) * * @param cls closure - * @param anastasis_pub anastasis's public key + * @param account_pub anastasis's public key * @param post_counter how many uploads does @a amount pay for * @param payment_secret payment secret which the user must provide with every upload * @param amount how much we asked for @@ -483,7 +481,7 @@ struct ANASTASIS_DatabasePlugin enum GNUNET_DB_QueryStatus (*record_recdoc_payment)( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, uint32_t post_counter, const struct ANASTASIS_PaymentSecretP *payment_secret, const struct TALER_Amount *amount); @@ -527,14 +525,14 @@ struct ANASTASIS_DatabasePlugin * does not match, the retry counter will be decreased by one. * * @param cls closure - * @param truth_pub identification of the challenge which the code corresponds to + * @param truth_uuid identification of the challenge which the code corresponds to * @param hashed_code code which the user provided and wants to verify * @return transaction status */ enum ANASTASIS_DB_CodeStatus (*verify_challenge_code)( void *cls, - const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_pub, + const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, const struct GNUNET_HashCode *hashed_code); /** @@ -600,7 +598,7 @@ struct ANASTASIS_DatabasePlugin * Record refund for challenge. * * @param cls closure - * @param truth_key identifier of the challenge to pay + * @param truth_uuid identifier of the challenge to refund * @param payment_secret payment secret which the user must provide with every upload * @return transaction status */ diff --git a/src/include/anastasis_service.h b/src/include/anastasis_service.h index 98ac490..9069035 100644 --- a/src/include/anastasis_service.h +++ b/src/include/anastasis_service.h @@ -388,11 +388,11 @@ typedef void * @param recovery_data policy data to be stored * @param recovery_data_size number of bytes in @a recovery_data * @param payment_years_requested for how many years would the client like the service to store the truth? - * @param paid_order_id payment identifier of last payment + * @param payment_secret payment identifier of last payment * @param payment_timeout how long to wait for the payment, use * #GNUNET_TIME_UNIT_ZERO to let the server pick * @param cb callback processing the response from /policy - * @param cb_cls closure for cb + * @param cb_cls closure for @a cb * @return handle for the operation */ struct ANASTASIS_PolicyStoreOperation * @@ -605,10 +605,10 @@ typedef void * * @param ctx execution context * @param backend_url base URL of the merchant backend - * @param truth_public_key identification of the Truth + * @param truth_uuid identification of the Truth * @param truth_key Key used to Decrypt the Truth on the Server * @param payment_secret secret from the previously done payment NULL to trigger payment - * @param payment_timeout how long to wait for the payment, use + * @param timeout how long to wait for the payment, use * #GNUNET_TIME_UNIT_ZERO to let the server pick * @param hashed_answer hashed answer to the challenge * @param cb callback which will work the response gotten from the backend @@ -631,7 +631,7 @@ ANASTASIS_keyshare_lookup ( /** * Cancel a GET /truth request. * - * @param tlo cancel the truth lookup operation + * @param kslo cancel the key share lookup operation */ void ANASTASIS_keyshare_lookup_cancel ( diff --git a/src/restclient/anastasis_api_keyshare_lookup.c b/src/restclient/anastasis_api_keyshare_lookup.c index b61fe20..0750391 100644 --- a/src/restclient/anastasis_api_keyshare_lookup.c +++ b/src/restclient/anastasis_api_keyshare_lookup.c @@ -268,7 +268,7 @@ handle_keyshare_lookup_finished (void *cls, /** * Patch value in @a val, replacing new line with '\0'. * - * @param[in,out] 0-terminated string to replace '\n'/'\r' with '\0' in. + * @param[in,out] val 0-terminated string to replace '\\n' and '\\r' with '\\0' in. */ static void patch_value (char *val) diff --git a/src/stasis/plugin_anastasis_postgres.c b/src/stasis/plugin_anastasis_postgres.c index 0ece276..0915d24 100644 --- a/src/stasis/plugin_anastasis_postgres.c +++ b/src/stasis/plugin_anastasis_postgres.c @@ -96,7 +96,7 @@ postgres_drop_tables (void *cls) /** * Check that the database connection is still up. * - * @param pg connection to check + * @param cls a `struct PostgresClosure` with connection to check */ static void check_connection (void *cls) @@ -271,11 +271,11 @@ postgres_gc (void *cls, * Store encrypted recovery document. * * @param cls closure - * @param anastasis_pub public key of the user's account + * @param account_pub public key of the user's account * @param account_sig signature affirming storage request - * @param data_hash hash of @a data - * @param data contains encrypted_recovery_document - * @param data_size size of data blob + * @param recovery_data_hash hash of @a data + * @param recovery_data contains encrypted_recovery_document + * @param recovery_data_size size of data blob * @param payment_secret identifier for the payment, used to later charge on uploads * @param[out] version set to the version assigned to the document by the database * @return transaction status, 0 if upload could not be finished because @a payment_secret @@ -284,7 +284,7 @@ postgres_gc (void *cls, static enum ANASTASIS_DB_StoreStatus postgres_store_recovery_document ( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, const struct ANASTASIS_AccountSignatureP *account_sig, const struct GNUNET_HashCode *recovery_data_hash, const void *recovery_data, @@ -311,7 +311,7 @@ postgres_store_recovery_document ( { struct GNUNET_HashCode dh; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -358,7 +358,7 @@ postgres_store_recovery_document ( /* First, check if account exists */ { struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -391,7 +391,7 @@ postgres_store_recovery_document ( /* lookup if the user has enough uploads left and decrement */ { struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_auto_from_type (payment_secret), GNUNET_PQ_query_param_end }; @@ -432,7 +432,7 @@ postgres_store_recovery_document ( { struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_uint32 (&postcounter), - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_auto_from_type (payment_secret), GNUNET_PQ_query_param_end }; @@ -465,7 +465,7 @@ postgres_store_recovery_document ( /* finally, actually insert the recovery document */ { struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_uint32 (version), GNUNET_PQ_query_param_auto_from_type (account_sig), GNUNET_PQ_query_param_auto_from_type (recovery_data_hash), @@ -508,7 +508,7 @@ retry: * Increment account lifetime. * * @param cls closure - * @param anastasis_pub which account received a payment + * @param account_pub which account received a payment * @param payment_identifier proof of payment, must be unique and match pending payment * @param lifetime for how long is the account now paid (increment) * @param[out] paid_until set to the end of the lifetime after the operation @@ -517,7 +517,7 @@ retry: static enum GNUNET_DB_QueryStatus postgres_increment_lifetime ( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, const struct ANASTASIS_PaymentSecretP *payment_identifier, struct GNUNET_TIME_Relative lifetime, struct GNUNET_TIME_Absolute *paid_until) @@ -539,7 +539,7 @@ postgres_increment_lifetime ( { struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (payment_identifier), - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, @@ -565,7 +565,7 @@ postgres_increment_lifetime ( { enum GNUNET_DB_QueryStatus qs2; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; struct GNUNET_TIME_Absolute expiration; @@ -598,7 +598,7 @@ postgres_increment_lifetime ( { /* user does not exist, create new one */ struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_absolute_time (&expiration), GNUNET_PQ_query_param_end }; @@ -620,7 +620,7 @@ postgres_increment_lifetime ( rollback (pg); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Payment existed, lifetime of account %s unchanged at %s\n", - TALER_B2S (anastasis_pub), + TALER_B2S (account_pub), GNUNET_STRINGS_absolute_time_to_string (*paid_until)); return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS; } @@ -629,7 +629,7 @@ postgres_increment_lifetime ( /* user exists, update expiration_date */ struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_absolute_time (&expiration), - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; @@ -667,7 +667,7 @@ postgres_increment_lifetime ( return GNUNET_DB_STATUS_HARD_ERROR; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Incremented lifetime of account %s to %s\n", - TALER_B2S (anastasis_pub), + TALER_B2S (account_pub), GNUNET_STRINGS_absolute_time_to_string (*paid_until)); return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT; retry: @@ -690,7 +690,7 @@ retry: static enum GNUNET_DB_QueryStatus postgres_update_lifetime ( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, const struct ANASTASIS_PaymentSecretP *payment_identifier, struct GNUNET_TIME_Absolute eol) { @@ -711,7 +711,7 @@ postgres_update_lifetime ( { struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (payment_identifier), - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, @@ -726,14 +726,14 @@ postgres_update_lifetime ( rollback (pg); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Payment existed, lifetime of account %s unchanged\n", - TALER_B2S (anastasis_pub)); + TALER_B2S (account_pub)); return qs; } } { struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; struct GNUNET_TIME_Absolute expiration; @@ -758,7 +758,7 @@ postgres_update_lifetime ( { /* user does not exist, create new one */ struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_absolute_time (&eol), GNUNET_PQ_query_param_end }; @@ -770,7 +770,7 @@ postgres_update_lifetime ( params); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Created new account %s with expiration %s\n", - TALER_B2S (anastasis_pub), + TALER_B2S (account_pub), GNUNET_STRINGS_absolute_time_to_string (eol)); } break; @@ -779,7 +779,7 @@ postgres_update_lifetime ( /* user exists, update expiration_date */ struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_absolute_time (&expiration), - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; @@ -792,7 +792,7 @@ postgres_update_lifetime ( params); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Updated account %s to new expiration %s\n", - TALER_B2S (anastasis_pub), + TALER_B2S (account_pub), GNUNET_STRINGS_absolute_time_to_string (expiration)); } break; @@ -832,7 +832,7 @@ retry: * when we increment the account's lifetime.) * * @param cls closure - * @param anastasis_pub anastasis's public key + * @param account_pub anastasis's public key * @param post_counter how many uploads does @a amount pay for * @param payment_secret payment secret which the user must provide with every upload * @param amount how much we asked for @@ -841,7 +841,7 @@ retry: static enum GNUNET_DB_QueryStatus postgres_record_recdoc_payment ( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, uint32_t post_counter, const struct ANASTASIS_PaymentSecretP *payment_secret, const struct TALER_Amount *amount) @@ -850,7 +850,7 @@ postgres_record_recdoc_payment ( struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); struct GNUNET_TIME_Absolute expiration; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_uint32 (&post_counter), TALER_PQ_query_param_amount (amount), GNUNET_PQ_query_param_auto_from_type (payment_secret), @@ -866,7 +866,7 @@ postgres_record_recdoc_payment ( if user exists, and if not, create one */ { struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -893,7 +893,7 @@ postgres_record_recdoc_payment ( struct GNUNET_TIME_Absolute exp = GNUNET_TIME_relative_to_absolute (TRANSIENT_LIFETIME); struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_absolute_time (&exp), GNUNET_PQ_query_param_end }; @@ -915,7 +915,7 @@ postgres_record_recdoc_payment ( /* successful, continue below */ GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Created new account %s with transient life until %s\n", - TALER_B2S (anastasis_pub), + TALER_B2S (account_pub), GNUNET_STRINGS_absolute_time_to_string (exp)); break; } @@ -1004,7 +1004,7 @@ postgres_check_truth_upload_paid ( * Store payment for challenge. * * @param cls closure - * @param truth_key identifier of the challenge to pay + * @param truth_uuid identifier of the challenge to pay * @param payment_secret payment secret which the user must provide with every upload * @param amount how much we asked for * @return transaction status @@ -1037,7 +1037,7 @@ postgres_record_challenge_payment ( * Store refund granted for challenge. * * @param cls closure - * @param truth_key identifier of the challenge to pay + * @param truth_uuid identifier of the challenge to refund * @param payment_secret payment secret which the user must provide with every upload * @return transaction status */ @@ -1067,8 +1067,8 @@ postgres_record_challenge_refund ( * * @param cls closure * @param payment_secret payment secret which the user must provide with every upload + * @param truth_uuid which truth should we check the payment status of * @param[out] paid bool value to show if payment is paid - * @param[out] valid_counter bool value to show if post_counter is > 0 * @return transaction status */ static enum GNUNET_DB_QueryStatus @@ -1159,11 +1159,10 @@ postgres_check_payment_identifier ( * @param cls closure * @param truth_uuid the identifier for the Truth * @param key_share_data contains information of an EncryptedKeyShare - * @param method name of method - * @param nonce nonce used to compute encryption key for encrypted_truth - * @param aes_gcm_tag authentication tag of encrypted_truth + * @param mime_type presumed mime type of data in @a encrypted_truth * @param encrypted_truth contains the encrypted Truth which includes the ground truth i.e. H(challenge answer), phonenumber, SMS * @param encrypted_truth_size the size of the Truth + * @param method name of method * @param truth_expiration time till the according data will be stored * @return transaction status */ @@ -1284,7 +1283,7 @@ postgres_get_key_share ( * current @a recovery_document_hash. * * @param cls closure - * @param anastasis_pub account identifier + * @param account_pub account identifier * @param[out] paid_until until when is the account paid up? * @param[out] recovery_data_hash set to hash of @a recovery document * @param[out] version set to the recovery policy version @@ -1293,14 +1292,14 @@ postgres_get_key_share ( enum ANASTASIS_DB_AccountStatus postgres_lookup_account ( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, struct GNUNET_TIME_Absolute *paid_until, struct GNUNET_HashCode *recovery_data_hash, uint32_t *version) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; enum GNUNET_DB_QueryStatus qs; @@ -1377,18 +1376,18 @@ postgres_lookup_account ( * Fetch latest recovery document for user. * * @param cls closure - * @param anastasis_pub public key of the user's account + * @param account_pub public key of the user's account * @param account_sig signature * @param recovery_data_hash hash of the current recovery data * @param data_size size of data blob * @param data blob which contains the recovery document - * @param version[OUT] set to the version number of the policy being returned + * @param[out] version set to the version number of the policy being returned * @return transaction status */ enum GNUNET_DB_QueryStatus postgres_get_latest_recovery_document ( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, struct ANASTASIS_AccountSignatureP *account_sig, struct GNUNET_HashCode *recovery_data_hash, size_t *data_size, @@ -1397,7 +1396,7 @@ postgres_get_latest_recovery_document ( { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -1426,7 +1425,7 @@ postgres_get_latest_recovery_document ( * Fetch recovery document for user according given version. * * @param cls closure - * @param anastasis_pub public key of the user's account + * @param account_pub public key of the user's account * @param version the version number of the policy the user requests * @param[out] account_sig signature * @param[out] recovery_data_hash hash of the current recovery data @@ -1437,7 +1436,7 @@ postgres_get_latest_recovery_document ( enum GNUNET_DB_QueryStatus postgres_get_recovery_document ( void *cls, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, + const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, uint32_t version, struct ANASTASIS_AccountSignatureP *account_sig, struct GNUNET_HashCode *recovery_data_hash, @@ -1446,7 +1445,7 @@ postgres_get_recovery_document ( { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_auto_from_type (anastasis_pub), + GNUNET_PQ_query_param_auto_from_type (account_pub), GNUNET_PQ_query_param_uint32 (&version), GNUNET_PQ_query_param_end }; @@ -1509,7 +1508,7 @@ struct CheckValidityContext * * @param cls closure of type `struct CheckValidityContext *` * @param result the postgres result - * @param num_result the number of results in @a result + * @param num_results the number of results in @a result */ static void check_valid_code (void *cls, @@ -1578,7 +1577,7 @@ check_valid_code (void *cls, * does not match, the retry counter will be decreased by one. * * @param cls closure - * @param truth_pub identification of the challenge which the code corresponds to + * @param truth_uuid identification of the challenge which the code corresponds to * @param hashed_code code which the user provided and wants to verify * @return code validity status */ diff --git a/src/testing/test_anastasis.c b/src/testing/test_anastasis.c index 2ff7cb0..9af9911 100644 --- a/src/testing/test_anastasis.c +++ b/src/testing/test_anastasis.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/test_anastasis.c + * @file testing/test_anastasis.c * @brief testcase to test anastasis * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/test_anastasis_api.c b/src/testing/test_anastasis_api.c index db18b41..8d40e02 100644 --- a/src/testing/test_anastasis_api.c +++ b/src/testing/test_anastasis_api.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/test_anastasis_api.c + * @file testing/test_anastasis_api.c * @brief testcase to test anastasis' HTTP API interface * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/testing_api_cmd_config.c b/src/testing/testing_api_cmd_config.c index 8906261..7ff42c9 100644 --- a/src/testing/testing_api_cmd_config.c +++ b/src/testing/testing_api_cmd_config.c @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ /** - * @file lib/testing_api_cmd_config.c + * @file testing/testing_api_cmd_config.c * @brief command to obtain the configuration of an anastasis backend service. * @author Dennis Neufeld * @author Dominik Meister diff --git a/src/testing/testing_api_cmd_keyshare_lookup.c b/src/testing/testing_api_cmd_keyshare_lookup.c index 895d321..efc8c9a 100644 --- a/src/testing/testing_api_cmd_keyshare_lookup.c +++ b/src/testing/testing_api_cmd_keyshare_lookup.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/anastasis_api_keyshare_lookup.c + * @file testing/anastasis_api_keyshare_lookup.c * @brief Testing of Implementation of the /truth GET * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/testing_api_cmd_policy_lookup.c b/src/testing/testing_api_cmd_policy_lookup.c index e97f746..0906491 100644 --- a/src/testing/testing_api_cmd_policy_lookup.c +++ b/src/testing/testing_api_cmd_policy_lookup.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/testing_api_cmd_policy_lookup.c + * @file testing/testing_api_cmd_policy_lookup.c * @brief command to execute the anastasis backend service. * @author Dennis Neufeld * @author Dominik Meister diff --git a/src/testing/testing_api_cmd_policy_store.c b/src/testing/testing_api_cmd_policy_store.c index a8f0a70..d5062c0 100644 --- a/src/testing/testing_api_cmd_policy_store.c +++ b/src/testing/testing_api_cmd_policy_store.c @@ -18,7 +18,7 @@ */ /** - * @file lib/testing_api_cmd_policy_store.c + * @file testing/testing_api_cmd_policy_store.c * @brief command to execute the anastasis backend service. * @author Christian Grothoff * @author Dominik Meister diff --git a/src/testing/testing_api_cmd_truth_store.c b/src/testing/testing_api_cmd_truth_store.c index 0883406..40c4d32 100644 --- a/src/testing/testing_api_cmd_truth_store.c +++ b/src/testing/testing_api_cmd_truth_store.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/testing_api_cmd_truth_store.c + * @file testing/testing_api_cmd_truth_store.c * @brief command to execute the anastasis backend service. * @author Dennis Neufeld */ diff --git a/src/testing/testing_api_helpers.c b/src/testing/testing_api_helpers.c index 66e7032..fb3cb48 100644 --- a/src/testing/testing_api_helpers.c +++ b/src/testing/testing_api_helpers.c @@ -18,7 +18,7 @@ */ /** - * @file lib/testing_api_helpers.c + * @file testing/testing_api_helpers.c * @brief helper functions for test library. * @author Christian Grothoff * @author Marcello Stanisci diff --git a/src/testing/testing_api_trait_account_priv.c b/src/testing/testing_api_trait_account_priv.c index 4860e82..a40e9d2 100644 --- a/src/testing/testing_api_trait_account_priv.c +++ b/src/testing/testing_api_trait_account_priv.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_account_priv.c + * @file testing/testing_api_trait_account_priv.c * @brief traits to offer a account_priv * @author Christian Grothoff */ diff --git a/src/testing/testing_api_trait_account_pub.c b/src/testing/testing_api_trait_account_pub.c index 5a3632e..19ba79f 100644 --- a/src/testing/testing_api_trait_account_pub.c +++ b/src/testing/testing_api_trait_account_pub.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_account_pub.c + * @file testing/testing_api_trait_account_pub.c * @brief traits to offer a account_pub * @author Christian Grothoff */ diff --git a/src/testing/testing_api_trait_code.c b/src/testing/testing_api_trait_code.c index 1a43cf8..9989dec 100644 --- a/src/testing/testing_api_trait_code.c +++ b/src/testing/testing_api_trait_code.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_string.c + * @file testing/testing_api_trait_string.c * @brief traits to offers a code for a challenge * @author Dominik Meister * @author Christian Grothoff diff --git a/src/testing/testing_api_trait_eks.c b/src/testing/testing_api_trait_eks.c index dc3f923..f374433 100644 --- a/src/testing/testing_api_trait_eks.c +++ b/src/testing/testing_api_trait_eks.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_eks.c + * @file testing/testing_api_trait_eks.c * @brief traits to offer a payment identifier * @author Dennis Neufeld */ diff --git a/src/testing/testing_api_trait_hash.c b/src/testing/testing_api_trait_hash.c index 18be1ea..fb5015e 100644 --- a/src/testing/testing_api_trait_hash.c +++ b/src/testing/testing_api_trait_hash.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_hash.c + * @file testing/testing_api_trait_hash.c * @brief traits to offer a hash * @author Christian Grothoff */ @@ -27,17 +27,9 @@ #define ANASTASIS_TESTING_TRAIT_HASH "anastasis-hash" -/** - * Obtain a hash from @a cmd. - * - * @param cmd command to extract the number from. - * @param index the number's index number. - * @param n[out] set to the number coming from @a cmd. - * @return #GNUNET_OK on success. - */ int -ANASTASIS_TESTING_get_trait_hash - (const struct TALER_TESTING_Command *cmd, +ANASTASIS_TESTING_get_trait_hash ( + const struct TALER_TESTING_Command *cmd, unsigned int index, const struct GNUNET_HashCode **h) { @@ -48,16 +40,9 @@ ANASTASIS_TESTING_get_trait_hash } -/** - * Offer a hash. - * - * @param index the number's index number. - * @param h the hash to offer. - * @return #GNUNET_OK on success. - */ struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_hash - (unsigned int index, +ANASTASIS_TESTING_make_trait_hash ( + unsigned int index, const struct GNUNET_HashCode *h) { struct TALER_TESTING_Trait ret = { diff --git a/src/testing/testing_api_trait_payment_secret.c b/src/testing/testing_api_trait_payment_secret.c index 6238879..c885fb7 100644 --- a/src/testing/testing_api_trait_payment_secret.c +++ b/src/testing/testing_api_trait_payment_secret.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_payment_secret.c + * @file testing/testing_api_trait_payment_secret.c * @brief traits to offer a payment identifier * @author Dennis Neufeld */ @@ -28,17 +28,9 @@ "anastasis-payment_secret" -/** - * Obtain an account public key from @a cmd. - * - * @param cmd command to extract the payment identifier from. - * @param index the payment identifier's index number. - * @param n[out] set to the payment identifier coming from @a cmd. - * @return #GNUNET_OK on success. - */ int -ANASTASIS_TESTING_get_trait_payment_secret - (const struct TALER_TESTING_Command *cmd, +ANASTASIS_TESTING_get_trait_payment_secret ( + const struct TALER_TESTING_Command *cmd, unsigned int index, const struct ANASTASIS_PaymentSecretP **payment_secret) { @@ -49,16 +41,9 @@ ANASTASIS_TESTING_get_trait_payment_secret } -/** - * Offer a payment identifier. - * - * @param index usually zero - * @param h the payment identifier to offer. - * @return #GNUNET_OK on success. - */ struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_payment_secret - (unsigned int index, +ANASTASIS_TESTING_make_trait_payment_secret ( + unsigned int index, const struct ANASTASIS_PaymentSecretP *h) { struct TALER_TESTING_Trait ret = { @@ -66,6 +51,7 @@ ANASTASIS_TESTING_make_trait_payment_secret .trait_name = ANASTASIS_TESTING_TRAIT_PAYMENT_SECRET, .ptr = (const void *) h }; + return ret; } diff --git a/src/testing/testing_api_trait_salt.c b/src/testing/testing_api_trait_salt.c index c4ceb55..54b9937 100644 --- a/src/testing/testing_api_trait_salt.c +++ b/src/testing/testing_api_trait_salt.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_salt.c + * @file testing/testing_api_trait_salt.c * @brief traits to offer a hash * @author Christian Grothoff * @author Dominik Meister diff --git a/src/testing/testing_api_trait_truth_key.c b/src/testing/testing_api_trait_truth_key.c index 55094c1..efc1723 100644 --- a/src/testing/testing_api_trait_truth_key.c +++ b/src/testing/testing_api_trait_truth_key.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_truth_key.c + * @file testing/testing_api_trait_truth_key.c * @brief traits to offer a payment identifier * @author Dennis Neufeld */ diff --git a/src/testing/testing_api_trait_truth_uuid.c b/src/testing/testing_api_trait_truth_uuid.c index 6c171fd..eb18d29 100644 --- a/src/testing/testing_api_trait_truth_uuid.c +++ b/src/testing/testing_api_trait_truth_uuid.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_api_trait_truth_uuid.c + * @file testing/testing_api_trait_truth_uuid.c * @brief traits to offer a UUID for some truth * @author Christian Grothoff * @author Dominik Meister diff --git a/src/testing/testing_cmd_challenge_answer.c b/src/testing/testing_cmd_challenge_answer.c index bca7d6b..5f0c157 100644 --- a/src/testing/testing_cmd_challenge_answer.c +++ b/src/testing/testing_cmd_challenge_answer.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/testing_cmd_challenge_answer.c + * @file testing/testing_cmd_challenge_answer.c * @brief command to execute the anastasis recovery service * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/testing_cmd_policy_create.c b/src/testing/testing_cmd_policy_create.c index 964fb91..7f3b312 100644 --- a/src/testing/testing_cmd_policy_create.c +++ b/src/testing/testing_cmd_policy_create.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/testing_cmd_policy_create.c + * @file testing/testing_cmd_policy_create.c * @brief command to execute the anastasis secret share service * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/testing_cmd_recover_secret.c b/src/testing/testing_cmd_recover_secret.c index 6fc3861..5c0f098 100644 --- a/src/testing/testing_cmd_recover_secret.c +++ b/src/testing/testing_cmd_recover_secret.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/testing_cmd_recover_secret.c + * @file testing/testing_cmd_recover_secret.c * @brief command to execute the anastasis recovery service * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/testing_cmd_secret_share.c b/src/testing/testing_cmd_secret_share.c index cecfd86..3b8c3b2 100644 --- a/src/testing/testing_cmd_secret_share.c +++ b/src/testing/testing_cmd_secret_share.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/testing_cmd_secret_share.c + * @file testing/testing_cmd_secret_share.c * @brief command to execute the anastasis secret share service * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/testing_cmd_truth_upload.c b/src/testing/testing_cmd_truth_upload.c index 87dec9d..233905a 100644 --- a/src/testing/testing_cmd_truth_upload.c +++ b/src/testing/testing_cmd_truth_upload.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/testing_cmd_truth_upload.c + * @file testing/testing_cmd_truth_upload.c * @brief command to execute the anastasis secret share service * @author Christian Grothoff * @author Dennis Neufeld diff --git a/src/testing/testing_trait_challenge.c b/src/testing/testing_trait_challenge.c index da981d7..dc82f9a 100644 --- a/src/testing/testing_trait_challenge.c +++ b/src/testing/testing_trait_challenge.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_trait_challenge.c + * @file testing/testing_trait_challenge.c * @brief traits to offer a challenge * @author Christian Grothoff * @author Dominik Meister diff --git a/src/testing/testing_trait_core_secret.c b/src/testing/testing_trait_core_secret.c index 98eb0db..b3dec63 100644 --- a/src/testing/testing_trait_core_secret.c +++ b/src/testing/testing_trait_core_secret.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_trait_core_secret.c + * @file testing/testing_trait_core_secret.c * @brief traits to offer the core secret * @author Christian Grothoff * @author Dominik Meister diff --git a/src/testing/testing_trait_policy.c b/src/testing/testing_trait_policy.c index 1a6e572..8cf1d76 100644 --- a/src/testing/testing_trait_policy.c +++ b/src/testing/testing_trait_policy.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_trait_policy.c + * @file testing/testing_trait_policy.c * @brief traits to offer a policy * @author Christian Grothoff * @author Dominik Meister diff --git a/src/testing/testing_trait_truth.c b/src/testing/testing_trait_truth.c index 36b33d6..3ef9dd8 100644 --- a/src/testing/testing_trait_truth.c +++ b/src/testing/testing_trait_truth.c @@ -17,7 +17,7 @@ */ /** - * @file lib/testing_trait_truth.c + * @file testing/testing_trait_truth.c * @brief traits to offer a truth * @author Christian Grothoff * @author Dominik Meister diff --git a/src/util/anastasis_crypto.c b/src/util/anastasis_crypto.c index 837cd88..3ab7593 100644 --- a/src/util/anastasis_crypto.c +++ b/src/util/anastasis_crypto.c @@ -14,7 +14,7 @@ Anastasis; see the file COPYING.GPL. If not, see */ /** - * @file lib/anastasis_crypto.c + * @file util/anastasis_crypto.c * @brief anastasis crypto api * @author Christian Grothoff * @author Dominik Meister diff --git a/src/util/os_installation.c b/src/util/os_installation.c index a4e74cf..cfcf3c3 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -19,7 +19,7 @@ */ /** - * @file os_installation.c + * @file anastasis/src/util/os_installation.c * @brief initialize libgnunet OS subsystem for Anastasis. * @author Christian Grothoff */ -- cgit v1.2.3