From c93151af83e11000185eb3dcfa3910f8327e4565 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Fri, 26 Apr 2019 17:43:58 +0200 Subject: [PATCH] minor --- src/reclaim/oidc_helper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index 5bcf932f5..140b0a479 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c @@ -343,9 +343,11 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, nonce = 0; if (NULL != nonce_str) { - if ((1 != SSCANF (nonce_str, "%u", &nonce)) || (nonce > UINT16_MAX)) + if ((1 != SSCANF (nonce_str, "%u", &nonce)) || (nonce > UINT32_MAX)) { GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_LOG_ERROR, + "Invalid nonce %s\n", nonce_str); GNUNET_free (code_payload); GNUNET_free_non_null (attrs_ser); return NULL; @@ -363,6 +365,8 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign (issuer, purpose, &signature)) { GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_LOG_ERROR, + "Unable to sign code\n"); GNUNET_free (code_payload); GNUNET_free_non_null (attrs_ser); return NULL; @@ -404,6 +408,8 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, size_t signature_offset; unsigned int nonce; + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Trying to decode `%s'", code); code_payload = NULL; code_payload_len = GNUNET_STRINGS_base64_decode (code, strlen (code), (void **) &code_payload); -- 2.25.1