challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

commit a25540d70167cc869f85f647815ba8aab04fce28
parent 596003d1f2a58f79c874f028b903da37edda7488
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 16 Mar 2026 01:15:33 +0100

update challenger to latest GNUnet API

Diffstat:
Msrc/challenger/challenger-httpd_challenge.c | 35+++++++++++++++++++++++++----------
Msrc/challenger/challenger-httpd_common.c | 28++++++++++++----------------
2 files changed, 37 insertions(+), 26 deletions(-)

diff --git a/src/challenger/challenger-httpd_challenge.c b/src/challenger/challenger-httpd_challenge.c @@ -67,7 +67,7 @@ struct ChallengeContext /** * Handle to the helper process. */ - struct GNUNET_OS_Process *child; + struct GNUNET_Process *child; /** * Handle to wait for @e child @@ -231,10 +231,15 @@ cleanup_ctx (void *cls) } if (NULL != bc->child) { - (void) GNUNET_OS_process_kill (bc->child, - SIGKILL); GNUNET_break (GNUNET_OK == - GNUNET_OS_process_wait (bc->child)); + GNUNET_process_kill (bc->child, + SIGKILL)); + GNUNET_break (GNUNET_OK == + GNUNET_process_wait (bc->child, + true, + NULL, + NULL)); + GNUNET_process_destroy (bc->child); bc->child = NULL; } TALER_MHD_parse_post_cleanup_callback (bc->jbuffer); @@ -295,7 +300,7 @@ child_done_cb (void *cls, "Child done with exit code %d/%llu\n", (int) type, (unsigned long long) exit_code); - GNUNET_OS_process_destroy (bc->child); + GNUNET_process_destroy (bc->child); bc->child = NULL; bc->cwh = NULL; bc->pst = type; @@ -350,14 +355,24 @@ send_tan (struct ChallengeContext *bc) CH_auth_command, address); #endif - bc->child = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR, - p, - NULL, - NULL, + bc->child = GNUNET_process_create (); + GNUNET_assert (GNUNET_OK == + GNUNET_process_set_options ( + bc->child, + GNUNET_process_option_inherit_rpipe (p, + STDIN_FILENO))); + if ( (GNUNET_OK != + GNUNET_process_set_command_va (bc->child, CH_auth_command, CH_auth_command, address, - NULL); + NULL)) || + (GNUNET_OK != + GNUNET_process_start (bc->child)) ) + { + GNUNET_process_destroy (bc->child); + bc->child = NULL; + } free (address); } if (NULL == bc->child) diff --git a/src/challenger/challenger-httpd_common.c b/src/challenger/challenger-httpd_common.c @@ -96,22 +96,18 @@ CH_compute_code (const struct CHALLENGER_ValidationNonceP *nonce, astr = json_dumps (address, JSON_COMPACT); GNUNET_assert (GNUNET_YES == - GNUNET_CRYPTO_kdf (&h, - sizeof (h), - nonce, - sizeof (nonce), - client_secret, - strlen (client_secret), - astr, - strlen (astr), - client_redirect_uri, - strlen (client_redirect_uri), - client_scope, - NULL != client_scope - ? strlen (client_scope) - : 0, - NULL, - 0)); + GNUNET_CRYPTO_hkdf_gnunet ( + &h, + sizeof (h), + nonce, + sizeof (nonce), + client_secret, + strlen (client_secret), + GNUNET_CRYPTO_kdf_arg_string (astr), + GNUNET_CRYPTO_kdf_arg_string (client_redirect_uri), + GNUNET_CRYPTO_kdf_arg_string (NULL != client_scope + ? client_scope + : ""))); free (astr); ns = GNUNET_STRINGS_data_to_string_alloc (nonce, sizeof (*nonce));