From: Schanzenbach, Martin Date: Sat, 27 Apr 2019 08:04:01 +0000 (+0200) Subject: RECLAIM/OIDC: simplify access token X-Git-Tag: v0.11.4~75 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4fca11423e6fd34032848a1b8684b3c06197e6e5;p=oweals%2Fgnunet.git RECLAIM/OIDC: simplify access token --- diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index 7b4d8ee37..f0691796b 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c @@ -513,15 +513,13 @@ OIDC_build_token_response (const char *access_token, char * OIDC_access_token_new () { - char *access_token_number; char *access_token; uint64_t random_number; random_number = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_NONCE, UINT64_MAX); - GNUNET_asprintf (&access_token_number, "%" PRIu64, random_number); - GNUNET_STRINGS_base64_encode (access_token_number, - strlen (access_token_number), + GNUNET_STRINGS_base64_encode (&random_number, + sizeof (uint64_t), &access_token); return access_token; }