[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: RECLAIM/OIDC: fix nonce siz
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: RECLAIM/OIDC: fix nonce size |
Date: |
Sat, 27 Apr 2019 10:16:24 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new f0688c57b RECLAIM/OIDC: fix nonce size
f0688c57b is described below
commit f0688c57bf1f85bbb71d166b33317db0bd565008
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Sat Apr 27 10:16:11 2019 +0200
RECLAIM/OIDC: fix nonce size
---
src/reclaim/oidc_helper.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index f0691796b..fb0fb2e08 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -315,13 +315,13 @@ OIDC_build_authz_code (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
size_t signature_payload_len;
size_t attr_list_len;
size_t code_payload_len;
- unsigned int nonce;
- unsigned int nonce_tmp;
+ uint32_t nonce;
+ uint32_t nonce_tmp;
struct GNUNET_CRYPTO_EccSignaturePurpose *purpose;
attrs_ser = NULL;
signature_payload_len =
- sizeof (struct GNUNET_RECLAIM_Ticket) + sizeof (unsigned int);
+ sizeof (struct GNUNET_RECLAIM_Ticket) + sizeof (uint32_t);
if (NULL != attrs)
{
attr_list_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs);
@@ -361,9 +361,9 @@ OIDC_build_authz_code (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
return NULL;
}
}
- nonce_tmp = htons (nonce);
- memcpy (buf_ptr, &nonce_tmp, sizeof (unsigned int));
- buf_ptr += sizeof (unsigned int);
+ nonce_tmp = htonl (nonce);
+ memcpy (buf_ptr, &nonce_tmp, sizeof (uint32_t));
+ buf_ptr += sizeof (uint32_t);
// Finally, attributes
if (NULL != attrs_ser)
{
@@ -415,7 +415,7 @@ OIDC_parse_authz_code (const struct
GNUNET_CRYPTO_EcdsaPublicKey *audience,
size_t code_payload_len;
size_t attrs_ser_len;
size_t signature_offset;
- unsigned int nonce;
+ uint32_t nonce;
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Trying to decode `%s'", code);
code_payload = NULL;
@@ -424,7 +424,7 @@ OIDC_parse_authz_code (const struct
GNUNET_CRYPTO_EcdsaPublicKey *audience,
if (code_payload_len < sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
sizeof (struct GNUNET_RECLAIM_Ticket) +
- sizeof (unsigned int) +
+ sizeof (uint32_t) +
sizeof (struct GNUNET_CRYPTO_EcdsaSignature))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n");
@@ -439,9 +439,9 @@ OIDC_parse_authz_code (const struct
GNUNET_CRYPTO_EcdsaPublicKey *audience,
*ticket = *((struct GNUNET_RECLAIM_Ticket *) ptr);
attrs_ser_len -= sizeof (struct GNUNET_RECLAIM_Ticket);
ptr += sizeof (struct GNUNET_RECLAIM_Ticket);
- nonce = ntohs (*((unsigned int *) ptr));
- attrs_ser_len -= sizeof (unsigned int);
- ptr += sizeof (unsigned int);
+ nonce = ntohl (*((uint32_t *) ptr));
+ attrs_ser_len -= sizeof (uint32_t);
+ ptr += sizeof (uint32_t);
attrs_ser_len -= sizeof (struct GNUNET_CRYPTO_EcdsaSignature);
*attrs = GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (ptr, attrs_ser_len);
signature_offset =
--
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: RECLAIM/OIDC: fix nonce size,
gnunet <=