+Tue May 28 13:56:26 CEST 2002 Pekka Riikonen <priikone@silcnet.org>
+
+ * If private message key is not set, but the flag is set in
+ the packet, ignore the packet since it cannot be decrypted.
+ Affected file lib/silcclient/client_prvmsg.c.
+
Thu May 23 12:00:14 CEST 2002 Pekka Riikonen <priikone@silcnet.org>
* When resuming client, remove the old client entry from
SilcMessageFlags flags;
unsigned char *message;
SilcUInt32 message_len;
+ SilcCipher cipher = NULL;
if (packet->src_id_type != SILC_ID_CLIENT)
goto out;
return;
}
+ cipher = remote_client->receive_key;
+ if (packet->flags & SILC_PACKET_FLAG_PRIVMSG_KEY && !cipher) {
+ silc_free(remote_id);
+ return;
+ }
+
/* Parse the payload and decrypt it also if private message key is set */
payload = silc_private_message_payload_parse(packet->buffer->data,
- packet->buffer->len,
- remote_client->receive_key);
+ packet->buffer->len, cipher);
if (!payload) {
silc_free(remote_id);
return;