/* FIXME: check monotonic time is monotonic... */
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY,
- &thp.purpose,
+ &thp,
&rekey->sender_sig,
&queue->target.public_key))
{
However, we have to take into account that the plaintext buffer may have
already contained data and not jumpt too far ahead in the ciphertext.
If there is no rekey and the last message is incomplete (max > total),
- it is safe to keep the decryption so we shift by 'max' */
- if (GNUNET_YES == queue->rekeyed)
+ it is safe to keep the decryption so we shift by 'max' */if (GNUNET_YES == queue->rekeyed)
{
max = total - old_pread_off;
queue->rekeyed = GNUNET_NO;
thp.receiver = queue->target;
thp.ephemeral = rekey.ephemeral;
thp.monotonic_time = rekey.monotonic_time;
- GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (my_private_key,
- &thp.purpose,
- &rekey.sender_sig));
+ GNUNET_CRYPTO_eddsa_sign (my_private_key,
+ &thp,
+ &rekey.sender_sig);
calculate_hmac (&queue->out_hmac, &rekey, sizeof(rekey), &rekey.hmac);
/* Encrypt rekey message with 'old' cipher */
GNUNET_assert (0 ==
ths.receiver = queue->target;
ths.ephemeral = *epub;
ths.monotonic_time = tc.monotonic_time;
- GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_eddsa_sign (my_private_key,
- &ths.purpose,
- &tc.sender_sig));
+ GNUNET_CRYPTO_eddsa_sign (my_private_key,
+ &ths,
+ &tc.sender_sig);
GNUNET_assert (0 ==
gcry_cipher_encrypt (queue->out_cipher,
&queue->cwrite_buf[queue->cwrite_off],
from this sender! */
return GNUNET_CRYPTO_eddsa_verify (
GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE,
- &ths.purpose,
+ &ths,
&tc->sender_sig,
&tc->sender.public_key);
}
queue->address_len = in_len;
queue->sock = sock;
boot_queue (queue, GNUNET_TRANSPORT_CS_OUTBOUND);
- //queue->mq_awaits_continue = GNUNET_YES;
+ // queue->mq_awaits_continue = GNUNET_YES;
queue->read_task =
GNUNET_SCHEDULER_add_read_net (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
queue->sock,
max_queue_length = DEFAULT_MAX_QUEUE_LENGTH;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_time (cfg,
- COMMUNICATOR_CONFIG_SECTION,
- "REKEY_INTERVAL",
- &rekey_interval))
+ COMMUNICATOR_CONFIG_SECTION,
+ "REKEY_INTERVAL",
+ &rekey_interval))
rekey_interval = DEFAULT_REKEY_INTERVAL;
in = tcp_address_to_sockaddr (bindto, &in_len);
options,
&run,
NULL))
- ? 0
- : 1;
+ ? 0
+ : 1;
GNUNET_free ((void *) argv);
return ret;
}