#include "gnunet_signatures.h"
#include "identity_token.h"
#include <jansson.h>
+#include <inttypes.h>
#define JWT_ALG "alg"
&enc_key,
&enc_iv,
str_buf);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decrypted bytes: %d Expected bytes: %d\n", str_size, cyphertext_len);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Decrypted bytes: %zd Expected bytes: %zd\n",
+ str_size,
+ cyphertext_len);
if (-1 == str_size)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ECDH invalid\n");
pub_key,
&new_key_hash));
create_sym_key_from_ecdh(&new_key_hash, &skey, &iv);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypting string %s\n (len=%d)",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypting string %s\n (len=%zd)",
plaintext,
strlen (plaintext));
enc_size = GNUNET_CRYPTO_symmetric_encrypt (plaintext,
strlen (plaintext),
&skey, &iv,
*cyphertext);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted (len=%d)", enc_size);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted (len=%zd)", enc_size);
return GNUNET_OK;
}
sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
GNUNET_asprintf (result,
- "{\"nonce\": \"%lu\",\"identity\": \"%s\",\"label\": \"%s\"}",
+ "{\"nonce\": \"%"SCNu64"\",\"identity\": \"%s\",\"label\": \"%s\"}",
payload->nonce, identity_key_str, payload->label);
GNUNET_free (identity_key_str);
nonce_str = json_string_value (nonce_json);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found nonce: %s\n", nonce_str);
- GNUNET_assert (0 != sscanf (nonce_str, "%lu", &nonce));
+ GNUNET_assert (0 != sscanf (nonce_str, "%"SCNu64, &nonce));
*result = ticket_payload_create (nonce,
(const struct GNUNET_CRYPTO_EcdsaPublicKey*)&id_pkey,