[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: added check for empty nonce
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: added check for empty nonce string |
Date: |
Thu, 13 Jun 2019 16:02:42 +0200 |
This is an automated email from the git hooks/post-receive script.
pagkopoulou pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 5541e2e3f added check for empty nonce string
5541e2e3f is described below
commit 5541e2e3f2b321164f3c33dfc551a8f237380393
Author: Alexia Pagkopoulou <address@hidden>
AuthorDate: Thu Jun 13 14:53:34 2019 +0200
added check for empty nonce string
---
src/reclaim/oidc_helper.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index e4949a037..d2789f978 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -405,6 +405,7 @@ OIDC_build_authz_code (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
attrs_ser = NULL;
signature_payload_len =
sizeof (struct GNUNET_RECLAIM_Ticket) + sizeof (uint32_t);
+
if (NULL != attrs)
{
attr_list_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs);
@@ -415,6 +416,7 @@ OIDC_build_authz_code (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
attrs_ser = GNUNET_malloc (attr_list_len);
GNUNET_RECLAIM_ATTRIBUTE_list_serialize (attrs, attrs_ser);
}
+
code_payload_len = sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
sizeof (struct GNUNET_CRYPTO_EcdhePublicKey) +
signature_payload_len +
@@ -427,9 +429,10 @@ OIDC_build_authz_code (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
buf_ptr = plaintext;
memcpy (buf_ptr, ticket, sizeof (struct GNUNET_RECLAIM_Ticket));
buf_ptr += sizeof (struct GNUNET_RECLAIM_Ticket);
+
// Then copy nonce
nonce = 0;
- if (NULL != nonce_str)
+ if (NULL != nonce_str && strcmp("", nonce_str) != 0)
{
if ((1 != SSCANF (nonce_str, "%u", &nonce)) || (nonce > UINT32_MAX))
{
@@ -447,6 +450,7 @@ OIDC_build_authz_code (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
nonce_tmp = htonl (nonce);
memcpy (buf_ptr, &nonce_tmp, sizeof (uint32_t));
buf_ptr += sizeof (uint32_t);
+
// Finally, attributes
if (NULL != attrs_ser)
{
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: added check for empty nonce string,
gnunet <=