/* Encode the message payload. This also encrypts the message payload. */
payload = silc_message_payload_encode(flags, data, data_len, TRUE, FALSE,
- cipher, hmac, client->rng);
+ cipher, hmac, client->rng, NULL,
+ client->private_key, client->sha1hash);
/* Get data used in packet header encryption, keys and stuff. */
cipher = conn->internal->send_key;
/* Pass the message to application */
client->internal->ops->channel_message(
- client, conn, clients[0], channel,
- silc_message_get_flags(res->payload),
- message, message_len);
+ client, conn, clients[0], channel, res->payload,
+ silc_message_get_flags(res->payload),
+ message, message_len);
}
out:
/* Pass the message to application */
client->internal->ops->channel_message(
- client, conn, client_entry, channel,
- silc_message_get_flags(payload),
- message, message_len);
+ client, conn, client_entry, channel, payload,
+ silc_message_get_flags(payload),
+ message, message_len);
out:
silc_free(id);
/* Produce the key material */
keymat = silc_calloc(1, sizeof(*keymat));
if (silc_ske_process_key_material_data(key, key_len, 16, 256, 16,
- client->md5hash, keymat)
+ client->sha1hash, keymat)
!= SILC_SKE_STATUS_OK)
return FALSE;