aboutsummaryrefslogtreecommitdiff
path: root/src/identity-provider/identity_token.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity-provider/identity_token.c')
-rw-r--r--src/identity-provider/identity_token.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/identity-provider/identity_token.c b/src/identity-provider/identity_token.c
index 3bed6962e..8a90138ec 100644
--- a/src/identity-provider/identity_token.c
+++ b/src/identity-provider/identity_token.c
@@ -98,7 +98,10 @@ decrypt_str_ecdhe (const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv_key,
98 &enc_key, 98 &enc_key,
99 &enc_iv, 99 &enc_iv,
100 str_buf); 100 str_buf);
101 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decrypted bytes: %d Expected bytes: %d\n", str_size, cyphertext_len); 101 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
102 "Decrypted bytes: %zd Expected bytes: %zd\n",
103 str_size,
104 cyphertext_len);
102 if (-1 == str_size) 105 if (-1 == str_size)
103 { 106 {
104 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ECDH invalid\n"); 107 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ECDH invalid\n");
@@ -172,14 +175,14 @@ encrypt_str_ecdhe (const char *plaintext,
172 pub_key, 175 pub_key,
173 &new_key_hash)); 176 &new_key_hash));
174 create_sym_key_from_ecdh(&new_key_hash, &skey, &iv); 177 create_sym_key_from_ecdh(&new_key_hash, &skey, &iv);
175 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypting string %s\n (len=%d)", 178 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypting string %s\n (len=%zd)",
176 plaintext, 179 plaintext,
177 strlen (plaintext)); 180 strlen (plaintext));
178 enc_size = GNUNET_CRYPTO_symmetric_encrypt (plaintext, 181 enc_size = GNUNET_CRYPTO_symmetric_encrypt (plaintext,
179 strlen (plaintext), 182 strlen (plaintext),
180 &skey, &iv, 183 &skey, &iv,
181 *cyphertext); 184 *cyphertext);
182 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted (len=%d)", enc_size); 185 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted (len=%zd)", enc_size);
183 return GNUNET_OK; 186 return GNUNET_OK;
184} 187}
185 188