aboutsummaryrefslogtreecommitdiff
path: root/src/identity-provider/identity_token.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2016-01-24 12:39:50 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2016-01-24 12:39:50 +0000
commit96686fc9cebc1e452a7e6b1fd2c2b739c7603577 (patch)
tree01391123474a46e0f3bba7ce313f05e7a4de422c /src/identity-provider/identity_token.c
parent814b5e47aa0a9e154e3226539648d78d3ce2c293 (diff)
downloadgnunet-96686fc9cebc1e452a7e6b1fd2c2b739c7603577.tar.gz
gnunet-96686fc9cebc1e452a7e6b1fd2c2b739c7603577.zip
- sscanf type fix
Diffstat (limited to 'src/identity-provider/identity_token.c')
-rw-r--r--src/identity-provider/identity_token.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/identity-provider/identity_token.c b/src/identity-provider/identity_token.c
index 41731bbf4..958597630 100644
--- a/src/identity-provider/identity_token.c
+++ b/src/identity-provider/identity_token.c
@@ -28,6 +28,7 @@
28#include "gnunet_signatures.h" 28#include "gnunet_signatures.h"
29#include "identity_token.h" 29#include "identity_token.h"
30#include <jansson.h> 30#include <jansson.h>
31#include <inttypes.h>
31 32
32#define JWT_ALG "alg" 33#define JWT_ALG "alg"
33 34
@@ -628,7 +629,7 @@ ticket_payload_serialize (struct TokenTicketPayload *payload,
628 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); 629 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
629 630
630 GNUNET_asprintf (result, 631 GNUNET_asprintf (result,
631 "{\"nonce\": \"%lu\",\"identity\": \"%s\",\"label\": \"%s\"}", 632 "{\"nonce\": \""SCNu64"\",\"identity\": \"%s\",\"label\": \"%s\"}",
632 payload->nonce, identity_key_str, payload->label); 633 payload->nonce, identity_key_str, payload->label);
633 GNUNET_free (identity_key_str); 634 GNUNET_free (identity_key_str);
634 635
@@ -818,7 +819,7 @@ ticket_payload_parse(const char *raw_data,
818 nonce_str = json_string_value (nonce_json); 819 nonce_str = json_string_value (nonce_json);
819 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found nonce: %s\n", nonce_str); 820 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found nonce: %s\n", nonce_str);
820 821
821 GNUNET_assert (0 != sscanf (nonce_str, "%lu", &nonce)); 822 GNUNET_assert (0 != sscanf (nonce_str, "%"SCNu64, &nonce));
822 823
823 *result = ticket_payload_create (nonce, 824 *result = ticket_payload_create (nonce,
824 (const struct GNUNET_CRYPTO_EcdsaPublicKey*)&id_pkey, 825 (const struct GNUNET_CRYPTO_EcdsaPublicKey*)&id_pkey,