diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-26 17:43:58 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-26 17:43:58 +0200 |
commit | c93151af83e11000185eb3dcfa3910f8327e4565 (patch) | |
tree | 74eb29328c27ebb659ce7c0f54cb2b13afd9f636 /src/reclaim/oidc_helper.c | |
parent | 39e6b1d120ced38fd7def997aca282791d8d9c82 (diff) | |
download | gnunet-c93151af83e11000185eb3dcfa3910f8327e4565.tar.gz gnunet-c93151af83e11000185eb3dcfa3910f8327e4565.zip |
minor
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r-- | src/reclaim/oidc_helper.c | 8 |
1 files changed, 7 insertions, 1 deletions
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, | |||
343 | nonce = 0; | 343 | nonce = 0; |
344 | if (NULL != nonce_str) | 344 | if (NULL != nonce_str) |
345 | { | 345 | { |
346 | if ((1 != SSCANF (nonce_str, "%u", &nonce)) || (nonce > UINT16_MAX)) | 346 | if ((1 != SSCANF (nonce_str, "%u", &nonce)) || (nonce > UINT32_MAX)) |
347 | { | 347 | { |
348 | GNUNET_break (0); | 348 | GNUNET_break (0); |
349 | GNUNET_log (GNUNET_ERROR_LOG_ERROR, | ||
350 | "Invalid nonce %s\n", nonce_str); | ||
349 | GNUNET_free (code_payload); | 351 | GNUNET_free (code_payload); |
350 | GNUNET_free_non_null (attrs_ser); | 352 | GNUNET_free_non_null (attrs_ser); |
351 | return NULL; | 353 | return NULL; |
@@ -363,6 +365,8 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, | |||
363 | if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign (issuer, purpose, &signature)) | 365 | if (GNUNET_SYSERR == GNUNET_CRYPTO_ecdsa_sign (issuer, purpose, &signature)) |
364 | { | 366 | { |
365 | GNUNET_break (0); | 367 | GNUNET_break (0); |
368 | GNUNET_log (GNUNET_ERROR_LOG_ERROR, | ||
369 | "Unable to sign code\n"); | ||
366 | GNUNET_free (code_payload); | 370 | GNUNET_free (code_payload); |
367 | GNUNET_free_non_null (attrs_ser); | 371 | GNUNET_free_non_null (attrs_ser); |
368 | return NULL; | 372 | return NULL; |
@@ -404,6 +408,8 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience, | |||
404 | size_t signature_offset; | 408 | size_t signature_offset; |
405 | unsigned int nonce; | 409 | unsigned int nonce; |
406 | 410 | ||
411 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
412 | "Trying to decode `%s'", code); | ||
407 | code_payload = NULL; | 413 | code_payload = NULL; |
408 | code_payload_len = | 414 | code_payload_len = |
409 | GNUNET_STRINGS_base64_decode (code, strlen (code), (void **) &code_payload); | 415 | GNUNET_STRINGS_base64_decode (code, strlen (code), (void **) &code_payload); |