[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: minor fixes
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: minor fixes |
Date: |
Thu, 20 Feb 2020 10:47:27 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new c215bc0 minor fixes
c215bc0 is described below
commit c215bc003e5a4a369cf114ece810cf9f2e8477ca
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Feb 20 10:47:25 2020 +0100
minor fixes
---
src/backend/anastasis-httpd_policy_upload.c | 2 +
src/include/anastasis_crypto_lib.h | 58 ++++++++++++-----------------
src/lib/anastasis_api_policy_store.c | 32 ++++++++--------
src/lib/anastasis_api_truth_store.c | 33 ++++++++--------
src/lib/test_anastasis_api.c | 2 +
src/stasis/plugin_anastasis_postgres.c | 3 ++
6 files changed, 63 insertions(+), 67 deletions(-)
diff --git a/src/backend/anastasis-httpd_policy_upload.c
b/src/backend/anastasis-httpd_policy_upload.c
index 5fb7a0f..1d1f26f 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -316,6 +316,7 @@ proposal_cb (void *cls,
puc->response_code = MHD_HTTP_PAYMENT_REQUIRED;
}
+
/**
* Function called on all pending payments for the right
* account.
@@ -346,6 +347,7 @@ ongoing_payment_cb (void *cls,
}
}
+
/**
* Callback to process a GET /check-payment request
*
diff --git a/src/include/anastasis_crypto_lib.h
b/src/include/anastasis_crypto_lib.h
index f406aa0..25b3164 100644
--- a/src/include/anastasis_crypto_lib.h
+++ b/src/include/anastasis_crypto_lib.h
@@ -85,8 +85,7 @@ struct ANASTASIS_CRYPTO_EscrowUuid
*/
void
ANASTASIS_CRYPTO_uid_hash (const json_t *id_data,
- struct ANASTASIS_CRYPTO_UserIdentifier
- *id);
+ struct ANASTASIS_CRYPTO_UserIdentifier *id);
/**
* Generates the eddsa public Key from the private Key
@@ -98,11 +97,12 @@ ANASTASIS_CRYPTO_pubKey (const struct
ANASTASIS_CRYPTO_UserIdentifier *id,
struct ANASTASIS_AccountPubP *pub);
/**
- * Encrypts the Recoverydocument
+ * Encrypt and signs the Recoverydocument
+ *
* @param p Reference to the Recoverydocument which should be encrypted
* @param id Hashed User input, used for the generation of the encryption key
* @param res return from the result, which contains the encrypted
recoverydocument
- * and the nonce and iv used for the encryption as Additional Data
+ * and the nonce and iv used for the encryption as Additional Data
* @param res_size size of the result
* @return int Status code FIXME
*/
@@ -118,11 +118,12 @@ ANASTASIS_CRYPTO_recovery_document_encrypt (const struct
sig);
/**
- * Encrypts the Recoverydocument
+ * Encrypts the Recoverydocument -- yeah,right.
+ *
* @param id Hashed User input, used for the generation of the encryption key
* @param data, contains the encrypted Recoverydocument and the nonce and iv
used for the encryption.
* @param data_size size of the data
- * @return Decrypted Recovery Document
+ * @return Decrypted Recovery Document, or NULL on error
*/
struct ANASTASIS_RecoveryDocument *
ANASTASIS_CRYPTO_recovery_document_decrypt (const struct
@@ -151,20 +152,14 @@ ANSTASIS_CRYPTO_policy_create (const struct
struct ANASTASIS_CRYPTO_EscrowMethod *
-ANASTASIS_CRYPTO_escrow_method_create (const char *base_url,
- const char *method,
- struct
- ANASTASIS_CRYPTO_EscrowUuid *
- uuid,
- struct
- ANASTASIS_CRYPTO_truth_key *
- key,
- struct
- ANASTASIS_CRYPTO_Salt *
- salt,
- void *challenge,
- size_t challange_size
- );
+ANASTASIS_CRYPTO_escrow_method_create (
+ const char *base_url,
+ const char *method,
+ struct ANASTASIS_CRYPTO_EscrowUuid *uuid,
+ struct ANASTASIS_CRYPTO_truth_key *key,
+ struct ANASTASIS_CRYPTO_Salt *salt,
+ void *challenge,
+ size_t challange_size);
struct ANASTASIS_CRYPTO_RecoveryDocument *
@@ -177,22 +172,15 @@ ANASTASIS_CRYPTO_recovery_document_create (struct
policies,
unsigned int policies_length);
+
struct ANASTASIS_CRYPTO_TruthUploadRequest *
-ANASTASIS_CRYPTO_truth_upload_request_create (struct
-
ANASTASIS_CRYPTO_Encrypted_KeyShare
- *
- encryptedKeyShare,
- const char *method,
- struct
- ANASTASIS_CRYPTO_Nonce *
- nonce,
- struct
- ANASTASIS_CRYPTO_AES_Tag *
- aesTag,
- struct
- ANASTAIS_CRYPTO_Encrypted_Truth *
- truth,
- const char *truth_mime);
+ANASTASIS_CRYPTO_truth_upload_request_create (
+ struct ANASTASIS_CRYPTO_Encrypted_KeyShare *encryptedKeyShare,
+ const char *method,
+ struct ANASTASIS_CRYPTO_Nonce *nonce,
+ struct ANASTASIS_CRYPTO_AES_Tag *aesTag,
+ struct ANASTAIS_CRYPTO_Encrypted_Truth *truth,
+ const char *truth_mime);
struct ANASTASIS_CRYPTO_Encrypted_KeyShare *
diff --git a/src/lib/anastasis_api_policy_store.c
b/src/lib/anastasis_api_policy_store.c
index de226e5..6b66327 100644
--- a/src/lib/anastasis_api_policy_store.c
+++ b/src/lib/anastasis_api_policy_store.c
@@ -406,22 +406,22 @@ ANASTASIS_policy_store (struct GNUNET_CURL_Context *ctx,
GNUNET_free (acc_pub_str);
pso->url = (GNUNET_YES == payment_requested)
- ? TALER_url_join (backend_url,
- path,
- "pay",
- "y",
- (NULL != paid_order_id)
- ? "paying"
- : NULL,
- paid_order_id,
- NULL)
- : TALER_url_join (backend_url,
- path,
- (NULL != paid_order_id)
- ? "paying"
- : NULL,
- paid_order_id,
- NULL);
+ ? TALER_url_join (backend_url,
+ path,
+ "pay",
+ "y",
+ (NULL != paid_order_id)
+ ? "paying"
+ : NULL,
+ paid_order_id,
+ NULL)
+ : TALER_url_join (backend_url,
+ path,
+ (NULL != paid_order_id)
+ ? "paying"
+ : NULL,
+ paid_order_id,
+ NULL);
GNUNET_free (path);
}
pso->ctx = ctx;
diff --git a/src/lib/anastasis_api_truth_store.c
b/src/lib/anastasis_api_truth_store.c
index 473ff6d..85e0823 100644
--- a/src/lib/anastasis_api_truth_store.c
+++ b/src/lib/anastasis_api_truth_store.c
@@ -94,6 +94,7 @@ ANASTASIS_truth_store_cancel (struct
GNUNET_free (tso);
}
+
/**
* Callback to process POST /truth response
*
@@ -340,22 +341,22 @@ ANASTASIS_truth_store (struct GNUNET_CURL_Context *ctx,
"truth/%s",
uuid_str);
tso->url = (GNUNET_YES == payment_requested)
- ? TALER_url_join (backend_url,
- path,
- "pay",
- "y",
- (NULL != paid_order_id)
- ? "paying"
- : NULL,
- paid_order_id,
- NULL)
- : TALER_url_join (backend_url,
- path,
- (NULL != paid_order_id)
- ? "paying"
- : NULL,
- paid_order_id,
- NULL);
+ ? TALER_url_join (backend_url,
+ path,
+ "pay",
+ "y",
+ (NULL != paid_order_id)
+ ? "paying"
+ : NULL,
+ paid_order_id,
+ NULL)
+ : TALER_url_join (backend_url,
+ path,
+ (NULL != paid_order_id)
+ ? "paying"
+ : NULL,
+ paid_order_id,
+ NULL);
GNUNET_free (path);
}
else
diff --git a/src/lib/test_anastasis_api.c b/src/lib/test_anastasis_api.c
index 64c7fe5..846f60b 100644
--- a/src/lib/test_anastasis_api.c
+++ b/src/lib/test_anastasis_api.c
@@ -124,6 +124,7 @@ cmd_exec_wirewatch (char *label)
CONFIG_FILE);
}
+
/**
* Run wire transfer of funds from some user's account to the
* exchange.
@@ -142,6 +143,7 @@ cmd_transfer_to_exchange (const char *label,
payer_payto);
}
+
/**
* Main function that will tell the interpreter what commands to
* run.
diff --git a/src/stasis/plugin_anastasis_postgres.c
b/src/stasis/plugin_anastasis_postgres.c
index b2677a8..4592f9d 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -219,6 +219,7 @@ commit_transaction (void *cls)
return qs;
}
+
/**
* Function called to perform "garbage collection" on the
* database, expiring records we no longer require. Deletes
@@ -342,6 +343,7 @@ payment_by_account_cb (void *cls,
}
}
+
/**
* Lookup pending payments by account.
*
@@ -793,6 +795,7 @@ postgres_increment_lifetime (void *cls,
}
}
+
/**
* Store payment. Used to begin a payment, not indicative
* that the payment actually was made. (That is done
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: minor fixes,
gnunet <=