[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: wild truth authorization plugin
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: wild truth authorization plugin hacking -- untested |
Date: |
Wed, 09 Sep 2020 15:29:25 +0200 |
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 44b4e5a wild truth authorization plugin hacking -- untested
44b4e5a is described below
commit 44b4e5affded06f2f3494d015affe619640647fa
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Sep 9 15:28:56 2020 +0200
wild truth authorization plugin hacking -- untested
---
src/backend/anastasis-httpd.c | 12 +-
src/backend/anastasis-httpd.h | 7 +
src/backend/anastasis-httpd_config.c | 1 +
src/backend/anastasis-httpd_policy_upload.c | 22 +-
src/backend/anastasis-httpd_terms.c | 1 +
src/backend/anastasis-httpd_truth.c | 398 ++++++++++++++++++++++++----
src/backend/anastasis-httpd_truth.h | 10 +-
src/cli/anastasis-cli-assembler.c | 6 +-
src/cli/anastasis-cli-splitter.c | 4 +-
src/include/Makefile.am | 1 +
src/include/anastasis_testing_lib.h | 2 +
src/lib/anastasis_api_config.c | 1 +
src/lib/anastasis_api_keyshare_lookup.c | 1 +
src/lib/anastasis_api_salt.c | 1 +
src/lib/test_anastasis_api.c | 1 -
src/lib/testing_cmd_challenge_answer.c | 2 +
src/lib/testing_cmd_recover_secret.c | 3 +
src/lib/testing_cmd_secret_share.c | 1 +
src/lib/testing_trait_challenge.c | 2 +
src/util/anastasis_crypto.c | 2 +
20 files changed, 397 insertions(+), 81 deletions(-)
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index d321a15..30f3eff 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -55,6 +55,8 @@ char *AH_supported_methods;
*/
struct TALER_Amount AH_annual_fee;
+const struct GNUNET_CONFIGURATION_Handle *AH_cfg;
+
/**
* Cost of authentication by question
* FIXME: Implement a more elegant way to
@@ -257,12 +259,10 @@ url_handler (void *cls,
&TMH_MHD_handler_static_response, MHD_HTTP_NOT_FOUND
};
- struct TM_HandlerContext *hc;
+ struct TM_HandlerContext *hc = *con_cls;
struct GNUNET_AsyncScopeId aid;
const char *correlation_id = NULL;
- hc = *con_cls;
-
if (NULL == hc)
{
GNUNET_async_scope_fresh (&aid);
@@ -335,7 +335,7 @@ url_handler (void *cls,
{
return AH_handler_truth_get (connection,
url,
- con_cls);
+ hc);
}
if (0 == strcmp (method,
MHD_HTTP_METHOD_POST))
@@ -414,6 +414,7 @@ do_shutdown (void *cls)
{
(void) cls;
AH_resume_all_bc ();
+ AH_truth_shutdown ();
if (NULL != mhd_task)
{
GNUNET_SCHEDULER_cancel (mhd_task);
@@ -483,7 +484,7 @@ handle_mhd_completion_callback (void *cls,
* @param daemon_handle HTTP server to prepare to run
*/
static struct GNUNET_SCHEDULER_Task *
-prepare_daemon ()
+prepare_daemon (void)
{
struct GNUNET_SCHEDULER_Task *ret;
fd_set rs;
@@ -554,6 +555,7 @@ run (void *cls,
if (TMH_anastasis_connection_close)
go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE;
TALER_MHD_setup (go);
+ AH_cfg = config;
result = GNUNET_SYSERR;
GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
NULL);
diff --git a/src/backend/anastasis-httpd.h b/src/backend/anastasis-httpd.h
index 478de60..c54003f 100644
--- a/src/backend/anastasis-httpd.h
+++ b/src/backend/anastasis-httpd.h
@@ -118,6 +118,11 @@ struct TM_HandlerContext
*/
TM_ContextCleanup cc;
+ /**
+ * Handler-specific context.
+ */
+ void *ctx;
+
/**
* Which request handler is handling this request?
*/
@@ -168,6 +173,8 @@ extern char *AH_currency;
*/
extern char *AH_supported_methods;
+extern const struct GNUNET_CONFIGURATION_Handle *AH_cfg;
+
/**
* Our fulfillment URL
*/
diff --git a/src/backend/anastasis-httpd_config.c
b/src/backend/anastasis-httpd_config.c
index 2d56a5f..0abf4b5 100644
--- a/src/backend/anastasis-httpd_config.c
+++ b/src/backend/anastasis-httpd_config.c
@@ -59,4 +59,5 @@ AH_handler_config (struct TMH_RequestHandler *rh,
"0.0");
}
+
/* end of anastasis-httpd_config.c */
\ No newline at end of file
diff --git a/src/backend/anastasis-httpd_policy_upload.c
b/src/backend/anastasis-httpd_policy_upload.c
index b0fbee2..c3e2b5e 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -423,8 +423,7 @@ check_payment_cb (void *cls,
* FIXME: DELETE
GNUNET_break ( (GNUNET_NO == refunded) &&
(NULL == refund_amount) );
- */
- if (osr->paid)
+ */if (osr->paid)
{
enum ANASTASIS_DB_QueryStatus qs;
@@ -861,13 +860,13 @@ AH_handler_policy_post (struct MHD_Connection *connection,
pay_id = MHD_lookup_connection_value (connection,
MHD_HEADER_KIND,
"Payment-Identifier");
- if ( pay_id &&
- (GNUNET_OK !=
- GNUNET_STRINGS_string_to_data (pay_id,
- strlen (pay_id),
- &puc->payment_identifier,
- sizeof (struct
- ANASTASIS_PaymentSecretP)))
)
+ if (pay_id &&
+ (GNUNET_OK !=
+ GNUNET_STRINGS_string_to_data (pay_id,
+ strlen (pay_id),
+ &puc->payment_identifier,
+ sizeof (struct
+ ANASTASIS_PaymentSecretP))) )
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
@@ -896,7 +895,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
return handle_database_error (puc,
qs);
- if ((qs >= 0)&& (! paid || ! valid_counter))
+ if ((qs >= 0) && (! paid || ! valid_counter))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"At %s:%d paid is: '%d' and valid_counter is '%d'\n",
@@ -998,8 +997,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
&accountPubP,
MHD_HTTP_CONFLICT);
}
- */
- }
+ */}
/* check if the client insists on paying */
{
const char *order_req;
diff --git a/src/backend/anastasis-httpd_terms.c
b/src/backend/anastasis-httpd_terms.c
index 999e68f..c908975 100644
--- a/src/backend/anastasis-httpd_terms.c
+++ b/src/backend/anastasis-httpd_terms.c
@@ -54,4 +54,5 @@ AH_handler_terms (struct TMH_RequestHandler *rh,
"0.0");
}
+
/* end of anastasis-httpd_terms.c */
\ No newline at end of file
diff --git a/src/backend/anastasis-httpd_truth.c
b/src/backend/anastasis-httpd_truth.c
index 053402b..804062d 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -26,20 +26,190 @@
#include "anastasis-httpd_truth.h"
#include <gnunet/gnunet_util_lib.h>
#include <gnunet/gnunet_rest_lib.h>
+#include <anastasis_authorization_plugin.h>
+
+
+struct AuthPlugin
+{
+ struct AuthPlugin *next;
+ struct AuthPlugin *prev;
+
+ struct ANASTASIS_AuthorizationPlugin *authorization;
+
+ /**
+ * I.e. "sms", "phone".
+ */
+ char *name;
+
+ char *lib_name;
+};
+
+
+struct GetContext
+{
+ struct GetContext *next;
+ struct GetContext *prev;
+
+ struct MHD_Connection *connection;
+
+ struct ANASTASIS_AuthorizationPlugin *authorization;
+
+ struct ANASTASIS_AUTHORIZATION_State *as;
+};
+
+
+static struct GetContext *gc_head;
+static struct GetContext *gc_tail;
+
+static struct AuthPlugin *ap_head;
+static struct AuthPlugin *ap_tail;
+
+
+void
+AH_truth_shutdown (void)
+{
+ struct AuthPlugin *ap;
+ struct GetContext *gc;
+
+ while (NULL != (gc = gc_head))
+ {
+ GNUNET_CONTAINER_DLL_remove (gc_head,
+ gc_tail,
+ gc);
+ gc->authorization->cleanup (gc->as);
+ gc->authorization = NULL;
+ gc->as = NULL;
+ MHD_resume_connection (gc->connection);
+ }
+ while (NULL != (ap = ap_head))
+ {
+ GNUNET_CONTAINER_DLL_remove (ap_head,
+ ap_tail,
+ ap);
+ GNUNET_PLUGIN_unload (ap->lib_name,
+ ap);
+ GNUNET_free (ap->lib_name);
+ GNUNET_free (ap->name);
+ GNUNET_free (ap);
+ }
+}
+
+
+/**
+ * Load authorization plugin.
+ * TODO: likely make these plugin-specific functions into
anastasis-http_plugin.h
+ * to be used elsewhere!
+ *
+ * @param method name of the method to load
+ * @return #GNUNET_OK on success
+ */
+static struct ANASTASIS_AuthorizationPlugin *
+auth_plugin_load (const char *method)
+{
+ struct ANASTASIS_AuthorizationPlugin *authorization;
+ char *lib_name;
+ struct AuthPlugin *ap;
+
+ for (ap = ap_head; NULL != ap; ap = ap->next)
+ if (0 == strcmp (method,
+ ap->name))
+ return ap->authorization;
+ (void) GNUNET_asprintf (&lib_name,
+ "libanastasis_plugin_authorization_%s",
+ method);
+ authorization = GNUNET_PLUGIN_load (lib_name,
+ (void *) AH_cfg);
+ if (NULL == authorization)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Authentication method `%s' not supported\n",
+ method);
+ GNUNET_free (lib_name);
+ return NULL;
+ }
+ ap = GNUNET_new (struct AuthPlugin);
+ ap->name = GNUNET_strdup (method);
+ ap->lib_name = lib_name;
+ ap->authorization = authorization;
+ GNUNET_CONTAINER_DLL_insert (ap_head,
+ ap_tail,
+ ap);
+ return authorization;
+}
+
+
+/**
+ * Callback used to notify the application about completed requests.
+ *
+ * @param hc
+ */
+static void
+request_done (struct TM_HandlerContext *hc)
+{
+ struct GetContext *gc = hc->ctx;
+
+ if (NULL == gc)
+ return;
+ GNUNET_CONTAINER_DLL_remove (gc_head,
+ gc_tail,
+ gc);
+ if (NULL != gc->as)
+ {
+ gc->authorization->cleanup (gc->as);
+ gc->authorization = NULL;
+ gc->as = NULL;
+ }
+ GNUNET_free (gc);
+ hc->ctx = NULL;
+}
+
+
+static MHD_RESULT
+return_key_share (const struct
+ ANASTASIS_CRYPTO_TruthPublicKeyP *truth_public_key,
+ struct MHD_Connection *connection)
+{
+ // load encrypted keyshare from db
+ enum ANASTASIS_DB_QueryStatus qs;
+ void *encrypted_keyshare;
+ size_t encrypted_keyshare_size;
+ struct MHD_Response *resp;
+ MHD_RESULT ret;
+
+ qs = db->get_key_share (db->cls,
+ truth_public_key,
+ &encrypted_keyshare,
+ &encrypted_keyshare_size);
+
+ if (qs != ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT)
+ {
+ return MHD_HTTP_NOT_FOUND;
+ }
+
+ resp = MHD_create_response_from_buffer (encrypted_keyshare_size,
+ encrypted_keyshare,
+ MHD_RESPMEM_MUST_FREE);
+ TALER_MHD_add_global_headers (resp);
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_OK,
+ resp);
+ MHD_destroy_response (resp);
+ return ret;
+}
/**
* @param connection the MHD connection to handle
* @param url handles a URL of the format
"/truth/$TRUTH_PUBLIC_KEY[&response=$RESPONSE]"
- * @param con_cls
+ * @param hc
* @return MHD result code
*/
-int
+MHD_RESULT
AH_handler_truth_get (struct MHD_Connection *connection,
const char *url,
- void **con_cls)
+ struct TM_HandlerContext *hc)
{
- // FIXME: Handle truth get
+ struct GetContext *gc = hc->ctx;
struct ANASTASIS_CRYPTO_TruthPublicKeyP truth_public_key;
struct ANASTASIS_CRYPTO_TruthKeyP truth_key;
struct GNUNET_HashCode challenge_response;
@@ -48,10 +218,41 @@ AH_handler_truth_get (struct MHD_Connection *connection,
size_t encrypted_truth_size;
void *decrypted_truth;
size_t decrypted_truth_size;
- void *encrypted_keyshare;
char *truth_mime;
char *method;
- int ret;
+
+ if (NULL != gc)
+ {
+ enum ANASTASIS_AUTHORIZATION_Result ret;
+
+ /* second/third call, continue processing */
+ GNUNET_assert (NULL != gc->as);
+ ret = gc->authorization->process (gc->as,
+ connection);
+ switch (ret)
+ {
+ case ANASTASIS_AUTHORIZATION_RES_SUCCESS:
+ /* Challenge sent successfully */
+ // FIXME: mark in DB that we did it (now, for
code_retransmission_frequency!)
+ gc->authorization->cleanup (gc->as);
+ gc->as = NULL;
+ return MHD_YES;
+ case ANASTASIS_AUTHORIZATION_RES_FAILED:
+ /* Challenge transmission failed, our fault! */
+ // FIXME: give at least a refund!?
+ gc->authorization->cleanup (gc->as);
+ gc->as = NULL;
+ return MHD_YES;
+ case ANASTASIS_AUTHORIZATION_RES_SUSPENDED:
+ /* connection was suspended again, odd that this happens */
+ GNUNET_break (0); /* mark oddity: why did plugin resume and then suspend
again? */
+ return MHD_YES;
+ case ANASTASIS_AUTHORIZATION_RES_REPLY_FAILED:
+ gc->authorization->cleanup (gc->as);
+ gc->as = NULL;
+ return MHD_NO;
+ }
+ }
/* extract public key from url */
GNUNET_assert (0 == strncmp (url,
@@ -76,7 +277,6 @@ AH_handler_truth_get (struct MHD_Connection *connection,
challenge_response_s = MHD_lookup_connection_value (connection,
MHD_GET_ARGUMENT_KIND,
"response");
- GNUNET_assert (NULL != challenge_response_s);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Challenge response from url (keyshare lookup): %s\n",
challenge_response_s);
@@ -140,56 +340,142 @@ AH_handler_truth_get (struct MHD_Connection *connection,
&decrypted_truth,
&decrypted_truth_size);
}
+ if (0 == strcmp ("question",
+ method))
{
- // validate challenge response
- GNUNET_assert (strlen (method) == strlen ("question"));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Method from db: %s\n",
- method);
- if (strncmp (method, "question", strlen ("question")) == 0)
+ if (NULL == challenge_response_s)
+ {
+ // FIXME: queue PROPER reply...
+ GNUNET_free (decrypted_truth);
+ return MHD_NO;
+ }
+
+ GNUNET_CRYPTO_hash_from_string (challenge_response_s,
+ &challenge_response);
+
+ if (0 != GNUNET_memcmp (&challenge_response,
+ decrypted_truth))
+ {
+ GNUNET_break (0);
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_BAD_REQUEST,
+ // FIXME: find error code
+ TALER_EC_SYNC_BAD_IF_MATCH,
+ "Authentication failed"); // FIXME:
How much should we tell?
+ }
+ else
+ {
+ return return_key_share (&truth_public_key,
+ connection);
+ }
+ }
+
+ /* Not security question, check for answer in DB */
+ if (NULL != challenge_response_s)
+ {
+ unsigned long long code;
+ char dummy;
+
+ if (1 != sscanf (challenge_response_s,
+ "%llu%c",
+ &code,
+ &dummy))
+ {
+ // FIXME: queue PROPER reply...
+ GNUNET_free (decrypted_truth);
+ return MHD_NO;
+ }
+ // FIXME: check code against database
+ if (1)
+ {
+ /* code was wrong */
+ // FIXME: queue PROPER reply...
+ GNUNET_free (decrypted_truth);
+ return MHD_NO;
+ }
+ // IF OK:
+ return return_key_share (&truth_public_key,
+ connection);
+ }
+
+ /* Not security question and no answer: use plugin to generate challenge! */
+ {
+ struct ANASTASIS_AuthorizationPlugin *authorization;
+ enum GNUNET_GenericReturnValue ret;
+ struct ANASTASIS_AUTHORIZATION_State *as;
+ uint64_t code;
+ enum ANASTASIS_AUTHORIZATION_Result aret;
+
+ authorization = auth_plugin_load (method);
+ if (NULL == authorization)
+ {
+ // FIXME: queue PROPER reply...
+ GNUNET_free (decrypted_truth);
+ return MHD_NO;
+ }
+ ret = authorization->validate (authorization->cls,
+ connection,
+ decrypted_truth,
+ decrypted_truth_size);
+ switch (ret)
+ {
+ case GNUNET_OK:
+ /* data valid, continued below */
+ break;
+ case GNUNET_NO:
+ /* data invalid, reply was queued */
+ GNUNET_free (decrypted_truth);
+ return MHD_YES;
+ case GNUNET_SYSERR:
+ /* data invalid, reply was NOT queued */
+ GNUNET_free (decrypted_truth);
+ return MHD_NO;
+ }
+ // FIXME:
+ code = 42; // RANDOM! -- or from DB if recent one in DB!
+ // FIXME: *if*
+ // db->insert (truth_public_key, code, now, expiration, etc.);
+ as = authorization->start (authorization->cls,
+ &truth_public_key,
+ code,
+ decrypted_truth,
+ decrypted_truth_size);
+ GNUNET_free (decrypted_truth);
+ if (NULL == as)
+ {
+ // FIXME: queue PROPER reply...
+ return MHD_NO;
+ }
+ gc = GNUNET_new (struct GetContext);
+ gc->connection = connection;
+ gc->authorization = authorization;
+ gc->as = as;
+ hc->ctx = gc;
+ hc->cc = &request_done;
+ GNUNET_CONTAINER_DLL_insert (gc_head,
+ gc_tail,
+ gc);
+ aret = authorization->process (as,
+ connection);
+ switch (aret)
{
- GNUNET_CRYPTO_hash_from_string (challenge_response_s,
- &challenge_response);
-
- if (0 != GNUNET_memcmp (&challenge_response,
- decrypted_truth))
- {
- GNUNET_break (0);
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_BAD_REQUEST,
- // FIXME: find error code
- TALER_EC_SYNC_BAD_IF_MATCH,
- "Authentication failed"); // FIXME:
How much should we tell?
- }
- else
- {
- // load encrypted keyshare from db
- enum ANASTASIS_DB_QueryStatus qs;
- size_t encrypted_keyshare_size;
-
- qs = db->get_key_share (db->cls,
- &truth_public_key,
- &encrypted_keyshare,
- &encrypted_keyshare_size);
-
- if (qs != ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT)
- {
- return MHD_HTTP_NOT_FOUND;
- }
-
- struct MHD_Response *resp;
- resp = MHD_create_response_from_buffer (encrypted_keyshare_size,
- encrypted_keyshare,
- MHD_RESPMEM_MUST_FREE);
- TALER_MHD_add_global_headers (resp);
- ret = MHD_queue_response (connection,
- MHD_HTTP_OK,
- resp);
- MHD_destroy_response (resp);
- return ret;
- }
+ case ANASTASIS_AUTHORIZATION_RES_SUCCESS:
+ /* all good, challenge sent! */
+ // FIXME: mark in DB that we did it (now, for
code_retransmission_frequency!)
+ break;
+ case ANASTASIS_AUTHORIZATION_RES_FAILED:
+ /* sending challenge failed */
+ // FIXME: give at least a refund!?
+ break;
+ case ANASTASIS_AUTHORIZATION_RES_SUSPENDED:
+ /* we have been suspended, see you later */
+ return MHD_YES;
+ case ANASTASIS_AUTHORIZATION_RES_REPLY_FAILED:
+ /* failure to queue reply, kill connection */
+ return MHD_NO;
}
+ authorization->cleanup (gc->as);
+ gc->as = NULL;
+ return MHD_YES;
}
- GNUNET_free (decrypted_truth);
- return MHD_NO;
-}
\ No newline at end of file
+}
diff --git a/src/backend/anastasis-httpd_truth.h
b/src/backend/anastasis-httpd_truth.h
index ead9e16..efa6b1b 100644
--- a/src/backend/anastasis-httpd_truth.h
+++ b/src/backend/anastasis-httpd_truth.h
@@ -24,16 +24,20 @@
#define ANASTASIS_HTTPD_TRUTH_H
#include <microhttpd.h>
+void
+AH_truth_shutdown (void);
+
+
/**
* @param connection the MHD connection to handle
* @param url handles a URL of the format
"/truth/$TRUTH_PUBLIC_KEY[&response=$RESPONSE]"
* @param con_cls
* @return MHD result code
*/
-int
+MHD_RESULT
AH_handler_truth_get (struct MHD_Connection *connection,
const char *url,
- void **con_cls);
+ struct TM_HandlerContext *hc);
/**
* @param connection the MHD connection to handle
@@ -50,4 +54,4 @@ AH_handler_truth_post (struct MHD_Connection *connection,
const char *truth_data,
size_t *truth_data_size);
-#endif
\ No newline at end of file
+#endif
diff --git a/src/cli/anastasis-cli-assembler.c
b/src/cli/anastasis-cli-assembler.c
index 44a7bec..565a524 100644
--- a/src/cli/anastasis-cli-assembler.c
+++ b/src/cli/anastasis-cli-assembler.c
@@ -28,8 +28,6 @@
#include "anastasis.h"
-
-
/**
* Global option '--me' to import json containing details of user.
*/
@@ -523,6 +521,7 @@ read_keyboard_command (void *cls)
start_read_keyboard ();
}
+
/**
* @brief Wait for a keyboard input
*/
@@ -541,7 +540,6 @@ start_read_keyboard ()
}
-
printf ("'x' to quit\n");
printf ("'o' to show options\n");
printf ("Waiting for keyboard input\n");
@@ -812,6 +810,7 @@ run (void *cls,
rss);
}
+
int
main (int argc,
char *const *argv)
@@ -850,4 +849,5 @@ main (int argc,
return (GNUNET_OK == ret) ? 0 : 1;
}
+
/* end of anastasis-cli-assembler.c */
\ No newline at end of file
diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index 5c0ef46..eb37db8 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -784,7 +784,7 @@ read_keyboard_command (void *cls)
struct SaltState *ss = GNUNET_new (struct SaltState);
size_t url_len = characters - strlen ("server add ");
- if ((0 == url_len)||
+ if ((0 == url_len) ||
(characters < strlen ("server add ")))
{
printf (
@@ -1492,6 +1492,7 @@ run (void *cls,
start_read_keyboard ();
}
+
int
main (int argc,
char *const *argv)
@@ -1525,4 +1526,5 @@ main (int argc,
return (GNUNET_OK == ret) ? 0 : 1;
}
+
/* end of anastasis-cli-spliter.c */
\ No newline at end of file
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 8bf83ba..d5dd76e 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -5,6 +5,7 @@ EXTRA_DIST = \
anastasisincludedir = $(includedir)/anastasis
anastasisinclude_HEADERS = \
+ anastasis_authorization_plugin.h \
anastasis_database_plugin.h \
anastasis_service.h \
anastasis_error_codes.h \
diff --git a/src/include/anastasis_testing_lib.h
b/src/include/anastasis_testing_lib.h
index ee1fa7a..079dfc9 100644
--- a/src/include/anastasis_testing_lib.h
+++ b/src/include/anastasis_testing_lib.h
@@ -707,6 +707,7 @@ int
ANASTASIS_TESTING_get_trait_challenge (const struct TALER_TESTING_Command *cmd,
unsigned int index,
const struct ANASTASIS_Challenge **c);
+
/**
* Offer a challenge.
*
@@ -717,6 +718,7 @@ ANASTASIS_TESTING_get_trait_challenge (const struct
TALER_TESTING_Command *cmd,
struct TALER_TESTING_Trait
ANASTASIS_TESTING_make_trait_challenge (unsigned int index,
const struct ANASTASIS_Challenge *r);
+
/**
* Make the "challenge answer" command.
*
diff --git a/src/lib/anastasis_api_config.c b/src/lib/anastasis_api_config.c
index 7f1a41b..54c3337 100644
--- a/src/lib/anastasis_api_config.c
+++ b/src/lib/anastasis_api_config.c
@@ -159,4 +159,5 @@ ANASTASIS_config_cancel (struct ANASTASIS_ConfigOperation
*co)
GNUNET_free (co);
}
+
/* end of anastasis_api_config.c */
diff --git a/src/lib/anastasis_api_keyshare_lookup.c
b/src/lib/anastasis_api_keyshare_lookup.c
index a79803a..a70e140 100644
--- a/src/lib/anastasis_api_keyshare_lookup.c
+++ b/src/lib/anastasis_api_keyshare_lookup.c
@@ -332,4 +332,5 @@ ANASTASIS_keyshare_lookup (struct GNUNET_CURL_Context *ctx,
return kslo;
}
+
/* end of anastasis_api_keyshare_lookup.c */
diff --git a/src/lib/anastasis_api_salt.c b/src/lib/anastasis_api_salt.c
index 834b3bf..f65152a 100644
--- a/src/lib/anastasis_api_salt.c
+++ b/src/lib/anastasis_api_salt.c
@@ -149,4 +149,5 @@ ANASTASIS_salt_cancel (struct ANASTASIS_SaltOperation *so)
GNUNET_free (so);
}
+
/* end of anastasis_api_salt.c */
diff --git a/src/lib/test_anastasis_api.c b/src/lib/test_anastasis_api.c
index 4994eab..7d3513b 100644
--- a/src/lib/test_anastasis_api.c
+++ b/src/lib/test_anastasis_api.c
@@ -236,7 +236,6 @@ run (void *cls,
"policy-store-2"),
-
TALER_TESTING_cmd_end ()
};
diff --git a/src/lib/testing_cmd_challenge_answer.c
b/src/lib/testing_cmd_challenge_answer.c
index 7dd4659..1856eee 100644
--- a/src/lib/testing_cmd_challenge_answer.c
+++ b/src/lib/testing_cmd_challenge_answer.c
@@ -76,6 +76,7 @@ challenge_answer_cb (void *af_cls,
TALER_TESTING_interpreter_next (cs->is);
}
+
/**
* Run a "recover secret" CMD.
*
@@ -139,6 +140,7 @@ challenge_answer_cleanup (void *cls,
GNUNET_free (cs);
}
+
/**
* Make the "challenge answer" command.
*
diff --git a/src/lib/testing_cmd_recover_secret.c
b/src/lib/testing_cmd_recover_secret.c
index 6cd279c..e4794c7 100644
--- a/src/lib/testing_cmd_recover_secret.c
+++ b/src/lib/testing_cmd_recover_secret.c
@@ -103,6 +103,7 @@ policy_lookup_cb (void *cls,
TALER_TESTING_interpreter_next (rss->is);
}
+
static void
core_secret_cb (void *cls,
const void *secret,
@@ -120,6 +121,7 @@ core_secret_cb (void *cls,
TALER_TESTING_interpreter_next (rss->is);
}
+
/**
* Run a "recover secret" CMD.
*
@@ -243,6 +245,7 @@ recover_secret_traits (void *cls,
index);
}
+
/**
* Make the "recover secret" command.
*
diff --git a/src/lib/testing_cmd_secret_share.c
b/src/lib/testing_cmd_secret_share.c
index b2b9f8b..94c9ad8 100644
--- a/src/lib/testing_cmd_secret_share.c
+++ b/src/lib/testing_cmd_secret_share.c
@@ -241,6 +241,7 @@ secret_share_result_cb (void *cls,
return;
}
+
/**
* Run a "secret share" CMD.
*
diff --git a/src/lib/testing_trait_challenge.c
b/src/lib/testing_trait_challenge.c
index 009821a..5c40d8e 100644
--- a/src/lib/testing_trait_challenge.c
+++ b/src/lib/testing_trait_challenge.c
@@ -67,4 +67,6 @@ ANASTASIS_TESTING_make_trait_challenge
};
return ret;
}
+
+
/* end of testing_trait_challenge.c */
diff --git a/src/util/anastasis_crypto.c b/src/util/anastasis_crypto.c
index 0e42424..de08845 100644
--- a/src/util/anastasis_crypto.c
+++ b/src/util/anastasis_crypto.c
@@ -512,6 +512,7 @@ ANASTASIS_CRYPTO_keyshare_decrypt (
}
}
+
/**
* Generates the eddsa public Key which is the identfier of the truth object.
* The private key is used to sign the upload.
@@ -548,6 +549,7 @@ ANASTASIS_CRYPTO_truth_public_key_derive (
&pub_key->pub);
}
+
/**
* Encrypts the truth data which contains the hashed answer or the phone
number..
* It is encrypted with AES256, the key is generated with the user
identification as
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: wild truth authorization plugin hacking -- untested,
gnunet <=