From 4fca11423e6fd34032848a1b8684b3c06197e6e5 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sat, 27 Apr 2019 10:04:01 +0200 Subject: [PATCH] RECLAIM/OIDC: simplify access token --- src/reclaim/oidc_helper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } -- 2.25.1