challenger

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

commit 3d8ab6673ad11839eb715223ade99976840709f9
parent 45a2819fa7b252fff6ae6723a5ceb0f853ca89ef
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Tue, 16 Jun 2026 16:57:59 +0200

convert to new gnunet random API

Diffstat:
Mflake.lock | 62+++++++++++++++++++++++++++++++-------------------------------
Mflake.nix | 8+++-----
Msrc/challenger/challenger-httpd_challenge.c | 3+--
Msrc/challenger/challenger-httpd_setup.c | 3+--
Msrc/challenger/challenger-httpd_token.c | 3+--
5 files changed, 37 insertions(+), 42 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -7,17 +7,17 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1776021477, - "narHash": "sha256-V6qYPCNgaalQi6tRkDZ+Per3PPifm1Ze2pShV6LGomg=", + "lastModified": 1781618942, + "narHash": "sha256-yRKtW+Q8nZtnBB4L5ewOT9dFaMFOofUNoNidgsyI9AU=", "ref": "refs/heads/master", - "rev": "92da4e81006404494f6443781c8f55249e723847", - "revCount": 9932, + "rev": "b542c0c40c30e1ddd9b0528e913cceed8eef9c56", + "revCount": 10032, "submodules": true, "type": "git", "url": "https://git.gnunet.org/exchange" }, "original": { - "rev": "92da4e81006404494f6443781c8f55249e723847", + "rev": "b542c0c40c30e1ddd9b0528e913cceed8eef9c56", "type": "git", "url": "https://git.gnunet.org/exchange" } @@ -28,17 +28,17 @@ "systems": "systems" }, "locked": { - "lastModified": 1774899416, - "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=", + "lastModified": 1781611204, + "narHash": "sha256-4uCu+3Cdi1ck9J7LT72INcrm3coIkP7Gh9k0COAr91g=", "ref": "refs/heads/master", - "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", - "revCount": 33194, + "rev": "e8e7504b7ab43f7dffa25f273ff228069d8d6dd4", + "revCount": 33248, "submodules": true, "type": "git", "url": "https://git.gnunet.org/gnunet" }, "original": { - "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "rev": "e8e7504b7ab43f7dffa25f273ff228069d8d6dd4", "type": "git", "url": "https://git.gnunet.org/gnunet" } @@ -49,78 +49,78 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1774899416, - "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=", + "lastModified": 1781611204, + "narHash": "sha256-4uCu+3Cdi1ck9J7LT72INcrm3coIkP7Gh9k0COAr91g=", "ref": "refs/heads/master", - "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", - "revCount": 33194, + "rev": "e8e7504b7ab43f7dffa25f273ff228069d8d6dd4", + "revCount": 33248, "submodules": true, "type": "git", "url": "https://git.gnunet.org/gnunet" }, "original": { - "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "rev": "e8e7504b7ab43f7dffa25f273ff228069d8d6dd4", "type": "git", "url": "https://git.gnunet.org/gnunet" } }, "nixpkgs": { "locked": { - "lastModified": 1774799055, - "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "lastModified": 1780734595, + "narHash": "sha256-DmTfP92QFYRLOGXlMIE54MAgxSJjDWocl3gRNOu72Os=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "rev": "9b696460ac78b5ccfc17c854d8c976f20456e943", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "release-25.11", + "ref": "release-26.05", "type": "indirect" } }, "nixpkgs_2": { "locked": { - "lastModified": 1774799055, - "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "lastModified": 1781616846, + "narHash": "sha256-pujkSXZ/LvNu0sObeK09KfS0lV/YoeWKZ5hwuY265Cs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "rev": "1d92060175b76bf5b7d8a1d5d1d924e31ef76ff8", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "release-25.11", + "ref": "release-26.05", "type": "indirect" } }, "nixpkgs_3": { "locked": { - "lastModified": 1774799055, - "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "lastModified": 1780734595, + "narHash": "sha256-DmTfP92QFYRLOGXlMIE54MAgxSJjDWocl3gRNOu72Os=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "rev": "9b696460ac78b5ccfc17c854d8c976f20456e943", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "release-25.11", + "ref": "release-26.05", "type": "indirect" } }, "nixpkgs_4": { "locked": { - "lastModified": 1777271619, - "narHash": "sha256-gmurzpuuS5N90jEbbW7+T/cyC+SadLscpx3TPYTxfug=", + "lastModified": 1781616846, + "narHash": "sha256-pujkSXZ/LvNu0sObeK09KfS0lV/YoeWKZ5hwuY265Cs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8b598dd23b56ebd1db9707c9cdd7ff3797abad19", + "rev": "1d92060175b76bf5b7d8a1d5d1d924e31ef76ff8", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "release-25.11", + "ref": "release-26.05", "type": "indirect" } }, diff --git a/flake.nix b/flake.nix @@ -21,12 +21,10 @@ { inputs = { - nixpkgs.url = "nixpkgs/release-25.11"; + nixpkgs.url = "nixpkgs/release-26.05"; systems.url = "github:nix-systems/default"; - gnunet.url = "git+https://git.gnunet.org/gnunet?rev=7c6b613e37e301b0e81fb94af5878d00c98e5b75"; - exchange.url = "git+https://git.gnunet.org/exchange?rev=92da4e81006404494f6443781c8f55249e723847"; - #merchant.url = "git+https://git.gnunet.org/merchant?rev=b174138726171601b666fff346762502be5150a1"; - #donau.url = "git+https://git.gnunet.org/donau?rev=4f609168fe263891f134eff01f86288066acdd81"; + gnunet.url = "git+https://git.gnunet.org/gnunet?rev=e8e7504b7ab43f7dffa25f273ff228069d8d6dd4"; + exchange.url = "git+https://git.gnunet.org/exchange?rev=b542c0c40c30e1ddd9b0528e913cceed8eef9c56"; self.submodules = true; }; diff --git a/src/challenger/challenger-httpd_challenge.c b/src/challenger/challenger-httpd_challenge.c @@ -627,8 +627,7 @@ CH_handler_challenge (struct CH_HandlerContext *hc, hc->ctx = bc; bc->pst = GNUNET_OS_PROCESS_UNKNOWN; bc->tan - = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, - 100000000); + = GNUNET_CRYPTO_random_u32 (100000000); bc->pp = MHD_create_post_processor (hc->connection, 1024, &post_iter, diff --git a/src/challenger/challenger-httpd_setup.c b/src/challenger/challenger-httpd_setup.c @@ -228,8 +228,7 @@ CH_handler_setup (struct CH_HandlerContext *hc, enum GNUNET_DB_QueryStatus qs; expiration_time = GNUNET_TIME_relative_to_absolute (CH_validation_duration); - GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, - &nonce, + GNUNET_CRYPTO_random_block (&nonce, sizeof (nonce)); qs = CHALLENGERDB_setup_nonce (CH_context, client_id, diff --git a/src/challenger/challenger-httpd_token.c b/src/challenger/challenger-httpd_token.c @@ -618,8 +618,7 @@ CH_handler_token (struct CH_HandlerContext *hc, struct CHALLENGER_AccessTokenP token; enum GNUNET_DB_QueryStatus qs; - GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, - &token, + GNUNET_CRYPTO_random_block (&token, sizeof (token)); qs = CHALLENGERDB_token_add_token (CH_context, &bc->nonce,