updates.
[silc.git] / CHANGES
1 Thu Mar 29 19:10:28 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2
3         * Fixed a fatal bug when client does /join 1 2 3 4 5 6 the server
4           crashed since it did not handle the fact that there is no cipher
5           called "3" and didn't check the error condition.  Now fixed.
6
7         * Added SILC_MESSAGE_FLAG_REQUEST message flag as generic request
8           flag.  It can be used to send message requests.
9
10         * Fixed the WHOIS and IDENTIFY send reply function to really
11           check whether to send list or just one entry.  Affected file
12           silcd/command.c.
13
14         * Cleaned up the LEAVE command's channel key distribution.  The
15           affected file silcd/command.c.
16
17 Thu Mar 29 12:26:25 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
18
19         * Implemented the RESTART command in the client.
20
21         * Added SILC_MESSAGE_FLAG_NOTICE message flag for informational
22           notice type messages.  Added notice printing to the user
23           interface.
24
25         * The channel keys are not re-generated if the channel's mode
26           is PRIVKEY, ie private key on the channel exists.  Affected
27           files silcd/server.c and silcd/command.c.
28
29         * Fixed a little bug in channel message delivery when channel
30           private keys are set in the server.  Affected file is
31           silcd/packet_send.c.
32
33         * Changed the setting on channel->on_channel = TRUE from the
34           silc_client_save_channel_key to the JOIN command reply.  The
35           key payload is not received if the private channel key is set.
36           Affected file lib/silcclient/command_reply.c and the
37           lib/silcclient/client_channel.c.
38
39         * When the CMODE_CHANGE notify is sent and the channel private
40           key mode is removed the channel key must be re-generated in
41           other cells as well.  Added this support for the router in the
42           silcd/packet_receive.c.
43
44         * Added new local command NOTICE to send notice message on
45           channel.  Affected file silc/local_command.[ch].
46
47 Wed Mar 28 23:55:54 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
48
49         * Added new local command ME to the client.  It is used to send
50           message to a channel with SILC_MESSAGE_FLAG_ACTION to indicate
51           some action.  Affected file silc/local_command.[ch].
52
53         * Changed channel_message and private_message client operations 
54           to deliver the message flags to the application.  Added also
55           the `flags' arguments to the silc_client_send_channel_message
56           and silc_client_send_private_message functions.  Affected file
57           silcapi.h.
58
59 Wed Mar 28 20:50:47 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
60
61         * Redefined the Private Message Payload to support private message
62           keys and to support the new private message flags.  Updated
63           the protocol specs.  Flags makes it possible to have for example
64           CTCP style messages.
65
66         * Added new type SilcPrivateMessagePayload and defined an API
67           for it in the lib/silcclient/silcprivate.[ch].
68
69         * Tested private message private keys successfully.  Tested the
70           private message key set, unset and list commands with the new
71           KEY command.
72
73         * Redefined the Channel Message Payload to include the channel
74           message flags (equal with private message flags) to support
75           for example CTCP style messages.
76
77         * Defined some of the message (for channel and private message)
78           flags.  Updated the protocol specs and added the flags to the
79           lib/silccore/silcchannel.h.  The type is SilcMessageFlags.
80
81 Wed Mar 28 15:52:36 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
82
83         * Added SilcKeyAgreementStatus type to the key agreement routines
84           to indicate the current status and error if one occured.
85           The status types are defined in the lib/silcclient/silcapi.h.
86
87         * Added new local command KEY that is used to set and unset private
88           keys for channels, set and unset private keys for private messages
89           with remote clients and to send key agreement requests and
90           negotiate the key agreement protocol with remote client.  The
91           key agreement is supported only to negotiate private message keys,
92           it currently cannot be used to negotiate private keys for channels,
93           as it is not convenient for that purpose.
94
95         * Fixed a minor pending callback setting bug in the function
96           silc_client_get_client_by_id_resolve, now the function works.
97           Affected file lib/silcclient/idlist.c.
98
99         * Added function silc_net_get_local_port to get local bound
100           port by socket.  Added to lib/silcutil/silcnet.[ch].
101
102         * Added `sockets' and `sockets_count' fields to the SilcClient
103           object.  They hold the sockets of the listenning sockets in
104           the client.  Listenning sockets may be for example the key 
105           agreement server.  Affected file lib/silcclient/client.[ch].
106           Added functions the silc_client_add_socket and the
107           silc_client_del_socket.  They are exported to the application
108           as well.
109
110         * Added ~./silc/clientkeys to support other client's public keys.
111
112         * Renamed verify_server_key client operation to verify_public_key
113           and added one argument to indicate the type of the connection
114           (server, client etc.).
115
116 Tue Mar 27 22:22:38 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
117
118         * Added silc_server_connection_auth_request to handle the
119           incoming CONNECTION_AUTH_REQUEST packet.  Affected file is
120           silcd/packet_receive.[ch].
121
122         * Added silc_server_send_connection_auth_request into the
123           silcd/packet_send.c to send the connection auth request packet.
124
125         * Cleaned up the silcd/protocol.c a bit and fixed some memory
126           leaks.
127
128         * Fixed the public key authentication in responder side in the
129           server.  The `auth_data' pointer includes the SilcPublicKey
130           not the path to the public key.  Affected file silcd/protocol.c.
131
132         * Implemented the public key authentication in the initiator side
133           in the server.  Affected file silcd/protocol.c.
134
135         * Removed the [RedirectClient] config section from the server
136           configuration.  Is not needed and I don't want to implement it.
137
138 Tue Mar 27 12:49:56 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
139
140         * Cleaned up the CMODE command in the server.  It now works
141           correctly and supports all the modes defined in the protocol.
142           Affected file is silcd/command.c.
143
144         * Added `hmac_name' field to the SilcChannelEntry in the server
145           to hold the default HMAC of the channel.  It can be set when
146           creating the channel (with JOIN command).  Affected files
147           silcd/idlist.[ch].
148
149         * Added <cipher> and <hmac> argument to the CMODE_CHANGE notify
150           type to indicate the change of the current cipher and hmac
151           on the channel.  Client can safely ignore the <cipher> argument
152           (if it chooses to do so) since the CHANNEL_KEY packet will 
153           force the channel key change anyway.  The <hmac> argument is
154           important since the client is responsible of setting the new
155           HMAC and the hmac key into use.
156
157         * Fixed the CMODE command in the client library as well.
158
159         * Tested CMODE command in router environment successfully.
160
161 Mon Mar 26 14:39:48 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
162
163         * Show the version of the remote client (or server) when connecting
164           to the server.  It is logged to the log file.  Affected file
165           is silcd/protocol.c.
166
167         * Fixed the KILLED notify handling in the client library.  The
168           client must be removed from all channels when receiving the
169           KILLED notify.
170
171           Also, do not remove the client entry when giving the KILL 
172           command but when the KILLED notify is received.
173
174         * Removed silc_idlist_find_client_by_nickname from the server.
175           Not needed anymore.  Affected files silcd/idlist.[ch].
176
177         * Implemented the CHANNEL_CHANGE notify type handling to the
178           server.  Affected file silcd/server.c.
179
180         * Updated TODO.
181
182 Mon Mar 26 12:11:14 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
183
184         * Added silc_server_send_notify_invite to send the INVITE
185           notify between routers.
186
187         * Implemented the INVITE command correctly to the server.
188
189         * Implemented the INVITE notify type handling in the server.
190
191         * Implemented the INVITE command to the client library and on the
192           user interface.
193
194 Sun Mar 25 20:27:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
195
196         * Added function silc_server_get_client_resolve to find the
197           client entry by ID from all ID lists and then resolve it
198           (using WHOIS) if it cannot be found.  Affected file is
199           silcd/server.[ch].
200
201 Sun Mar 25 13:52:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
202
203         * Implemented the BAN command to the client library.
204
205         * The JOIN command in the server now checks the invite list
206           and the ban list.
207
208         * Changed the silc_command_reply_payload_encode_va and the
209           silc_command_payload_encode_va to support that if argument is
210           NULL it ignores and checks the next argument.  Affected file
211           lib/silccore/silccommand.c.
212
213         * Added silc_server_send_notify_ban to send the BAN notify
214           type between routers.
215
216         * Chaned the silc_notify_payload_encode to support that if 
217           argument is NULL it ignores and checks the next argument.
218           Affected file lib/silccore/silcnotify.c.
219
220         * Tested ban lists in router environment successfully.
221
222 Sat Mar 24 14:47:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
223
224         * Implemented BAN command to the server, in silcd/command.[ch].
225
226         * Removed the BAN and INVITE_LIST modes from the CMODE command
227           in the server code.
228
229         * Added function silc_string_match to regex match two strings.
230           Affected files lib/silcutil/silcutil.[ch].
231
232 Fri Mar 23 22:02:40 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
233
234         * Redefined parts of the SilcChannelEntry in the server to support
235           the new ban and invite lists.
236
237 Fri Mar 23 16:25:11 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
238
239         * Redefined the INVITE command.  The same command can be used to
240           invite individuals to the channel but also to manage the invite
241           list of the channel (to add to and remove from the invite list).
242           Updated the protocol specs.
243
244         * Added new command SILC_COMMAND_BAN that can be used to manage
245           the ban list of the channel.  Updated the protocol specs.
246
247         * Removed the channel modes: the SILC_CMODE_BAN and the 
248           SILC_CMODE_INVITE_LIST as they were a bit kludge to be included
249           in the CMODE command.  The equivalent features are now available
250           using INVITE and BAN commands.  Updated the protocol specs.
251
252         * Added new SILC_NOTIFY_TYPE_BAN notify type to notify routers
253           in the network about change in the current ban list.  The notify
254           type is not used by the client.
255
256         * Redefined parts of the SILC_NOTIFY_TYPE_INVITE command to 
257           support the invite lists.
258
259 Thu Mar 22 22:52:23 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
260
261         * Added new function silc_string_regexify that converts string
262           including wildcard characters into regex string that can
263           be used by the GNU regex library.  Added into the file
264           lib/silcutil/silcutil.[ch].
265
266           Added silc_string_regex_combine to combine to regex strings
267           into one so that they can be used as one regex string by
268           the GNU regex library.  Added into the file
269           lib/silcutil/silcutil.[ch].
270
271           Added silc_string_regex_match to match two strings.  It returns
272           TRUE if the strings match.  Added into lib/silcutil/silcutil.[ch].
273
274 Thu Mar 22 15:29:42 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
275
276         * Imported GNU regex to the soruce tree into lib/contrib.
277           Fixed some compiler warning from the regex.c.
278
279 Wed Mar 21 15:27:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
280
281         * Fixed MOTD command in the server to work in router environment.
282
283         * Fixed the MOTD command in the client library to support
284           the server argument in the command.
285
286         * Added `nickname_len' argument to the silc_idlist_add_client
287           in the server, as the `nickname' argument may be binary data
288           (it may be hash).
289
290         * Added silc_idlist_get_channels to return all channels from
291           the ID list.
292
293         * Implemented LIST command to the server.  Affected file is
294           silcd/command.c.
295
296         * Implemented the LIST command to the client library and on the
297           user interface.
298
299         * Added [<user count>] argument to the LIST command reply.
300           With private channels the user count is not shown.
301
302         * Updated TODO and README.
303
304 Tue Mar 20 21:05:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
305
306         * The client entry's data.registered must be TRUE even with
307           global client entry on global client list.  The data.registered
308           is used to check whether the client is anymore in the network,
309           for example with WHOWAS command so it must be valid.
310
311         * Fixed the WHOWAS command in the server.  It now actually works
312           in router environment.  Added function into silcd/command_reply.c
313           silc_server_command_reply_whowas_save.
314
315         * Added silc_idlist_purge function to the silcd/idlist.c
316           to periodically purge the ID Cache.
317
318         * Fixed INFO command in the server.  It works now in router
319           environment.  Added <server name> argument to the INFO command
320           reply.  Updated the protocol specs.
321
322         * Fixed minor bug in silc_idcache_purge to not purge if the
323           expire value is zero.
324
325         * Fixed various bugs in WHOIS and IDENTIFY command handling as
326           they were buggy because of the WHOWAS information.
327
328         * Fixed local command MSG to handle the async resolving of 
329           the remote client properly.  It used to fail the first MSG.
330           Affected file silc/local_command.c.
331
332         * Added `data_len' field to SilcIDCache context.
333
334 Tue Mar 20 16:29:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
335
336         * Update TODO.  Todo in commands in the server.
337
338 Tue Mar 20 15:45:14 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
339
340         * Added new notify type SILC_NOTIFY_TYPE_UMODE_CHANGE that is
341           used by routers as broadcast packet to inform other routers
342           about the changed user mode.
343
344           Implemented the notify handling in the server.  Affected file is
345           silcd/packet_receive.c.  Added the function 
346           silc_server_send_notify_umode to the silcd/packet_send.[ch].
347
348         * Added new generic Channel Payload and deprecated the New Channel
349           Payload.  The New Channel Payload is now the generic Channel
350           Payload.
351
352         * Added new argument `mode' to the silc_server_send_new_channel
353           as it is required in the Channel Payload now.
354
355         * Renamed the SilcChannelPayload to SilcChannelMessagePayload
356           and created a new and real SilChannelPayload to represent the
357           new generic Channel Payload.  Implemented the encode/decode
358           for Channel Payload.  Affected file lib/silccore/silcchannel.[ch].
359
360         * Added silc_server_get_client_channel_list to return the list
361           of channels the client has joined for WHOIS command reply.
362           Affected file silcd/server.[ch].
363
364         * Implemented the channel list sending in the WHOIS command reply
365           in server and in the client.
366
367           Implemented the channel list displaying on the user interface
368           as well.  Affected file silc/client_ops.c.
369
370         * Added silc_channel_payload_parse_list to parse list of Channel
371           Payloads.  It returns SilcDList list of SilcChannelPayloads.
372           Client for example can use this function to parse the list of
373           channels it receives in the WHOIS command reply.  The caller
374           must free the list by calling silc_channel_payload_list_free.
375           Affected files lib/silccore/silcchannel.[ch].
376
377 Mon Mar 19 21:39:15 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
378
379         * Added one new argument <user mode> to the WHOIS command reply
380           to return the mode of the user in SILC.  Updated the protocol
381           specs.
382
383           Implemented it to the server and client.
384
385 Mon Mar 19 18:43:06 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
386
387         * Fixed the mode printing on the user interface on joining.
388           Affected file silc/client_ops.c.
389
390         * Implemented the UMODE command and user modes in general to the
391           client library and to the user interface.
392
393         * Implemented the UMODE command to the server.
394
395         * The server now sends UNKNOWN_COMMAND error status if client sends
396           unknown command.  Affected file silcd/command.c.
397
398         * All server commands now handle the command identifier the right
399           way when sending the command reply to the client.  The client can
400           use to identify the command replies with the identifier.
401
402 Mon Mar 19 16:13:07 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
403
404         * Added silc_server_get_client_route to resolve the route to
405           the client indicated by the client ID.  Affected file is
406           silcd/server.[ch].
407
408         * Added silc_server_relay_packet as general function to relay
409           packet to arbitrary destination.  This deprecates functions
410           like _send_private_message_key, _relay_notify etc.  Affected
411           file is silcd/packet_send.[ch].
412
413           Removed silc_server_send_key_agreement, 
414           silc_server_send_private_message_key and
415           silc_server_packet_relay_notify functions from the file
416           silcd/packet_send.[ch].
417
418         * Updated TODO.
419
420         * Implemented the SILC_NOTIFY_TYPE_KILLED notify handling in the
421           server.  Affected file silcd/packet_receive.[ch].
422
423         * Implemented the KILL command to the client.  Implemented the
424           SILC_NOTIFY_TYPE_KILLED notify handling in the client library.
425           Affected files lib/silcclient/command[_reply].c and
426           lib/silcclient/client_notify.c.  Implemented the KILL notify
427           printing in the user inteface.
428
429         * Fixed a lot silc_parse_nick memory leaks from the client
430           library in the file lib/silcclient/command.c.
431
432         * Changed the silc_server_send_notify_on_channels's `sender'
433           argument from SilcSocketConnection to SilcClientEntry to 
434           check the sender as entry and not as connection object and not
435           to send to the client provided as argument.  The affected file
436           is silcd/packet_send.[ch].
437
438         * The notify packets that are destined directly to the client used
439           to not to be processed by the server.  Now changed that and the
440           server processes all notify packets.  After relaying the packet
441           to the client the notify packet is processed in the server.
442
443         * The silc_server_free_client_data now checks whether there is
444           pending outgoing traffic for the client and purges the data to
445           the network before removing the client entry.
446
447 Sun Mar 18 21:02:47 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
448
449         * Added SILC_NOTIFY_TYPE_KILLED notify type.  It is sent when
450           an client is killed from the SILC Network.  Updated the protocol
451           specs accordingly.
452
453           Added new function silc_server_send_notify_killed to the
454           silcd/packet_send.[ch].
455
456         * Added function silc_server_packet_relay_notify to relay notify
457           packets that are destined directly to a client.  In this case
458           the server does not process the notify packets but merely relays
459           it to the client.  Affected file silcd/packet_send.[ch].
460
461           Added also silc_server_packet_process_relay_notify to check
462           whereto relay the notify.  Affected file is 
463           silcd/packet_receive.[ch].
464
465         * Implemented the KILL command to the server.
466
467         * Updated TODO.
468
469         * Added the backup schema desgined last fall to the protocol
470           specs for everyone to see.  The specification is in the
471           *-spec-xx.txt draft and the packet type definitions for the
472           backup routers is in *-pp-xx.txt draft.  Thusly, added also
473           new packet type SILC_PACKET_CELL_ROUTERS.
474
475         * A big security problem in the implementation discovered.  The
476           signoff of an client did not cause new channel key generation
477           which it of course should've done.  The channel keys must be
478           always re-generated when client leaves (or signoffs) the channel.
479           The silc_server_remove_from_channels funtion now handles
480           the channel key re-generation.
481
482         * Added `sender' argument to the silc_server_send_notify_on_channels
483           to not to send the client provided as argument.  Affected file
484           silcd/packet_send.[ch].
485
486 Fri Mar 16 15:52:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
487
488         * Implemented OPER and SILCOPER commands into the server and
489           the client library.
490
491         * Added silc_auth_verify and silc_auth_verify_data to verify
492           the authentication directly from the authentication payload.
493           It supports verifying both passphrase and public key based
494           authentication.  Affected file lib/silccore/silcauth.[ch].
495
496         * Added `hash' field to the SilcIDListData structure.  It is the
497           hash negotiated in the SKE protocol.  Affected file is
498           silcd/idlist.[ch].
499
500         * Slight redesigning of the SilcAuthPayload handling routines.
501           Do not send SilcPKCS but SilcPublicKey as argument.
502
503         * Implemented the public key authentication support to the
504           serverconfig.  The public key is loaded from the provided path
505           and saved as authentication data to void * pointer.  Thus,
506           changed the unsigned char *auth_data to void *auth_data;
507
508         * Fixed SHUTDOWN command to send the reply before the server
509           is shutdown. :)  Affected file silcd/command.c.
510
511         * Fixed fatal bug in CONNECT command.  The hostname was invalid
512           memory and server crashed.  Affected file silcd/command.c.
513
514         * Fixed fatal bug in CLOSE command.  The server_entry became
515           invalid but was referenced later in the command.  Affected file
516           silcd/command.c.
517
518 Thu Mar 15 12:46:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
519
520         * Fixed fatal bug in failure packet handling.  Server ignored
521           the failure and thus crashed when it came.
522
523         * Updated TODO.
524
525 Wed Mar 14 20:37:35 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
526
527         * Added new SILC_CF_LAG_STRICT command flag that strictly forces
528           that the command may be executed only once in (about) 2 seconds.
529           The old SILC_CF_LAG flag is same but allows command bursts up
530           to five before limiting.
531
532           Added the support for CF_LAG and CF_LAG_STRICT flags to the
533           server code.  Various commands now includes the CF_LAG_STRICT
534           flag to disallow any kind of miss-use of the command.
535
536         * Fixed the silc_buffer_unformat to not to allocate any data
537           if the length of the data is zero.  It used to allocate the
538           length + 1.  Affected file lib/silcutil/silcbuffmt.c.
539
540 Wed Mar 14 16:10:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
541
542         * Changed the format of AdminConnection configuration section
543           in the server.  Added username of the admin to the format.
544           Affected files silcd/serverconfig.[ch].
545
546           Added silc_server_config_find_admin into silcd/serverconfig.[ch]
547           to return admin configuration data by host, username and/or
548           nickname.
549
550 Wed Mar 14 13:18:16 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
551
552         * Implemented WHOWAS command to the server.  Added the functions:
553
554           silc_server_command_whowas_parse,
555           silc_server_command_whowas_send_reply,
556           silc_server_command_whowas_from_client and
557           silc_server_command_whowas_from_server
558
559         * Added <Client ID> argument to the WHOWAS command reply.  Updated
560           the protocol specs accordingly.
561
562         * Implemented WHOWAS command and command_reply to the client
563           library.
564
565           Implemented the WHOWAS printing on the user interface.
566
567 Tue Mar 13 22:17:34 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
568
569         * Added new argument to the WHOWAS command reply, the real name.
570           It is an optional argument.  Updated the protocol specs.
571
572         * Added SilcIDCacheDestructor callback that is registered when
573           the SilcIDCache is allocated.  The callback is called when
574           an cache entry in the ID Cache expires, or is purged from the
575           cache.  Added into lib/silccore/idcache.[ch].
576
577           Added silc_idlist_client_destructor to the silcd/idlist.[ch]
578           to destruct the client entries when the cache entry expires.
579           Other ID Cache's in server and in the client library ignores
580           the destructor.
581
582         * If the ID Cache entry's `expire' field is zero then the entry
583           never expires.  Added boolean `expire' argument to the
584           silc_idcache_add function in the lib/silccore/idcache.[ch].
585           If it is TRUE the default expiry value is used.
586
587         * Added silc_server_free_client_data_timeout that is registered
588           when client disconnects.  By default for 5 minutes we preserve
589           the client entry for history - for WHOWAS command.
590
591 Tue Mar 13 13:26:18 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
592
593         * Added support to the server to enforce that commands are not
594           executed more than once in 2 seconds.  If server receives 
595           commands from client more frequently, timeout is registered
596           to process the commands.  Affected file silcd/command.c.
597           Added new function silc_server_command_process_timeout.
598
599         * Changed NICK_NOTIFY handling in client library to check that
600           if the client's nickname was changed, so there is no need to
601           resolve anything from the server.
602
603         * Removed error printing from the WHOIS and IDENTIFY commands.
604           If error occurs then it is ignored silently in the client library.
605           The application, however, may map the received error to 
606           human readable error string.  The application currently maps
607           the NO_SUCH_NICKNAME error to string.
608
609         * Made the command status message public to the application.  Moved
610           them from lib/silcclient/command_reply.c to 
611           lib/silcclient/command_reply.h.  The application can map the
612           received command status to the string with the
613           silc_client_command_status_message function.
614
615         * Added check to the server to check that client's ID is same
616           as the Source ID in the packet the client sent.  They must
617           match.
618
619 Tue Mar 13 12:49:21 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
620
621         * Added dist-bzip hook to the Makefile.am to make bzip2
622           compressed distributions.
623
624 Mon Mar 12 18:43:38 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
625
626         * Server now enforces the maximum length for the nickname and
627           the channel as protocol specification dictates.  128 bytes for
628           nickname and 256 bytes for channel name.
629
630         * Moved the WHOIS printing to the application.  The client libary
631           does not print out the WHOIS information anymore, the application
632           must do it.  Renamed silc_client_command_reply_whois_print to
633           the silc_client_command_reply_whois_save.
634
635           The client's idle time is also sent to the application now, and
636           the idle is shown on screen.
637
638         * Added silc_client_command_reply_identify_save to save the
639           received IDENTIFY entries.
640
641         * Do not check for channel private keys in message sending and
642           reception if the channel does not have the PRIVKEY mode set.
643           Affected file lib/silclient/client_channel.c.
644
645 Sun Mar 11 20:25:06 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
646
647         * Fixed a minor bug if WHOIS and IDENTIFY command parsing that
648           just surfaced after chaning the JOIN procedure.
649
650 Sun Mar 11 14:59:05 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
651
652         * Added silc_client_get_clients_by_list to get client entries
653           from Client ID list, that is returned for example by JOIN
654           and USERS command replies.  The application should use this
655           function for example when JOIN command reply is received to
656           resolve the clients already on the channel (library does not
657           do that anymore as USERS command reply is not used in the JOIN
658           procedure anymore).  Affected files lib/silcclient/silcapi.h and
659           lib/silcclient/idlist.c.
660
661         * JOIN command reply and USERS command reply returns now SilcBuffer
662           pointers instead of unsigned char pointers when returning
663           the client list and mode list.
664
665         * Added <Client ID> argument to the JOIN command reply, mainly
666           for the server to identify for which client the command was
667           originally sent.  Updated protocol specs accordingly.
668
669         * Added SilcDlist private_key pointer to the SilcChannelEntry
670           in the client to support the channel private keys.  Affected
671           file is lib/silcclient/idlist.h.
672
673         * Added SilcChannelPrivateKey argument to the function
674           silc_client_send_channel_message so that application can choose
675           to use specific private ke if it wants to.  If it is not provided,
676           the normal channel key is used, unless private keys are set. 
677           In this case the first (key that was added first) is used 
678           as the encryption key.
679
680         * Implemented the support for channel private key handling.
681           Implemented the following functions:
682
683           silc_client_add_channel_private_key,
684           silc_client_del_channel_private_keys,
685           silc_client_del_channel_private_key,
686           silc_client_list_channel_private_keys and
687           silc_client_free_channel_private_keys
688
689           Affected file lib/silcclient/client_channel.c.
690
691         * Added the support for the private keys in the channel message
692           sending and encryption and in the message reception and
693           decryption.  Affected funtions are
694           silc_client_send_channel_message and silc_client_channel_message.
695
696 Sat Mar 10 21:36:22 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
697
698         * Added SKE's key verify callback to the client library's
699           KE protocol context. Affected files lib/silcclient/protocol.[ch].
700
701         * Removed the statement that server (or router) must send USERS
702           command reply when joining to the channel so that the client
703           knows who are on the channel.  Instead, the client list and 
704           client's mode list is now sent in the JOIN command reply to the
705           client who joined channel.  This is better solution.
706
707         * Added function silc_server_get_users_on_channel and function
708           silc_server_save_users_on_channel to the silcd/server.[ch].
709
710         * Removed function silc_server_command_send_users from the
711           silcd/command.c.
712
713         * Do not show topic on the client library anymore.  The topic is
714           sent in the command reply notify to the application and the
715           application must show the topic now.
716
717 Sat Mar 10 00:07:37 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
718
719         * Added client searching by nickname hash into the IDENTIFY and
720           WHOIS commands in the server as they were clearly missing from
721           them.  Affected file is silcd/command.c.
722
723         * Fixed a bug in private message receiving in the client library.
724           The remote ID was freed and it wasn't supposed, now it is
725           duplicated.
726
727 Fri Mar  9 12:40:42 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
728
729         * Minor fix to the channel payload; allocate the data area, as it
730           needs to be of specific length.
731
732         * If the key agreement port is zero then the operating
733           system will define the bound port.  Affected files are
734           lib/silcclient/silcapi.h and lib/silcclient/client_keyagr.c.
735
736         * Added new function silc_channel_payload_decrypt into the file
737           lib/silccore/silcchannel.[ch].
738
739         * Moved the channel message etc, check from silc_packet_decrypt
740           to applications.  The library calls now a generic 
741           SilcPacketCheckDecrypt callback which is to return TRUE or FALSE
742           when the packet is either normal or special.  This was done to
743           allow more wide range of checking that was not allowed when
744           the code was in library.  Now applications can do virtually any
745           checks to the packet and return to the library the decision how
746           the packet should be processed.  Affected files are
747           lib/silccore/silcpacket.[ch].
748
749           Added silc_server_packet_decrypt_check to the server and
750           silc_client_packet_decrypt_check to the client library.
751
752         * Added silc_server_packet_send_srcdest into silcd/packet_send.[ch]
753           to send with specified source and destination information.
754
755         * Channel message delivery between routers was broken after the
756           channel key distribution was fixed earlier.  The channel key
757           was used be to distributed to other routers as well which is not
758           allowed by the protocol.  Now this is fixed and channel keys
759           really are cell specific and the channel message delivery between
760           routers comply with the protocol specification.
761
762         * Fixed various commands in server to check also the global list
763           for the channel entry and not just the local list.  The affected
764           file silcd/command.c.
765
766 Thu Mar  8 21:39:03 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
767
768         * Added assert()s to buffer formatting and unformatting routines
769           to assert (if --enable-debug) when error occurs.  Affected
770           file: lib/silcutil/silcbuffmt.c.
771
772         * Changed to auto-reconnect to check whether the remote host is
773           router and register the re-connect timeout if it is.  It used 
774           to check that whether we are normal server, but router must do
775           auto-reconnect with another router as well.  Affected file
776           silcd/server.c.
777
778         * Removed the [<key len>] option from CMODE command as the cipher
779           name decides the key length, nowadays.  See the defined ciphers
780           from the protocol specification.
781
782         * Added [<hmac>] option to the CMODE command to define the HMAC
783           for the channel.  Added SILC_CMODE_HMAC channel mode.
784
785         * Added [<hmac>] option for the JOIN command so that user can
786           select which HMAC is used to compute the MACs of the channel
787           messages.
788
789         * Added Hmac field to the Channel Message Payload.  The integrity
790           of plaintext channel messages are now protected by computing
791           MAC of the message and attaching the MAC to the payload.  The
792           MAC is encrypted.  Now, it is clear that this causes some
793           overhead to the size of the packet but rationale for this is that
794           now the receiver can verify whether the channel message decrypted
795           correctly and also when private keys are set for the channel the
796           receiver can decrypt the packet with several keys and check from
797           the MAC which key decrypted the message correctly.
798
799         * Added silc_cipher_encrypt and silc_cipher_decrypt into the
800           lib/silccrypt/silccipher.[ch].
801
802         * Added silc_hash_len to return the digest length into the
803           lib/silcrypt/silchash.[ch].
804
805         * Rewrote parts of Silc Channel Payload interface in the
806           lib/silccore/silcchannel.[ch].  The encode function now also
807           encrypts the packet and parse function decrypts it.
808
809 Wed Mar  7 20:58:50 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
810
811         * Fixed a minor formatting bug in the SKE's key material processing.
812           It actually might have processed the keys wrong way resulting
813           into wrong keys.
814
815         * Redefined the mandatory HMAC algorithms and added new algorithms.
816           Added hmac-sha1-96 and hmac-md5-96 which are normal hmac-sha1
817           and hmac-md5 truncated to 96 bits.  The mandatory is now 
818           hmac-sha1-96.  Rest are optional (including the one that used
819           to be mandatory).  Rationale for this is that the truncated HMAC
820           length is sufficient from security point of view and can actually
821           make the attack against the HMAC harder.  Also, the truncated
822           HMAC causes less overhead to the packets.  See the RFC2104 for
823           more information.
824
825         * Added new [hmac] configuration section.  The SKE used to use
826           the hash names (md5 and sha1) in the SKE proposal as HMCAS which
827           is of course wrong.  The official names that must be proposed in
828           the SKE are the ones defined in the protocol specification
829           (hmac-sha1-96 for example).  The user can configure any hmac
830           using any hash function configured in the [hash] section.  At
831           least, the mandatory must be configured.
832
833           Rewrote the HMAC interface in lib/silccrypt/silchmac.[ch].
834
835         * Added HMAC list to the SKE proposal list.  It has now both
836           hash algorithm list and HMAC list.  This makes the protocol
837           incompatible with previous versions.  The SKE now seems to work
838           the way it is supposed to work, for the first time actually.
839
840         * Defined plain Hash algorithms to the protocol specification.
841           Added sha1 and md5.
842
843 Tue Mar  6 15:36:11 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
844
845         * Implemented support for key agreement packets into the server.
846           Added functions silc_server_key_agreement and
847           silc_server_send_key_agreement.  Other than these functions,
848           server has nothing to do with this packet.
849
850         * Added support for private message key packets into the server.
851           Added functions silc_server_private_message_key and
852           silc_server_send_private_message_key.
853
854         * Updated TODO.
855
856         * Changed the silc_[client|server]_protocol_ke_set_keys to be
857           called in the protocol's final callback instead in the END
858           protocol state.  This makes a little more sense and in the same
859           time in client we can use the same protocol routines for normal
860           key exchange and to key agreement packet handling as well.
861
862         * Added to both client's and server's KE protocol context the
863           SilcSKEKeyMaterial pointer to save the key material.  We will
864           bring the key material to the protocol's final callback by doing
865           this.  The final callback must free the key material.
866
867         * Added SKE's packet_send callback into client's KE protocol
868           context so that the caller can choose what packet sending function
869           is used.  This way we can use different packet sending when
870           doing normal SKE when doing key agreement packet handling (in
871           the key agreement packet handling we do not want to encrypt
872           the packets).
873
874         * Implemented the responder side of the key agreement routines
875           in the client.  The client can now bind to specified port and
876           accept incoming key negotiation.  The key material is passed
877           to the application after the protocol is over.
878
879         * Implemented the processing of incoming Key Agreement packet
880           in the client.  Added function silc_client_key_agreement to
881           process the packet.
882
883         * Implemented the intiator side of the key agreement routines
884           in the client.  The client can now initiate key agreement with
885           another remote client.  The key material is passed to the
886           application after the protocol is over.
887
888         * Created client_keyagr.c to include all the key agreement 
889           routines.
890
891         * Added macro SILC_TASK_CALLBACK_GLOBAL which is equal to the
892           SILC_TASK_CALLBACK except that it is not static.
893
894         * Created client_notify.c and moved the Notify packet handling
895           from the client.[ch] into that file.
896
897         * Created client_prvmsg.c and moved all private message and
898           private message key routines from the client.[ch] into that file.
899
900         * Create client_channel.c and moved all channel message and
901           channel private key routines from the client.[ch] into that file.
902
903         * Changed silc_client_get_client_by_id_resolve to resolve with
904           WHOIS command instead of IDENTIFY command, in the file
905           lib/silclient/idlist.c.
906
907 Mon Mar  5 18:39:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
908
909         * Implemented the SKE's responder side to the Client library.
910
911         * When FAILURE is received to the protocol do not trust it
912           blindly.  Register a timeout to wait whether the remote closes
913           the connection as it should do it, only after that process the
914           actual failure.  This was changed to both client and server.
915
916         * Added client_internal.h to include some of the structures
917           there instead of client.h in lib/silcclient/.
918
919         * Added function silc_task_unregister_by_callback to unregister
920           timeouts by the callback function.
921
922 Sat Mar  3 19:15:43 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
923
924         * Some "Incomplete WHOIS info" errors has been appearing on the
925           log files.  Took away the entry->userinfo check from WHOIS
926           reply sending.  The entry->userinfo is now " " if client did not
927           provide one.  I thought this was fixed earlier but something
928           is wrong still.  Let's see if the error still appears.
929
930 Wed Feb 28 20:56:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
931
932         * Fixed a minor bug in the login when the channel key is
933           re-generated in the server.  It used to generate the key in
934           wrong order and thus caused problems in the channel traffic.
935
936         * Fixed a minor bug in channel key distsribution after
937           KICK command.  The key was not sent to the router even though
938           it should've been.
939
940 Tue Feb 27 20:24:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
941
942         * Added silc_ske_process_key_material_data as generic routine
943           to process any key material as the SILC protocol dictates.  The
944           function is used by the actual SKE library but can be used by
945           applications as well.  This relates to the private message keys
946           and the channel private keys since they must be processed the
947           same way the normal SILC session keys.  The protocol dictates
948           this.  Affected files: lib/silcske/silcske.[ch].
949
950           Added also silc_ske_free_key_material to free the
951           SilcSKEKeyMaterial structure.
952
953         * Defined silc_cipher_set_key function to set the key for
954           cipher without using the object's method function.  The affected
955           files: lib/silccrypt/silccipher.[ch].
956
957         * Implemented silc silc_client_add_private_message_key,
958           silc_client_add_private_message_key_ske, 
959           silc_client_del_private_message_key,
960           silc_client_list_private_message_keys and
961           silc_client_free_private_message_keys functions in the
962           client library.
963
964           Added functions silc_client_send_private_message_key to send
965           the Private Message Key payload and silc_client_private_message_key
966           to handle incoming Private Message Key payload.
967
968         * Added Cipher field to the Private Message Key payload to set
969           the cipher to be used.  If ignored, the default cipher defined
970           in the SILC protocol (aes-256-cbc) is used.
971
972 Tue Feb 27 13:30:52 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
973
974         * Removed lib/silcclient/ops.h file.
975
976           Redefined parts of the SILC Client Library API. Created new
977           file silcapi.h that deprecates the ops.h file and defines the
978           published Client Library API.  Defined also private message key
979           API and channel private key API into the file.
980
981           This is the file that the application must include from the
982           SILC Client Library.  Other files need not be included by
983           the application anymore.
984
985         * Added new key_agreement client operation callback and also
986           defined the Key Agreement library API for the application.
987
988 Tue Feb 27 11:28:31 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
989
990         * Added new packet type: SILC_PACKET_KEY_AGREEMENT.  This packet
991           is used by clients to request key negotiation  between another
992           client in the SILC network.  If the negotiation is started it
993           is performed using the SKE protocol.  The result of the
994           negotiation, the secret key material, can be used for example
995           as private message key.
996
997           Implemented the Key Agreement payload into the files
998           lib/silccore/silauth.[ch].
999
1000 Mon Feb 26 12:13:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1001
1002         * Redefined ciphers for the SILC protocol.  Added some new ciphers
1003           and defined the key lengths for the algorithms.  Changed the
1004           code accordingly.  The default key length is now 256 bits.
1005
1006         * Fixed SKE key distribution function silc_ske_process_key_material
1007           when the key length is more than 128 bits.  The default key 
1008           length in SILC is now 256 bits.
1009
1010         * Added new command status type: SILC_STATUS_ERR_UNKOWN_ALGORITHM
1011           to indicate unsupported algorithm.
1012
1013         * Renamed rijndael.c to aes.c and all functions as well.
1014
1015         * Fixed a long standing channel key setting bug in client library.
1016           Weird that it has never surfaced before.
1017
1018         * Fixed bug in channel deletion.  If the entire channel is removed
1019           then it must also delete the references of the channel entry
1020           from the client's channel list as the client's channel entry and
1021           the channel's client entry share same memory.
1022
1023 Sun Feb 25 20:47:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1024
1025         * Implemented CONNECT and SHUTDOWN commands in the client.
1026
1027         * Implemented CLOSE command to the client.
1028
1029         * Added the function silc_idlist_find_server_by_name into the
1030           files silcd/idlist.[ch].
1031
1032           Added the function silc_idlist_find_server_by_conn into the
1033           files silcd/idlist.[ch].
1034
1035 Sat Feb 24 23:45:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1036
1037         * DIE command was renamed to SHUTDOWN.  Updated the both code
1038           and protocol specs.
1039
1040         * Defined SILC_UMODE_NONE, SILC_UMODE_SERVER_OPERATOR and
1041           SILC_UMODE_ROUTER_OPERATOR modes into lib/silccore/silcmode.h.
1042
1043         * Implemented CONNECT, CLOSE and SHUTDOWN commands to the server
1044           side.
1045
1046         * Added function silc_server_create_connection function to create
1047           connection to remote router.  My server implementation actually
1048           does not allow router to connect to normal server (it expects
1049           that normal server always initiates the connection to the router)
1050           so the CONNECT command is only good for connecting to another
1051           router.
1052
1053 Sat Feb 24 16:03:45 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1054
1055         * Added SILC_NOTIFY_TYPE_KICKED to indicate that the client
1056           or some other client was kicked from the channel.
1057
1058           Implemented the handling of the notify type to both client
1059           and server.
1060
1061           Implemented silc_server_send_notify_kicked to send the KICKED
1062           notify.  It is used to send it to the server's primary router.
1063
1064         * Implemented the KICK command into server and client.
1065
1066         * Added `query' argument to the silc_idlist_get_client function
1067           to indicate whether to query the client from server or not if
1068           it was not found.
1069
1070         * Added new command status type SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
1071           to indicate that the client is not channel founder.
1072
1073         * Updated TODO.
1074
1075 Sat Feb 24 00:00:55 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1076
1077         * Removed the rng context from SilcPacketContext structure and
1078           changed that the packet routine uses the Global RNG API.
1079
1080 Fri Feb 23 11:22:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1081
1082         * Added support for quit message that client can "leave" on the
1083           channel when it quits the SILC.  It is ditributed inside the
1084           SILC_NOTIFY_TYPE_SIGNOFF notify type.
1085
1086           Added silc_server_free_client_data that will take the
1087           signoff message as argument.
1088
1089         * Changed SKE routines to use the silc_pkcs_sign/verify routines.
1090
1091 Thu Feb 22 23:05:36 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1092
1093         * Updated parts of the protocol specification to keep it up
1094           to date.
1095
1096 Thu Feb 22 15:08:20 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1097
1098         * Added List flag (SILC_PACKET_FLAG_LIST) to indicate list of
1099           payloads in one packet.
1100
1101         * Deprecated following packet types: NEW_ID_LIST, NEW_CHANNEL_LIST,
1102           NEW_CHANNEL_USER_LIST, SET_MODE and SET_MODE_LIST.  List packets
1103           use now the new List flag.
1104
1105         * Also deprecated the following packet types: REPLACE_ID,
1106           NEW_CHANNEL_USER and REMOVE_CHANNEL_USER packet types.
1107          
1108         * Added list support for Notify packet in server.
1109
1110         * Added silc_server_send_notify_channel_change to send the
1111           CHANNEL_CHANGE notify type to replace channel ID's.  Deprecates
1112           the silc_server_send_replace_id.
1113
1114         * Added silc_server_send_notify_nick_change to send the
1115           NICK_CHANGE notify type.  Deprecates the function
1116           silc_server_send_replace_id.
1117
1118         * Added silc_server_send_notify_join to send the JOIN notify type.
1119           Deprecates the function silc_server_send_new_channel_user.
1120
1121         * Added silc_server_send_notify_leave to send LEAVE notify type.
1122           Deprecates the function silc_server_send_remove_channel_user.
1123
1124         * Added silc_server_send_notify_cmode and 
1125           silc_server_send_notify_cumode to send CMODE and CUMODE notify
1126           types.  Deprecates the silc_server_send_set_mode function.
1127
1128         * Added SERVER_SIGNOFF notify type to indicate that server has
1129           quit.  This means that all clients on the channel from that 
1130           server will drop.  This can be also used when netsplit happens.
1131
1132           Deprecated REMOVE_ID packet type since it is not needed anymore
1133           even from server.
1134
1135           Added silc_server_send_notify_server_signoff to send the
1136           SERVER_SIGNOFF notify type.  Deprecates the function
1137           silc_server_send_remove_id.
1138
1139           Added also silc_server_send_notify_signoff to send the
1140           SIGNOFF notify type.
1141
1142         * Employed the PKCS #1. It is the mandatory way to do RSA in the
1143           SILC protocol from this day on.  Changed the protocol 
1144           specification as well.
1145
1146         * Added silc_server_send_notify_topic_set to send TOPIC_SET
1147           notify type.  It is used between routers to notify about
1148           topic changes on a channel.
1149
1150         * Added silc_id_dup into lib/silccore/id.[ch] to duplicate
1151           ID data.
1152
1153         * Partly updated the protocol specification to comply with the
1154           changes now made.  It is still though a bit outdated.
1155
1156         * The JOIN notify type now takes one extra argument <Channel ID>.
1157           The packet used to be destined to the channel but now the
1158           JOIN type may be sent as list thus it is impossible to 
1159           destine it to any specific channel.  By adding this argument
1160           it is again possible.
1161
1162 Wed Feb 21 22:39:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1163
1164         * Added CREDITS file.  The CHANGES and CREDITS file will appear
1165           in the distribution as well.
1166
1167 Wed Feb 21 14:17:04 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1168
1169         * Implemented CMODE_CHANGE, CUMODE_CHANGE and TOPIC_SET notify
1170           types in the server's silcd/packet_receive.c.
1171
1172         * Implemented CMODE and CUMODE to work in router environment.
1173
1174         * Fixed minor encoding and decoding buglet from the
1175           lib/silccore/silcmode.c.
1176
1177         * Fixed buffer overflow from lib/silcclient/command.c in USERS
1178           command parsing.
1179
1180 Wed Feb 21 12:44:00 EET 2001  Mika Boström <bostik@lut.fi>
1181
1182         * Changed all SilcConfigServer* and silc_config_server* to
1183           SilcServerConfig* and silc_server_config*, respectively.
1184           Patch by Bostik.
1185
1186 Wed Feb 21 00:10:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1187
1188         * Associated the ID (client or server ID) to the Authentication
1189           Payload to avoid any possibility of forging.  Updated the
1190           protocol specification and the code accordingly.
1191
1192 Tue Feb 20 14:14:14 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1193
1194         * The RSA key length is now save to the RsaKey context in the
1195           key generation process in lib/silccrypt/rsa.c.  The key length
1196           is now used to figure out the maximum size of the block allowed
1197           to be encrypted/signed.
1198
1199         * Added silc_mp_mp2bin_noalloc into lib/silcmath/mpbin.[ch].  It
1200           is equivalent to the silc_mp_mp2bin but does not allocate any
1201           memory.
1202
1203         * Changed silc_mp_mp2bin API to take length argument.  If it is
1204           non-zero then the buffer is allocated that large.  If zero, then
1205           the size is approximated using silc_mp_sizeinbase, which however
1206           is not relieable.
1207
1208         * Created Global RNG API which is global RNG that application can
1209           initialize.  After initializing, any routine anywhere in the
1210           code (including library) can use RNG without allocating a new
1211           RNG object.  This was done to allow this sort of use of the 
1212           RNG in code that has no chance to allocate RNG object.  All
1213           applications currently allocate this and many routines in the
1214           library use this.  Affected file lib/silccrypt/silcrng.[ch].
1215
1216         * Removed the RNG kludge from lib/silcmath/primegen.c and changed
1217           it to use the Global RNG API.
1218
1219         * Defined Authentication Payload into protocol specification that
1220           is used during SILC session to authenticate entities.  It is
1221           used for example by client to authenticate itself to the server
1222           to obtain server operator privileges.
1223
1224           Implemented this payload into the lib/silccore/silcauth.[ch].
1225           Implemented also routines for public key based authentication
1226           as the new protocol specification dictates.
1227
1228           Moved definitions of different authentication methods from
1229           lib/silccore/silcprotocol.h into lib/silccore/silcauth.h.
1230
1231         * Added silc_pkcs_encrypt, silc_pkcs_decrypt, silc_pkcs_sign,
1232           silc_pkcs_verify and silc_pkcs_sign_with_hash and
1233           silc_pkcs_verify_with_hash functions into the file 
1234           lib/silccrypt/silcpkcs.[ch].
1235
1236 Mon Feb 19 19:59:28 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1237
1238         * The client entry's userinfo pointer must be always valid. 
1239           Otherwise the [<unknown>] bug will surface beacuse the WHOIS
1240           will fail since it requires the userinfo.  Now, the userinfo
1241           is allocated as "" if actual userinfo does not exist.  Actually,
1242           it must exist and it is totally Ok to drop client connections
1243           that does not announce the userinfo.  However, we will make
1244           this workaround for now.
1245
1246         * Added silc_net_get_remote_port into lib/silcutil/silcnet.[ch]
1247           to return the remote port by socket.
1248
1249 Mon Feb 19 14:26:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1250
1251         * Changed SILC_SERVER_COMMAND_EXEC_PENDING macro to the name
1252           SILC_SERVER_PENDING_EXEC and added an new macro
1253           SILC_SERVER_PENDING_DESTRUCTOR which is called to free the
1254           data or when error occurs while processing the pending command.
1255
1256           Added new argument `destructor' into silc_server_command_pending
1257           and to the SilcServerCommandPending object.  This destructor is
1258           now called after calling the pending callback or if error occurs
1259           immediately.  If error occurs the actual pending callback won't
1260           be called at all - only the destructor.  The destructor may be
1261           NULL if destructor is not needed.
1262
1263           All this applies for client library code as well.  Similar
1264           changes were made there as well for the pending commands.
1265
1266           In the client, the application must now allocate the 
1267           SilcClientCommandContext with the silc_client_command_alloc
1268           function.
1269
1270         * Added reference counter to the SilcServerCommandContext.  Added
1271           function silc_server_command_alloc and silc_server_command_dup 
1272           functions.
1273
1274           Same type of functions added to the client library for the same
1275           purpose as well.
1276
1277         * Removed the cmd_ident from IDListData away since it is now 
1278           global for all connections.  It is the command identifier used
1279           in command sending and with pending commands.  The affected file
1280           is silcd/idlist.h.
1281
1282         * Added reference counter to the SilcSocketConnection objecet to
1283           indicate the usage count of the object.  The object won't be
1284           freed untill the reference counter hits zero.  Currently only
1285           server uses this, and client ignores it.  The client must be
1286           set to use this too later.  The affected files are
1287           lib/silccore/silcsockconn.[ch].  Added also the function
1288           silc_socket_dup to increase the reference counter.
1289
1290           This was mainly added because it is possible that the socket
1291           is removed underneath of pending command or other async
1292           operation.  Now it won't be free'd and proper DISCONNECTING
1293           flags, etc. can be set to avoid sending data to connection that
1294           is not valid anymore.
1295
1296         * Added SILC_SET_DISCONNECTING to server.c when EOF is read from
1297           the connection.  After that it sets SILC_SET_DISCONNECTED.
1298           It is, however, possible that the socket data is not still freed.
1299           The silc_server_packet_process now checks that data is not
1300           read or written to connection that is DISCONNECTED.  The socket
1301           get's freed when the reference counter hits zero.
1302
1303 Mon Feb 19 00:50:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1304
1305         * Changed the client operation API: channel_message operation's
1306           `sender' is now the client entry of the sender, not the nickname
1307           and the `channel' is the channel entry, not the channel name.
1308
1309           In the private_message operation the `sender' is now also the
1310           client entry of the sender not the nickname.
1311
1312           Affected file is lib/silcclient/ops.h and all applications
1313           using the client operations.
1314
1315 Sat Feb 17 22:11:50 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1316
1317         * Moved the calling of ops->connect() from connect_to_server_final
1318           into receive_new_id functin since that is the point when the
1319           client is actually allowed to send traffic to network.  The
1320           affected file is lib/silcclient/client.c.
1321
1322 Sat Feb 17 13:15:35 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1323
1324         * When receiving NEW_CHANNEL_LIST, NEW_CHANNEL_USER_LIST,
1325           NEW_ID_LIST and SET_MODE_LIST packets, broadcast the list packet
1326           (if needs broadcasting) instead of broadcasting the packets one
1327           by one which would make a burst in the network traffic.
1328
1329         * Added `broadcast' argument to the functions in silcd/server.[ch]
1330           silc_server_create_new_channel[_with_id] to indicate whether
1331           to send New Channel packet to primary router.
1332
1333 Sat Feb 17 01:06:44 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1334
1335         * Added new function into the silcd/server.[ch] files:
1336           silc_server_create_new_channel_with_id to create new channel with
1337           already existing Channel ID.
1338
1339         * Added new packet type SILC_PACKET_SET_MODE_LIST into the file
1340           lib/silccore/silcpacket.h.  This packet is used t send list of
1341           Set Mode payloads inside one packet.  Server uses this to set
1342           the modes for the channels and clients on those channels, that it
1343           announced to the router when it connected to it.  The protocol
1344           specification has been updated accordingly.
1345
1346         * The silc_server_new_channel did not handle the packet coming
1347           from normal server as it normally does not send that.  However,
1348           when it announces its channels it does send it.  Implemented
1349           the support for that.
1350
1351         * Added SILC_ID_CHANNEL_COMPARE macro to compare to Channel ID's
1352           into the file lib/silccore/id.h.
1353
1354 Fri Feb 16 23:57:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1355
1356         * Fixed memory leaks in the functions silc_idlist_del_client,
1357           silc_idlist_del_channel and silc_idlist_del_server in the file
1358           silcd/idlist.c.  All of those leaked like a sieve.
1359
1360         * Fixed some small memory leaks in the client's function
1361           silc_client_notify_by_server.
1362
1363         * Added functions into silcd/server.c: silc_server_announce_clients,
1364           silc_server_announce_channels and silc_server_announce_server.
1365           These functions are used by normal and router server to announce
1366           to its primary router about clients, channels and servers (when
1367           router) that we own.  This is done after we've connected to the
1368           router.
1369
1370           These functions effectively implements the following packet types:
1371           SILC_PACKET_NEW_CHANNEL_LIST, SILC_PACKET_NEW_CHANNEL_USER_LIST
1372           and SILC_PACKET_NEW_ID_LIST.
1373
1374         * Added new functions into the silcd/packet_receive.[ch]:
1375           silc_server_new_id_list, silc_server_new_channel_list and
1376           silc_server_new_channel_user_list to handle the incoming 
1377           NEW_ID_LIST, NEW_CHANNEL_LIST and NEW_CHANNEL_USER_LIST packets.
1378
1379         * Added support of changing Channel ID in the function
1380           silc_server_replace_id.  If the server that announces a channel
1381           to the router already exists in the router (with same name but
1382           with different Channel ID), router is responsible to send
1383           Replace ID packet to the server and force the server to change
1384           the Channel ID to the one router has.
1385
1386         * Added new notify type SILC_NOTIFY_TYPE_CHANNEL_CHANGE to notify
1387           client that the Channel ID has been changed by the router.  The
1388           normal server sends this to the client.  Client must start using
1389           the new Channel ID as the channel's ID.
1390
1391           Implemented handling of this new type into lib/silcclient/client.c
1392           into the function silc_client_notify_by_server.
1393
1394         * Added new function silc_idlist_replace_channel_id into the files
1395           silcd/idlist.[ch] to replace the Channel ID.
1396
1397 Fri Feb 16 14:14:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1398
1399         * Call silc_server_command_identify_check always when processing
1400           the IDENTIFY command in silcd/command.c
1401
1402 Thu Feb 15 20:07:37 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1403
1404         * Added new packet type SILC_PACKET_HEARTBEAT that is used to
1405           send keepalive packets.  The packet can be sent by clients, 
1406           servers and routers.
1407
1408           Added function silc_socket_set_heartbeat into the file
1409           lib/silccore/silcsockconn.[ch] to set the heartbeat timeout.
1410           If not set, the heartbeat is not performed.  The actual 
1411           heartbeat is implemented in the low level socket connection
1412           library.  However, application is responsible of actually
1413           sending the packet.
1414
1415           Added silc_server_send_heartbeat to send the actual heartbeat
1416           packet into silcd/packet_send.[ch].  Server now performs
1417           keepalive with all connections.
1418
1419         * Added silc_task_get_first function into lib/silcutil/silctask.c
1420           to return the timeout task with shortest timeout.  There was a bug
1421           in task unregistration that caused problems.  TODO has been
1422           updated to include that task system must be rewritten.
1423
1424         * The client library will now resolve the client information when
1425           receiving JOIN notify from server for client that we know but
1426           have incomplete information.
1427
1428         * Rewrote parts of silc_server_remove_from_channels and
1429           silc_server_remove_from_one_channel as they did not remove the
1430           channel in some circumstances even though they should've.
1431
1432         * Encryption problem encountered in server:
1433
1434           The LEAVE command used to send the Channel Key packet to the
1435           router immediately after generating it.  However, the code
1436           had earlier sent Remove Channel user packet but not immediately,
1437           ie. it was put to queue.  The order of packets in the router
1438           was that Channel Key packet was first and Remove Channel User
1439           packet was second, even though they were encrypted in the
1440           reverse order.  For this reason, MAC check failed.  Now, this
1441           is fixed by not sending the Channel Key packet immediately but
1442           putting it to queue.  However, this is more fundamental problem:
1443           packets that are in queue should actually not be encrypted 
1444           because packets that are sent immediately gets encrypted
1445           actually with wrong IV (and thus MAC check fails).  So, packets
1446           that are in queue should be encrypted when they are sent to
1447           the wire and not when they put to the queue.
1448
1449           However, the problem is that the current system has not been
1450           designed to work that way.  Instead, the packet is encrypted
1451           as soon as possible and left to the queue.  The queue is then
1452           just purged into wire.  There won't be any fixes for this
1453           any time soon.  So, the current semantic for packet sending
1454           is as follows:
1455
1456           o If you send packet to remote host and do not force the send
1457           (the packet will be in queue) then all subsequent packets to the
1458           same remote host must also be put to the queue.  Only after the
1459           queue has been purged is it safe again to force the packet
1460           send immediately.
1461
1462           o If you send all packets immediately then it safe to send
1463           any of subsequent packets through the queue, however, after
1464           the first packet is put to queue then any subsequent packets
1465           must also be put to the queue.
1466
1467           Follow these rules and everything works fine.
1468
1469 Thu Feb 15 14:24:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1470
1471         * Added new function silc_server_remove_clients_by_server to
1472           remove all client entries from ID list when the server connection
1473           is lost.  In this case it is also important to invalidate all
1474           client entires as they hold the invalid server entry.  This
1475           fixes fatal bug when server has lost connection and will reconnect
1476           again.
1477
1478 Wed Feb 14 16:03:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1479
1480         * Made some sanity checks to silc_server_daemonise like to check
1481           whether the requested user and group actually exists.
1482
1483         * Added sanity check to SKE's silc_ske_responder_finish to check
1484           that the public and private key actually is valid. 
1485
1486         * Invalidate the client's nickname when receiving Replace ID
1487           packet and the Client ID is being replaced.  This means that the
1488           server will query the nickname if someone needs it (client)
1489           a bit later.
1490
1491         * Sort the ID Cache in client library when the ID Cache data
1492           has changed (needs sorting).
1493
1494         * Do not allow for SILC client to create several connections to
1495           several servers.  The client does not support windows right now
1496           and generating multiple connections causes weird behaviour.
1497
1498           Irssi-silc client does support windows and can handle several
1499           connections without problems, see: www.irssi.org and SILC plugin.
1500
1501         * Fixed some places where client was added to the IDList.  The
1502           rule of thumb is following (in order to get everything right):
1503           If the client is directly connected local client then the 
1504           `connection' argument must be set and `router' argument must be 
1505           NULL to silc_idlist_add_client function.  If the client is not
1506           directly connected client then the `router' argument must
1507           bet set and the `connection' argument must be NULL to the
1508           silc_idlist_add_client function.
1509
1510         * The funtion silc_server_packet_send_local_channel actually did
1511           not check whether the client was locally connected or not.  It
1512           does that now.  Fixed a bug related to LEAVE command.
1513
1514         * Fixed Remove Channel User payload parsing bug in server's
1515           silcd/packet_receive.c.  Fixed a bug related to LEAVE command.
1516
1517         * The server's silc_server_save_channel_key now checks also the
1518           global ID list for the channel as it might not be in the local
1519           list.  Fixed a bug related to LEAVE command.
1520
1521         * Is this the end of the [<unknown>] buglet that has been lurking
1522           around for a long time?  A little for loop fix in server's
1523           silc_server_command_whois_parse that is used by both IDENTIFY
1524           and WHOIS command.  At least, this was a clear bug and a cause
1525           of one type of [<unknown>] buglet.
1526
1527         * WHOIS and IDENTIFY commands call the function
1528           silc_server_command_[whois/identify]_check function even if
1529           we are not router server.
1530
1531 Tue Feb 13 19:55:59 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1532
1533         * Added --with-gmp configuration option.  If set the GMP
1534           is always compiled in the SILC source tree.  If not set then
1535           it is checked whether the system has the GMP3 installed.  If
1536           it has then the GMP won't be compiled (the system's headers
1537           and library is used), if it doesn't have it then the GMP is
1538           compiled in the SILC source tree.
1539
1540 Mon Feb 12 11:20:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1541
1542         * Changed RSA private exponent generation to what PKCS #1
1543           suggests.  We try to find the smallest possible d by doing
1544           modinv(e, lcm(phi)) instead of modinv(e, phi).  Note: this is
1545           not security fix but optimization.
1546
1547 Sun Feb 11 18:19:51 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1548
1549         * Added new config entry [Identity] to fork the server and run
1550           it as specific user and group.  A patch from Bostik.
1551
1552         * Imported Dotconf configuration library into lib/dotconf.
1553           This will be used to create the SILC configuration files later.
1554           It will appear in the distsribution after this commit.
1555
1556 Sat Feb 10 21:13:45 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1557
1558         * A big code auditing weekend happening.  Auditing code for 
1559           obvious mistakes, bugs and errors.  Also, removing any code
1560           that is obsolete.
1561
1562           Removed files for being obsolete:
1563
1564           o lib/silcutil/silcbuffer.c (the buffer interface is entirely in
1565           inline in the file lib/silcutil/silcbuffer.h)
1566
1567           o lib/silcutil/silcbufutil.c (the header has inline versions)
1568
1569           Changed code to fix possible error conditions:
1570
1571           o The buffer formatting routines now check that the destination
1572           buffer really has enough space to add the data.  This applies for
1573           both buffer formatting and unformatting 
1574           (lib/silcutil/silcbuffmt.[ch]).  Also, the entire buffer
1575           unformatting was changed to accomodate following rules: 
1576           XXX_*STRING_ALLOC will allocate space for the data into the pointer
1577           sent to the function while XXX_*STRING will not allocate or copy 
1578           the data into the buffer.  Instead it sets the pointer from the
1579           buffer into the pointer sent as argument (XXX_*STRING used to
1580           require that the pointer must be allocated already).  This change
1581           makes this whole thing a bit more consistent and more optimized
1582           (note that the data returned in the unformatting with XXX_*STRING
1583           must not be freed now).  The routines return now -1 on error.
1584
1585           o Tried to find all code that use buffer_format and buffer_unformat
1586           and added return value checking to prevent formatting and
1587           especially unformatting errors and possible subsequent fatal
1588           errors.
1589
1590           o Changed ske->x and ske->KEY to mallocated pointers in
1591           lib/silcske/silcske.h.  Fixed possible data and memory leak.
1592
1593           o Added return value checking to all *_parse* functions.  Fixed
1594           many memory leaks as well.
1595
1596           o Added length argument to silc_id_str2id in lib/silccore/id.[ch]
1597           so that buffer overflows would not happen.  All code now also
1598           checks the return value as it can fail.
1599
1600 Mon Feb  5 20:08:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1601
1602         * Added reconnection support to server if the normal server looses
1603           its connection to the router (for example if router is rebooted).
1604           The server performs normal reconnection strategy implemented
1605           to the server.  Affected file silcd/server.c.
1606
1607 Sun Feb  4 13:18:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1608
1609         * Added new packet type SILC_PACKET_SET_MODE that is used to
1610           distribute the information about changed modes (for clients,
1611           channels and clients channel modes) to all routers in the
1612           network.  Updated the protocol specification accordingly.
1613
1614           Added functions into silcd/packet_send.c and 
1615           silcd/packet_receive.c: silc_server_send_set_mode, 
1616           silc_server_set_mode.
1617
1618           Added new files silcmode.[ch] into lib/silccore that implements
1619           the encoding and decoding of Set Mode Payload.  Added new type
1620           SilcSetModePayload.  Moved the definitions of different modes
1621           from lib/silccore/silcchannel.h into lib/silccore/silcmode.h.
1622
1623 Sat Feb  3 15:44:54 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1624
1625         * Oops, a little mistake in server's connection authentication 
1626           protocol.  The protocol is not ended with FAILURE but with
1627           SUCCESS if the authentication is Ok. :)  Affected file is
1628           silcd/protocol.c.
1629
1630         * Implemented NICK_CHANGE notify handling in server in the file
1631           silcd/packet_receive.c  The NICK_CHANGE notify is distributed to
1632           the local clients on the channel.  After the changing nickname
1633           in router environment snhould work and the [<unknown>] nickname
1634           should appear no more.
1635  
1636           The silc_server_replace_id function that receives the Replace ID
1637           payload now sends the NICK_CHANGE notify type also in the file
1638           silcd/packet_receive.c
1639
1640         * Changed WHOIS and IDENTIFY command to support the maximum amount
1641           of arguments defined in protocol specs (3328 arguments).  This 
1642           fixed a bug that caused problems when there were more than three
1643           users on a channel.
1644
1645 Fri Feb  2 11:42:56 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1646
1647         * Added extra parameter, command identifier, to the
1648           silc_client_send_command so that explicit command identifier
1649           can be defined.
1650
1651           Changed that ID list routines uses specific command identifier
1652           when sending WHOIS/IDENTIFY requests to the server so that they
1653           can be identified when the reply comes back.
1654
1655           Affected files lib/silcclient/command.[ch],
1656           lib/silcclient/client.c and lib/silcclient/idlist.[ch].
1657
1658         * Added `sender' argument to silc_server_packet_send_to_channel
1659           to indicaet the sender who originally sent the packet to us
1660           that we are now re-sending.  Ignored if NULL.  Affected file
1661           silcd/packet_send.[ch].
1662
1663         * Added some server statistics support in silcd/server_internal.h
1664           SilcServerStatistics structure and around the server code.  Also
1665           send some nice statistics information when client is connecting
1666           to the client.
1667
1668 Thu Feb  1 23:31:21 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1669
1670         * Fixed channel ID decoding in server's JOIN command reply in
1671           silcd/command_reply.c
1672
1673         * Fixed braodcasting of replace ID payload to not to send it if
1674           we are standalone server in silcd/packet_receive.c.
1675
1676         * Fixed all channel message sending routines to not to send
1677           packets to clients that has router set, since they are routed
1678           separately in the same function earlier.  Affects file
1679           silcd/packet_send.c and all channel packet sending functions.
1680
1681         * In USERS reply, res_argv[i] are not allocated, the table
1682           is allocated.  Thus changed that free the table, not its
1683           internals.
1684
1685         * In server's whois_check and identify_check if the client is
1686           locally connected do not send any WHOIS commands - they are not
1687           needed.
1688
1689 Thu Feb  1 21:32:27 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1690
1691         * Fixed some minor bugs in client when sending WHOIS command.  The
1692           arguments was in wrong order.
1693
1694         * Removed statis function add_to_channel from server in 
1695           silcd/command.c that was previously used with the joining but
1696           is obsolete now.
1697
1698         * Tested USERS command in router environment successfully with two
1699           routers, two servers and two clients.
1700
1701 Thu Feb  1 00:54:26 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1702
1703         * Reorganized the USERS command and command reply in client library
1704           in lib/silcclient/command.c and lib/silcclient/command_reply.c.
1705           When the command is given by user we register a pending command
1706           callback that will reprocess the command after the reply has been
1707           received from the server.  When reprocessing the packet we then
1708           display the information.  Thus, the USERS information is displayed
1709           now in the command callback instead of in the command reply
1710           callback.  The processing of the command is same as previously
1711           when server has sent the command reply in the JOINing process.
1712
1713         * Added to USERS command in silcd/command_reply.c to join the client,
1714           we didn't use to know about, to the channel after we've created
1715           a client entry for it.  Also, for clienet we did know already still
1716           check whether it is on the channel or not and add it if not.
1717
1718         * Removed silc_server_command_join_notify as the function and its
1719           use was obsolete.
1720
1721 Tue Jan 30 22:39:15 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1722
1723         * Changed the client's pending command handling to the same as the
1724           server's pending command handling.  It is also now possible to
1725           execute command reply functions from other command reply
1726           function as the function callbacks for commands and command
1727           replies are one and same.  The pending commands are not static
1728           list anymore, it is mallocated SilcDList in lib/silcclient/client.h
1729           in client connection context.  Thus, pending commands are server
1730           connection specific as it is convenient.
1731
1732           Changed the function silc_client_command_pending and
1733           silc_client_command_pending_del and added new function
1734           silc_client_command_pending_check.  Removed the 
1735           SILC_CLIENT_CMD_REPLY_EXEC, and SILC_CLIENT_PENDING_COMMAND_CHECK
1736           macros.
1737
1738         * Added cmd_ident, current command identifier, to the client
1739           connection context in lib/silcclient/client.h to keep track on
1740           command identifiers used in command sending.  Client's command reply
1741           function handling now supports the mandatory command identifiers.
1742
1743         * Added SILC_CLIENT_COMMAND_EXEC_PENDING macros to all command reply
1744           funtions in client to fully support pending command callbacks.
1745
1746         * NOTE: the name_list in USERS (old NAMES) command is NOT sent anymore
1747           as one of the arguments to the application in the command reply
1748           client operation.
1749
1750         * NOTE: The FORWARDED flag is depracated.  It used to be depracated
1751           before first releasing SILC but came back.  Now it is removed again
1752           and should come back nomore.  The FORWARDED flag was used only
1753           by the JOINing procedure by forwarding the command packet to router.
1754           Now, the JOINing procedure has been changed to more generic (due
1755           to various router environment issues) and FORWARDED is not needed
1756           anymore for anything.  The protocol specification is yet to be
1757           updated.
1758
1759           Now, removed silc_server_packet_forward from server and the flag
1760           SILC_PACKET_FORWARDED from lib/silccore/silcpacket.h.
1761
1762 Tue Jan 30 00:05:05 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1763
1764         * Renamed NAMES command to USERS command.  The NAMES was named that
1765           due to historical reasons.  Now it is renamed.  Also, rewrote
1766           parts of the USERS command.  The nickname list is not sent anymore
1767           by the server.  Only Client ID and mode lists are sent in the USERS
1768           command.  Changed this also to the protocol specification.
1769
1770           The client now resolves the names and stuff after it receives
1771           the USERS list from the server when joining to the channel.
1772
1773         * WHOIS and IDENTIFY commands has been changed to support multiple
1774           Client ID's per command.  One can now search for multiple users
1775           in the network by sending only one WHOIS or IDENTIFY command.
1776           Changed the code and the protocol specifications.
1777
1778         * Removed silc_server_command_identify_parse and changed that IDENTIFY
1779           uses silc_server_command_whois_parse to parse the request. */
1780
1781         * If normal server, do not parse the WHOIS and IDENTIFY requests
1782           before sending it to the router.  Saves some time.
1783
1784 Sun Jan 28 16:19:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1785
1786         * Fixed JOIN command on client library.  Wrong number of arguments
1787           used to crash the client.
1788
1789         * Added silc_server_channel_has_global function to check whether
1790           channel has global users or not.
1791
1792         * Added silc_server_channel_has_local function to check whether channel
1793           has locally connected clients on the channel.
1794
1795         * The silc_server_remove_from_one_channel now checks whether the
1796           channel has global users or not after given client was removed from
1797           the channel.  It also checks whether the channel has local clients
1798           on the channel anymore.  If it does not have then the channel entry
1799           is removed as it is not needed anymore.
1800
1801         * The silc_server_notify now checks on JOIN notify whether the joining
1802           client is one of locally connected or global.  If it is global then
1803           the channel has now global users on the channel and that is marked
1804           to the channel entry.  Also, it now saves the global client to
1805           global list who is joining and JOINs it to the channel.  This is
1806           for normal server, that is.
1807
1808           Changed silc_server_send_notify_on_channel, 
1809           silc_server_packet_relay_to_channel and 
1810           silc_server_packet_send_to_channel check if we are normal server
1811           and client has router set (ie. global client) do not send the
1812           message to that client, as it is already routed to our router.
1813
1814         * Implemented LEAVE notify type handling in silc_server_notify 
1815           function.
1816
1817         * Tested LEAVE command in router environment successfully.  Tested
1818           with two routers, two servers and two clients.
1819
1820         * Updated TODO.
1821
1822         * idlist_find_xxx_by_id routines now dumps the ID on the debug mode.
1823
1824         * Implemented SIGNOFF notify type handling in silc_server_notify
1825           function.
1826
1827         * silc_server_remove_id now removes the client entry from all channels
1828           it has joined and thusly sends SIGNOFF notify type.
1829
1830         * Rewrote the NAMES list generation in server by removing two excess
1831           loops.  The lists are created now inside one loop.
1832
1833 Sat Jan 27 22:34:56 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1834
1835         * silc_server_remove_channel_user checks now also global list
1836           for channel and client.
1837
1838         * silc_server_new_channel_user checks now both local and global
1839           list for channel and client.  Fixed a bug in client id decoding.
1840           Used to decode wrong buffer.
1841
1842         * silc_server_channel_message checks now both local and global
1843           list for channel entry.
1844
1845         * Tested channel joining (hence JOIN) in router environment
1846           successfully.  Tested with two routers, two servers and two
1847           clients.
1848
1849         * Tested channel message sending in router environment successfully.
1850
1851 Thu Jan 11 03:22:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1852
1853         * Added silc_server_save_channel_key into server.[ch] to save the
1854           received channel key in Channel Key payload processing. It is
1855           also used in JOIN command reply handling.
1856
1857           Equivalent function silc_client_save_channel_key added into
1858           client.[ch] into client library.
1859
1860         * Changed JOIN command reply to send information whether the channel
1861           was created or not (is existing already) and the channel key 
1862           payload.  Changed protocol specs accordingly.
1863
1864         * Fixed bugs in WHOIS and IDENTIFY command reply sending when
1865           the request was sent by ID and not by nickname.  Crashed on
1866           NULL dereference.
1867
1868 Sat Dec 23 21:55:07 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
1869
1870         * Fixed a bug in Client library.  IDENTIFY and WHOIS reply functions
1871           now correctly save the received data.
1872
1873         * silc_server_free_sock_user_data now notifies routers in the 
1874           network about entities leaving the network.
1875
1876           At the same time implemented functions silc_server_remove_id
1877           and silc_server_send_remove_id to receive and send REMOVE_ID
1878           packets.  The packet is used to notify routers in the network
1879           about leaving entities.  The ID removed will become invalid in
1880           the network.
1881
1882         * Added function silc_idlist_del_server into server. Removes and
1883           free's server entry from ID list.
1884
1885         * silc_server_private_message function now checks, if we are router,
1886           that the destination ID really is valid ID, naturally.
1887
1888         * In router when NEW_ID packet is received (for new client) the
1889           hash of the Client ID is saved in the ID Cache but the
1890           client->nickname is set to NULL, instead of putting the hash
1891           to it as well.
1892
1893           IDENTIFY command now also checks that client->nickname must be
1894           valid. If it is not if will request the data from the server who
1895           owns the client.  Added new function 
1896           silc_server_command_identify_check.
1897
1898         * Added silc_command_set_command into lib/silccore/silcommand.[ch]
1899           to set the command to already allocated Command Payload.
1900
1901         * Tested private message sending in router environment with two
1902           routers, two servers and two clients.  Fixed minor bugs and now
1903           it works fine.
1904
1905         * Fixed segfault from client's NAMES command. Used to crash if
1906           not on any channel.
1907
1908         * Forwarded packets must not be routed even if it is not destined
1909           to the receiver.  Changed server code comply with this.
1910
1911 Sun Dec 17 14:40:08 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
1912
1913         * Added `require_reverse_mapping' boolean value to ServerParams
1914           structure. If TRUE (not default) the server will require that
1915           the connecting host has fully qualified domain name.
1916
1917           If the reverse mapping is not required and hostname could not be
1918           found the IP address is used as hostname.
1919
1920 Sat Dec 16 17:39:54 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
1921
1922         * Implemented version string checking to both client and server.
1923           The check is incomplete currently due to the abnormal version 
1924           strings used in development version of SILC.
1925
1926         * Changed all command functions in server to use the new
1927           CHECK_ARGS macro.
1928
1929 Fri Dec 15 15:55:12 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
1930
1931         * Changed char *data to unsigned char *data in ID Cache system to
1932           support binary data as ID Cache data. Changed code to support
1933           binary data in lib/silccore/idcache.c.
1934
1935         * Renamed silc_server_packet_relay_command_reply to 
1936           silc_server_command_reply as it is normal packet receiving
1937           function. Rewrote the function to accept command replys for
1938           servers and not only for clients.
1939
1940         * Mark remote router always as registered server if we are connecting
1941           to it.  Otherwise, commands sent by the router to us are ignored.
1942
1943         * All ID List find routines now returns the ID Cache Entry pointer
1944           as well if requested.
1945
1946         * WHOIS command works now in router environment, tested with two
1947           routers, two servers and two clients.
1948
1949         * Cleaned up and rewrote IDENTIFY command. IDENTIFY should work now
1950           in router environment (as it is almost equivalent to WHOIS) but
1951           hasn't been tested thoroughly.  Added new functions:
1952
1953           silc_server_command_identify_parse
1954           silc_server_command_identify_send_reply
1955           silc_server_command_identify_from_client
1956           silc_server_command_identify_from_server
1957
1958         * Disabled route cache adding because adding two different ID's with
1959           same IP replaces the old cache entry thus giving wrong route.
1960           The entry->router->connection is always the fastest route anyway
1961           so route cache may not be needed.  Of course, new routes maybe
1962           established after receiving the ID when the entry->router->connection
1963           might not be anymore the most optimal.
1964
1965 Thu Dec 14 15:55:35 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
1966
1967         * Add route cache for received ID for fast routing.
1968
1969         * Added silc_server_packet_route to route received packet on router
1970           that is not destined to us.
1971
1972         * Renamed silc_server_get_route to silc_server_route_get.
1973
1974         * Added id_string and id_string_len fields into SilcServer to
1975           include encoded ServerID for fast comparing without excess
1976           encoding of the ID's.
1977
1978         * Cleaned up WHOIS command on server side. Added following static
1979           functions:
1980
1981           silc_server_command_whois_parse
1982           silc_server_command_whois_check
1983           silc_server_command_whois_send_reply
1984           silc_server_command_whois_from_client
1985           silc_server_command_whois_from_server
1986
1987         * Added macro SILC_SERVER_COMMAND_CHECK_ARGC to check mandatory
1988           arguments in command replies. All command functions should be
1989           updated to use this macro.
1990
1991 Sun Dec 10 23:52:00 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
1992
1993         * Minor typo fixes on command reply handling on server.
1994
1995 Tue Nov 28 11:05:39 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
1996
1997         * Added silc_server_command_add_to_channel internal routine to add
1998           the client to the channel after router has created the channel and
1999           sent command reply to the server.
2000
2001         * Added generic silc_server_send_command to send any command from
2002           server.
2003
2004         * Use static buffer with ID rendering instead of duplicating data.
2005
2006 Mon Nov 27 21:39:40 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2007
2008         * Fixed a channel user mode bug when joining to a channel server gave
2009           everybody channel founder rights, oops.
2010
2011         * We mark ourselves as the router of the incoming server connection
2012           if we are router ourselves.  This way we can check in some packet
2013           sending functions whether it is locally connected server.  For
2014           incoming router connections we put NULL.
2015
2016         * For router sending packets locally means now always sending the
2017           packet cell wide; to local clients and local servers.  For normal
2018           server sending packet locally means sending it to only local
2019           clients.
2020
2021         * Fixed the JOIN command to really work in router environment.  If the
2022           channel is created it is always created by the router.  Router is
2023           also responsible of making the initial joining to the channel,
2024           sending JOIN notify to the sending server and distributing 
2025           NEW_CHANNEL and NEW_CHANNEL_USER packets.  Hence, if the channel
2026           does not exist server doesn't do anything else but forward the
2027           command to the router which performs everything.
2028
2029         * Added silc_server_send_channel_key function to send the Channel Key
2030           payload.
2031
2032         * Added silc_server_create_channel_key to create new channel key.  The
2033           channel key is now re-generated everytime someone joins or leaves
2034           a channel, as protocol dictates.  Note: channel->key_len is the
2035           key length in bits.
2036
2037 Wed Nov 22 22:14:19 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2038
2039         * Splitted server.[ch] finally.  Created now packet_send.[ch] and
2040           packet_receive.[ch] to separate packet sending and receiving
2041           routines.  The server.[ch] now includes everything else including
2042           actual packet processing (writing and reading data) and other
2043           server issues.
2044
2045           Renamed silc_server_private_message_send_internal to
2046           silc_server_send_private_message.  The routine is still though
2047           used only to relay private messages as server does not send
2048           private messages itself.
2049
2050           Renamed silc_server_new_channel to silc_server_create_new_channel
2051           and added new function sicl_server_new_channel that handles the
2052           incoming New Channel packet.  Added also new sending function
2053           silc_server_send_new_channel to send New Channel Payload.
2054
2055         * Added new function silc_server_notify to process incoming notify
2056           packet to the server/router. Server may then relay the notify
2057           to clients if needed.
2058
2059         * Added new function silc_server_new_channel_user to process incoming
2060           New Channel User packet.  Router will redistribute the packet and
2061           send JOIN notify to its local clients and locally connected servers
2062           if needed.  Normal server will send JOIN notify to its local client
2063           on same channel when received this packet.  Added also corresponding
2064           sending function silc_server_send_new_channel_user to sent the
2065           payload.
2066
2067         * Added boolean route argument to send_notif_to_channel and
2068           packet_send_to_channel functions to attempt to route the packet
2069           if it is TRUE and send only locally if it is FALSE.
2070
2071 Tue Nov 21 19:49:31 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2072
2073         * silc_server_replace_id now broadcasts the received replace ID
2074           packet if it is not broadcast packet already. The router must
2075           broadcast to inform other routers about changed ID.
2076
2077         * Added backpointer to server's router into SilcServer context in
2078           silcd/server_internal.h.
2079
2080         * Fixed silc_server_packet_broadcast to send correct broadcast
2081           packets.
2082
2083         * The channel key is now distributed to the local client as soon
2084           as it is received from the router (in router environment) so that
2085           no other packet may be sent for the channel until client has 
2086           received the key.
2087
2088         * silc_server_remove_channel_user now broadcasts the received
2089           Remove Channel User packet if it is not broadcast packet already.
2090           The router must broadcast to inform other routers about removed
2091           channel user.
2092
2093         * Added users field into SilcPacketContext that is a reference count
2094           of the context.  One can increase the reference count by calling
2095           silc_packet_context_dup which is now changed to just increase the
2096           reference count instead of duplicating the data.  The reference
2097           count is decresed by calling silc_packet_context_free that will
2098           free the data after the reference count hits zero.
2099
2100           For now on the packet context and everything allocated into it
2101           (including the raw packet from network) must be freed by calling
2102           the new silc_packet_context_free function.  Added also new function
2103           silc_packet_context_alloc that must be used now to allocate the
2104           context.  This also means that if a routine is asynchronous from
2105           silc_[client/server]_packet_parse_type the packet context must
2106           be duplicated by calling silc_packet_context_dup.  Otherwise it
2107           gets free'd after silc_[client/server]_packet_parse_type returns.
2108           Also, one must remember that if packet is duplicated then its 
2109           reference count must be decresed by calling the free function as
2110           many times as it was duplicated.
2111
2112         * Changed SilcBuffer field from protocol contexts to SilcPacketContext
2113           from both client and server.
2114
2115 Mon Nov 20 23:47:03 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2116
2117         * Made joining to a channel working in router environment.
2118
2119         * Cleaned up JOIN command on server side and create function
2120           silc_server_command_join_channel internal routine to make the
2121           joining happen.
2122
2123 Thu Nov  9 21:12:39 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2124
2125         * Changed silc_command_pending list to SilcDList.  Also, added
2126           `ident' field to SilcServerCommandPending structure to identify
2127           the reply and to call correct callback.
2128
2129           Added silc_server_command_pending_check function to replace the
2130           corresnponding macro.  The silc_command_pending list is not
2131           extern anymore.
2132
2133         * Added silc_command_set_ident into lib/silccore/silccommand.[ch]
2134           to set identifier to previously allocated Command Payload.  It
2135           is used to set identifier for command when resending Command
2136           Payload.
2137
2138         * Added silc_command_payload_encode_payload to encode Command
2139           Payload buffer from SilcCommandPayload structure.
2140
2141         * Added silc_argument_payload_encode_payload to encode Argument
2142           payload buffer from SilcArgumentPayload structure.
2143
2144 Wed Nov  8 21:03:28 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2145
2146         * Changed WHOIS command to support router connection on server side.
2147           The whois request is always sent to router unless the server is
2148           standalone server.  After server has received the reply from the
2149           router will it send the reply to the client.
2150
2151         * Added silc_server_packet_broadcast into silcd/server.[ch] to
2152           broadcast received broadcast packet.  The function is used only
2153           by router.  The broadcast packet is always sent to the router's
2154           primary route.
2155
2156         * Added silc_id_render function in lib/silcutil/silcutil.[ch] to
2157           render given ID to printable string, for log files for example.
2158
2159 Tue Nov  7 22:14:19 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2160
2161         * Made basic router to router connections working.  At least they
2162           can now connect to each other but nothing really works the way
2163           they are supposed - yet.
2164
2165         * Added new initiator token to RouterConnection configuration
2166           file in silcd/serverconfig.[ch].  It is used to tell whether we
2167           are the initiator to the remote router or whether we'll expect
2168           the other end to connect.
2169
2170         * Moved registering of listener task to silc_server_init, hence
2171           the server starts listenning as soon as it is run, even if it
2172           does not have connections to other routers.  Let's see how well
2173           this will work.
2174
2175         * Changed default connection retry timeouts for more suitable in
2176           silcd/server.h.
2177
2178         * Removed cipher and such arguments from silc_idlist_add_client
2179           and silc_idlist_add_server prototypes from silcd/idlist.[ch].
2180           Added new function silc_idlist_add_data to add the keys and stuff
2181           to any ID entry.
2182
2183         * Added SilcIDListData structure and added it to SilcClientEntry
2184           and SilcServerEntry as their first field in the structure.  This
2185           way we can explicitly cast the ID entries to the SilcIDListData
2186           structure and get common data for the entries.  In past, we had
2187           to first check what type of connection it is and then cast it to
2188           correct ID entry type.  Now, we can directly cast the opaque
2189           pointer to the SilcIDListData (no matter what ID entry it actually
2190           is) and get the data needed.
2191
2192 Mon Nov  6 21:56:12 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2193
2194         * Wow, found a bug in scheduler.  The scheduler uninitialized itself
2195           in some circumstances even if threre were timeout tasks, though not
2196           IO tasks, but tasks anyway.  Now fixed.
2197
2198         * Defined SilcServerConnection structure to hold connection specific
2199           stuff about directly connected servers and routers.  The definition
2200           is currently in silcd/server_internal.h.  I thought about having
2201           a bit more important role fro this struct but for now it is used
2202           only when connecting to other server (or router actually).
2203
2204         * Added connecting retry support in server when connecting to
2205           router(s).  The retry feature implement exponential backoff
2206           algorithm.  Also, added SilcServerParams structure to hold default
2207           parameters for server.  For now, it include these retry settings
2208           and are hard coded.  After server is moded to be as Silc Server
2209           Library this structure will be more important.
2210
2211 Sun Nov  5 22:28:44 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2212
2213         * Changed client librarys channel->clients table to SilcList and
2214           changed code accordingly.
2215
2216 Thu Nov  2 16:28:01 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2217
2218         * Changed client's channel table to SilcList and changed code 
2219           accordingly.  Also changed SilcChannelClientEntry to include back-
2220           pointer to the channel so that client entry can use that structure
2221           as list as well and we have fast cross-reference to the channel.
2222           This change dramatically decreased the complexity of channel
2223           handling with client entry and vice versa (removed one extra
2224           loop when searching for channel entry from many functions).
2225
2226         * Changed server->sim from table to SilcDList and changed code
2227           accordingly.
2228
2229         * NAMES command can now be used from user interface.  It will show
2230           the user list on the channel, neatly.
2231
2232         * Added realname pointer to SilcClientEntry in lib/silcclient/idlist.h.
2233           Code now saves realname of the user if it becomes available.
2234
2235         * Renamed configure.in to configure.in.pre and made ./prepare
2236           script to automatically add correct version string to
2237           configure.in which it creates from configure.in.pre.
2238
2239 Wed Nov  1 17:21:26 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2240
2241         * NAMES command reply now shows users mode with the nickname when
2242           joining to channel.
2243
2244         * Moved silc_client_ch[u]mode[_char] functions from 
2245           silc/clientutil.[ch] to lib/silcclient/client.[ch].  Though, that
2246           place sucks, they are utility functions and should be in some
2247           other file.
2248
2249         * Fixed some unsigned int's to unsigned short's.  Patch by cras.
2250
2251         * Fixed contrib/getopt*.[ch] to not require config.h.  Patch by
2252           cras.
2253
2254 Tue Oct 31 20:10:37 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2255
2256         * Updated README.
2257
2258         * Added TRQ (efficient deque and list library) into lib/trq.  This is
2259           a very good list library that is currently used in the SILC.  Defined
2260           SilcList API over the library because I didn't like the API very
2261           much.  See lib/trq/silclist.h for the API and examples of how to
2262           use the API.  Fixed various places in the code to use the new
2263           SilcList API. The SilcList is meant for lists that has a structure
2264           already defined as a list.  It is not suitable to add just some
2265           context to the list (in TRQ, the context is the list actually).
2266
2267           So, I defined SilcDList that can be used for the purpose where 
2268           predefined list structure does not exit.  This can be used as
2269           such list.  Now some context just can be added to the SilcDList.
2270           Currently this list is not used in the SILC just yet, though there
2271           are a lot places where this can replace dynamically allocated
2272           tables and I will fix these places, later, to use SilcDList.
2273           See lib/trq/silcdlist.h for SilcDList (they are all inline functions,
2274           and use TRQ internally).
2275
2276           Also fixed some annoying warning messages that the original TRQ
2277           code generated.  Also minor changes to TRQ's Makefile.in.
2278
2279         * Added support for querying by Client ID to both WHOIS and 
2280           IDENTIFY commands into server, as required by the protocol.
2281
2282         * Removed method function pointers from SilcBuffer structure. They
2283           weren't used to anything and just increased the context size for
2284           no good reason.  This change also made silc_buffer_alloc and
2285           silc_buffer_free functions inline functions.
2286
2287         * Disabled command flooding detection support until it's fixed so 
2288           that it accepts commands in but does not execute them more than once
2289           in two seconds.
2290
2291         * Added silc_net_localhost(), to return local hostname, into
2292           lib/silcutil/silcnet.[ch].  Also added client->hostname pointer
2293           that must be initialized before calling silc_client_init.
2294
2295         * Added new function: silc_server_send_notify_on_channels to send
2296           notify messages to all channels client has joined.  It is assured
2297           that the message is sent only once per client.
2298
2299         * Moved silc_log_format (from lib/silcutil/silclog.[ch] into
2300           lib/silcutil/silcutil.[ch] as silc_format function.  The new 
2301           function is generic and is used by server as well, not only by
2302           the logging routines.
2303
2304         * Added new SKE status type: SILC_SKE_STATUS_BAD_VERSION to indicate
2305           the provided version string was not acceptable.  Added new function:
2306           silc_ske_check_version into lib/silcske/silcske.h.  The function
2307           must be implemented by the application (client or server) and it
2308           does not reside in the SKE library.  The function checks the version
2309           string remote end sent.
2310
2311         * Added back pointers (to opaque context and to SilcSocketConnection) 
2312           into SilcPacketContext structure into lib/silccore/silcpacket.h.
2313
2314         * Added silc_packet_context_dup into lib/silccore/silcpacket.[ch] to
2315           duplicate packet context structure.
2316
2317         * Changed `notify' client operation to send same arguments as client
2318           receives from server except for ID's.  ID's are mapped to correct
2319           ID entry and that is returned.  Also, if channel entry is not sent
2320           by server but the notify is for channel the channel entry is sent
2321           to application (otherwise application doesn't know that it is for
2322           channel (library gets it from packet's Destination ID)).
2323
2324         * Added silc_client_remove_from_channels into client library to 
2325           remove a client from all channels it has joined to.  Used when 
2326           received SIGNOFF notify from server.  Added also new function
2327           silc_client_replace_from_channels to replace old ID entry with
2328           new ID entry on all channels.  Used when received NICK_CHANGE
2329           notify from server.
2330
2331         * Fixed ID Cache list handling in silc_idlist_get_client in 
2332           lib/silcclient/idlist.c.  Also, added silc_idlist_get_client_by_id
2333           to get (or query) client by ID.
2334
2335         * Updated TODO list.
2336
2337         * Added connection authentication status message defined by the
2338           protocol: SILC_CONN_AUTH_OK and SILC_CONN_AUTH_FAILED and added the
2339           support for these into the code in client and server side.
2340
2341         * Added generic function silc_client_send_command to send any command
2342           with variable argument list.  Application should use this function
2343           to send commands if the command functions provided by the library
2344           does not suite for the application's user interface needs.
2345
2346         * Added new `failure' client operation.  Application is notified about
2347           received failure packet if client is executing a protocol.  In this
2348           case the protocol's execution has failed.
2349
2350         * Added SKE's end notify to send the SKE_SUCCESS notify message that
2351           is required by the protocol.
2352
2353         * Added SILC_PROTOCOL_STATE_FAILURE to indicate received failure
2354           packet from remote.  SILC_PROTOCOL_STATE_ERROR indicates local
2355           error at our end.
2356
2357         * Added status flag to SilcSKE object to indicate realtime status
2358           of the SKE protocol.
2359
2360         * Application receives now exactly same command reply arguments as
2361           the library receives from server.  However, if ID is received the
2362           corresponding ID entry is returned to the application (eg. Client
2363           ID is mapped to correct SilcClientEntry entry and that is returned).
2364           Changed command_reply client operation due to this change.
2365
2366         * Changed all ID's in commands and in command replys as ID Payloads.
2367           Change affected both client and server side codes.
2368
2369           All ID's sent in SILC network (with execption of ID's in SILC
2370           Packet header) are sent in ID Payload to support variable length
2371           ID's.
2372
2373         * Server now notifies nick changes and notifies all clients on
2374           the channels about the new nickname (about the new Client ID,
2375           actually).
2376
2377         * Implemented CMODE command to change channel modes. Supports all
2378           channel modes defined by the protocol specs except ban and invite
2379           lists. (Also, private channel key mode is supported but support for
2380           setting private channel key in client is missing, thus, this mode
2381           has no effect on client side (except that server requires that the
2382           client uses private channel key and normal channel traffic does not
2383           work anymore)).
2384
2385           Also, invite mode works per se, but INVITE command does not work
2386           yet correctly, so you can set channel as invite only channel but
2387           inviting clients to the channel does not work (it is yet to be
2388           thought what's the best way to do it).
2389
2390         * Added new command SILC_COMMAND_CUMODE to change user mode on the
2391           channel.  Defined user modes: CHANNEL_FOUNDER and CHANNEL_OPERATOR.
2392           Implemented CUMODE command to change user's mode on the channel.
2393           Supports all modes defined by the protocol specs.
2394
2395         * Added NAMES command reply to return users modes on the channel.
2396
2397         * Removed unnecessary and slow ciphers from lib/silccrypt.
2398
2399         * Set SO_KEEPALIVE option to connection sockets by default.
2400
2401         * Added new command reply status: SILC_STATUS_USER_NOT_ON_CHANNEL.
2402
2403         * Added notify types: MOTD, CMODE_CHANGE and CUMODE_CHANGE.  Also,
2404           redefined the Notify Payload into protocol specs.
2405
2406         * Added silc_id_payload_parse_id to get ID directly from raw
2407           ID payload data.
2408
2409 Mon Oct  9 20:57:02 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2410
2411         * Changed SILC_COMMAND_IDENTIFY in protocol specification to 
2412           accept searching by Client ID as well.
2413
2414         * Added support for LEAVE and SIGNOFF notify types in client library.
2415
2416         * Added silc_id_payload_parse_data into lib/silccore/silcpayload.[ch]
2417           to parse ID Payload from raw data.
2418
2419 Sun Oct  8 19:33:08 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2420
2421         * Added flags parameter into silc_ske_assemble_security_properties
2422           function in lib/silcske/silcske.[ch].
2423
2424         * Changed notify client operation to fit better for notify messages
2425           sent by server.  The notify payload received from server is now
2426           passed to the application (after parsing it to SilcNotifyPayload).
2427           It is application's responsibility to retrieve the arguments
2428           from the payload and show the message the way it wants.  The message
2429           sent by server is implementation specific.
2430
2431         * Changed public keys to comply with the protocol specification.
2432           Old public keys are not supported anymore and are not compatible.
2433
2434         * Removed nickname from Channel Payload as the latest draft removed
2435           it.  The client must resolve the nickname from the NAMES command
2436           reply received when it joined the channel.
2437
2438           Also, changed all channel_xxxx_payload to channel_payload_xxxx.
2439
2440 Sat Oct  7 21:55:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2441
2442         * Fixed some errors in protocol specification drafts.
2443
2444         * Created lib/silccore/silcnotify.c to implement Notify Payload
2445           encoding and decoding, lib/silccore/silcpayload.[ch] to implement
2446           generic payloads described by protocol specifications.  The file
2447           includes implementations for ID Payload and Argument Payload.
2448
2449         * Changed Command Payload implementation to use the new Argument
2450           Payload.  Changed command_xxxx_payload to command_payload_xxxx
2451           to comply with SILC coding conventions.
2452
2453         * Added suppport for Argument Payload handling in Notify Payload
2454           implementation as protocol requires it.  Added the new support
2455           into server and client lib as well.
2456
2457 Thu Oct  5 21:16:28 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2458
2459         * Added support for multiple nicknames on same channel.  [n] is
2460           added locally to the nickname if there are more than one same
2461           nicknames on the channel.
2462
2463         * Server now sends all nicknames that matched WHOIS request.
2464           Client also shows the list received from server.
2465
2466         * Added TOPIC command to client side.  User can now set and show
2467           current topic on channel.
2468
2469         * Added MOTD command to client and server.  Also, server sends the
2470           motd when client connects to the server.
2471
2472         * Changed version strings to comply ISO 8601.
2473
2474 Wed Oct  4 23:29:06 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2475
2476         * Fixed protocol error handling in client library.  It should now
2477           cope even if the SKE fails for some reason.
2478
2479         * Made new protocol specification drafts for submitting to IETF.
2480
2481         * Implemented TOPIC command to server in silcd/command.c.
2482
2483         * Added two new notify types into lib/silccore/silcnotify.h:
2484           SILC_NOTIFY_TYPE_NICK_CHANGE and SILC_NOTIFY_TYPE_TOPIC_SET to
2485           notify nickname change and topic setting/change on a channel.
2486
2487         * API change of command_reply operation in client library.  The
2488           application gets now the status type received from server as well.
2489
2490 Sat Sep 30 16:57:42 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2491
2492         * Removed the function just added to lib/silcutil/silcschedule.[ch].
2493
2494         * Cras fixed and optimized the packet handling even further and
2495           it should work now.  Minor change to the prototype of function
2496           silc_packet_receive_process in lib/silccore/silcpacket.[ch].
2497
2498 Sat Sep 30 08:48:47 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2499
2500         * Added new function into lib/silcutil/silcschedule.[ch]:
2501           silc_schedule_with_fd to select() a specified fd.  The function
2502           returns after timeout expires or data arrives or goes.  The
2503           function is used by packet routines to wait that all data is
2504           received from network.
2505
2506         * Fixed data reading from network in lib/silccore/silcpacket.c.
2507           The code now assures that all data is read from the fd and then
2508           continues packet processing.  This was a bug fix since the code
2509           used to drop some data in some circumstances.
2510
2511         * Added new function into lib/silcclient/client.[ch]:
2512           silc_client_start_key_exchange to start key exchange after
2513           connection has been established to server.  The code internally
2514           now uses this funtion but its main purpose was to provide it
2515           for applications that perform their own connecting.  After
2516           application has created a connection it merely calls this
2517           function to start the key exchange between client and server.
2518           The library takes care of everything else after that.
2519
2520           Updated also lib/silcclient/README to explain the usage of
2521           this new function.
2522
2523         * Do not send to application information that connection has
2524           been established.  Application gets notified it by connect
2525           operation anyway.
2526
2527 Thu Sep 28 23:40:19 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2528
2529         * Applied cras's patch to add silc_schedule_one function.  The
2530           function runs scheduler once and returns.
2531
2532         * Fixed the scheduler after cras messed it up.  The timeout
2533           handling works now as it's supposed to work.
2534
2535         * Added into lib/silccore/ silcnotify.h to include notify
2536           message types support.  Changed silc_server_send_notify*
2537           functions, in server.[ch], to support those new notify types.
2538           Added the support for the notify types into client library,
2539           as well.  Added new notify client operation into ops.h in
2540           lib/silcclient/.
2541
2542         * Changed silc_server_packet_send_to_channel to send normal
2543           packets instead of just channel message packets.  The function
2544           is now used to send the notify packets to channels.  It is not
2545           used to send channel message packets anymore, as server never
2546           sends them anymore.
2547
2548         * Added explicit casting into lib/silcutil/silcbuffmt.c to few
2549           va_arg()s as it seems to require it nowadays.  I guess, if SILC
2550           is compiled with older va_arg() the new code should work anyway.
2551
2552 Wed Sep 13 18:10:14 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2553
2554         * Splitted core library.  Core library (lib/silccore) includes
2555           now only SILC protocol specific core (and common) components.
2556           Created new utility library (lib/silcutil) that includes more
2557           generic purpose stuff.  The stuff for util library was taken
2558           from the old core library.  This was minor and easy split.
2559
2560         * Created SILC Client Library (lib/silcclient) that includes
2561           implementation of the SILC client without user interface.  This
2562           was major move from silc/ directory.  The code has been changed
2563           so that it is transparent towards the user interface.  The
2564           silc/ directory includes now the same user interface as before
2565           and it uses the new client library.  Read lib/silcclient/README.
2566           Basicly, the client library performs everything else related
2567           to SILC except user interface handling.  Also, configuration
2568           files are considered to be part of user interface and library
2569           does not handle them.
2570
2571           This change also changed a lot of structures, function naming etc.
2572           Most important change was that SilcClientWindow object was
2573           renamed to SilcClientConnection in the client library.  Created
2574           also new file lib/silcclient/ops.h.  Also added new files
2575           silc/local_command.[ch] and silc/client_ops.[ch].
2576
2577           All these changes were made to make it easier for user interface
2578           designers to create what ever user interface for the SILC client
2579           they want.
2580
2581           It is also expected that the server will be moved to lib
2582           directory as well and SILC Server Library will be created;
2583           sometimes in the future.
2584
2585         * Removed Local commands from lib/silccore/silccommand.h as
2586           they are application specific and new client library does not
2587           handle any of those anymore.
2588
2589         * Several functions moved to lib/silcutil/silcutilc.[ch] from
2590           old client implementation in silc/.
2591
2592         * Added support for callback functions in SILC_LOG_* macros.
2593           Application can now set its own callbacks that will be called
2594           instead of using the default functions that will always print
2595           the debug messages to stderr (or stdout).  Also, debugging can
2596           now be disabled by setting silc_debug to FALSE and re-enabled by
2597           setting it to TRUE.  Note, that logging will still work even
2598           if debugging is disabled.
2599
2600           New functions in lib/silcutil/silclog.[ch]: silc_log_set_callbacks,
2601           silc_log_reset_callbacks, silc_log_set_debug_callbacks and
2602           silc_log_reset_debug_callbacks.
2603
2604         * To enable debugging in silc client one must give now -d
2605           option on command line.
2606
2607         * Changed silc_schedule_init to automatically allocate task queues
2608           if they are not allocated before calling it.
2609
2610 Thu Sep  7 10:49:33 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2611
2612         * Added GMP 3.1 into math library.
2613
2614 Sun Aug 20 21:27:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2615
2616         * Added SILC_PACKET_REMOVE_CHANNEL_USER to remove a client from
2617           a channel in SILC network.  The packet is used by servers and
2618           routers to notify other routers that user has left a channel.
2619           This little feature was missing until now.  Added the feature
2620           to protocol specification as well.
2621
2622           Added functions: silc_server_send_remove_channel_user and
2623           silc_server_remove_channel_user into server.[ch].
2624
2625         * Added SILC_PACKET_REKEY and SILC_PACKET_REKEY_DONE into
2626           lib/silccore/silcpacket.h.  However, they are not implemented
2627           yet.
2628
2629 Sat Aug 19 23:04:16 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2630
2631         * Fixed joining to a channel and sending channel messages
2632           between server and router.  The channel message sending should
2633           now work inside a cell.
2634
2635 Tue Jul 25 20:46:13 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2636
2637         * Fixed the private message sending between server and router.
2638           The private message sending should now work inside a cell.
2639
2640         * Added silc_server_replace_id into server.[ch] to replace
2641           existing ID in the SILC network.
2642
2643         * Added silc_idlist_find_server_by, silc_idlist_replace_client_id
2644           and silc_idlist_replace_server_id into idlist.[ch] in server.
2645
2646 Mon Jul 24 18:33:31 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2647
2648         * Fixed the server to server connections.  Server can again now
2649           connect to router.  Router to router connections probably does
2650           not work just yet.
2651
2652 Thu Jul 20 13:15:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2653
2654         * Added dynamic protocol registering support.  Now protocols can
2655           registered and unregistered on the fly.  Patch by cras.
2656
2657 Wed Jul 19 19:08:46 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2658
2659         * Added lib/contrib directory to hold routines that some platforms
2660           don't have but are needed by SILC.
2661
2662         * Added getopt.c, getopt1.c and getopt.h from GNU C library
2663           into lin/contrib to provide getopt() and getopt_long() for
2664           those who don't have it.
2665
2666 Tue Jul 18 20:41:20 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2667
2668         * Added AWAY command to client.  When away message is set and
2669           client receives a private message packet the client automatically
2670           replies to the sender with the away message.
2671
2672         * Fixed a bug in lib/silcmath/mpbin.c: silc_mp_mp2bin.  This
2673           bug seemed to be the cause of recent problems when compiling
2674           with gcc-2.95.
2675
2676         * Added version detection support to SKE protocol specification
2677           and added the new changes to the SKE implementation as well.
2678           There were other minor changes in the SKE protocol as well.
2679
2680           Many changes in lib/silcske/silcske.[ch] and in
2681           lib/silcske/payload.[ch].
2682
2683         * Added ^U functionality, clear input line.  Patch from cras.
2684
2685 Mon Jul 17 23:33:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2686
2687         * Mainly small bugfixes on core library.  Fixed some debugging
2688           logging and buffer overflow in silclog.c.
2689
2690         * Updated config.sub and config.guess on the distribution tree.
2691
2692 Sat Jul 15 15:33:48 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2693
2694         * Added command lagging support in server. Client may execute
2695           commands now only once in two seconds.
2696
2697 Thu Jul 13 22:10:21 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2698
2699         * Optimized packet reception. MAC computation and checking is now
2700           also more optimized.  A lot previously duplicated code is now
2701           used as generic by both client and server.
2702
2703         * Fixed key pair generation in clientutil.c
2704
2705 Wed Jul 12 18:28:07 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2706
2707         * Added into lib/silccore/silcbufutil.[ch] new function;
2708           silc_buffer_realloc.
2709
2710         * Moved generic packet sending/encryption functions to 
2711           lib/silccore/silcpacket.[ch] from client and server.  Some
2712           rewriting of the functions.
2713
2714         * Moved all generic packet reception/decryption functions to
2715           lib/silccore/silcpacket.[ch] from client and server.  The
2716           packet processing is now much cleaner in both client and server.
2717           These were major changes in both client and server.
2718
2719         * Created many common functions in server to do packet sending.
2720           Previously code were duplicated a lot, this has been removed
2721           with these changes.
2722
2723 Tue Jul 11 20:27:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2724
2725         * Rewrote major parts of the ID cache system.  Don't know 
2726           whether it is better now or not but at least the API is more
2727           cleaner now.
2728
2729         * Major rewrite on ID cache stuff on client because of the ID
2730           cache API changes.  Added idlist.c to client.
2731
2732         * Also major rewrite on ID cache stuff on server as well.
2733           Major rewrite of idlist.[ch]. SilcXXXList's are now named
2734           SilcXXXEntry's.  We won't keep anymore idlist specific pointers
2735           in hand, instead they are all put into the ID cache system now.
2736           All server_idlist_* routines uses ID cache now instead of
2737           traversing its own lists (those lists does not exist anymore).
2738           SilcIDList though still exists.  Also, SilcXXXEntry's are
2739           now pointers.
2740
2741 Sun Jul  9 15:19:24 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2742
2743         * Finally made the SKE implementation compliant to the protocol
2744           specification.  All mp integers are now binary encoded as
2745           opposed being HEX encoded.
2746
2747         * Added lib/silcmath/mpbin.[ch].  Encoding mp intergers to and
2748           from binary data.
2749
2750         * Added into lib/silccore/silcutil.[ch] PEM encoding/decoding
2751           functions: silc_[encode/decode]_pem.  Also added function
2752           silc_encode_pem_file to PEM encode with newlines ('\n') for
2753           saving into a file.
2754
2755         * SILC public keys are now encoded either PEM or binary.  Same
2756           option is for private keys as well.  By default private keys
2757           are binary encoded and public keys PEM encoded.  Silly HEX
2758           encoding were removed.
2759
2760         * Added into lib/silccrypt/silchash.[ch] silc_hash_fingerprint
2761           function to create fingerprints.
2762
2763         * Fixed a bug in SHA1; does not change the original data anymore.
2764
2765         * Partly implemented INFO command on client and server side.
2766           Fixed CLEAR command.  Changes to SERVER command; show current
2767           server(s) when giving command without arguments.  Added
2768           VERSION command to client.
2769
2770         * Added check to server that unregistered connections cannot
2771           execute commands (unless it is specificly allowed).
2772
2773 Thu Jul  6 18:12:24 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2774
2775         * Fixed screen refresh.
2776
2777         * Fixed channel joining bug from client.  On some circumstances
2778           client tried to join to a channel it had already joined.
2779
2780         * Added public key verification process into client's protocol.c.
2781           The client now verifies the public key from user and saves
2782           it into ~./silc/serverkeys/ directory. 
2783
2784           Added into: clientutil.[ch]: silc_client_verify_server_key.
2785
2786         * Changed SKE protocol's silc_ske_initiator_finish function
2787           to accept callback function that verifies the received public
2788           key.  Removed old silc_ske_verify_public_key function.
2789
2790 Wed Jul  5 19:19:02 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2791
2792         * Added into silcpkcs[ch]: silc_pkcs_public_key[_data]_set and
2793           silc_pkcs_private_key[_data]_set.
2794
2795         * Made the password and public authentication more cleaner in
2796           server's protocol.c.
2797
2798         * Removed historic and obsolete protocol `channel_auth' from
2799           both client and server.
2800
2801         * Removed wrong way of sending command status messages from
2802           server to client in server's command.c.  The old way violated
2803           protocol specification.  
2804
2805           Changes to silccore/silccommand.[ch]: removed
2806           silc_command_encode_status_payload -> not needed anymore,
2807           changed silc_command_encode_payload_va to accept extra
2808           argument on variable argument list.  The argument type must
2809           now be provided to the function.  Also, added new function:
2810           silc_command_encode_reply_payload_va which is same as
2811           normal command_encode_payload_va except command status type
2812           is provided as extra argument.
2813
2814 Tue Jul  4 18:26:39 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2815
2816         * Added ~./silc directory handling.  The directory includes the
2817           public and private keys for the client.
2818
2819           Added silc_client_check_silc_dir, silc_client_create_identifier
2820           and silc_client_load_keys.
2821
2822         * Implemented SILC protocol compliant public key.  Added public
2823           and private key saving to and loading from files.
2824
2825           Added into silcpkcs.[ch]: silc_pkcs_encode_identifier,
2826           silc_pkcs_public_key_encode[_data], silc_pkcs_public_key_decode,
2827           silc_pkcs_private_key_encode[_data], silc_pkcs_private_key_decode,
2828           silc_pkcs_public_key_alloc, silc_pkcs_public_key_free,
2829           silc_pkcs_private_key_alloc and silc_pkcs_private_key_free.
2830
2831           Implemented: silc_pkcs_save_[public/private]_key[_data] and
2832           silc_pkcs_load_[public/private]_key.
2833
2834 Mon Jul  3 18:51:27 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2835
2836         * Added silc_server_get_route (route.[ch]) to get connection
2837           data for the fastest route for given ID.
2838
2839         * Implemented INVITE command on client and server.  The command
2840           were re-defined in the SILC Protocol Specification and the
2841           implementation now complies with the specification.
2842
2843         * Implemented PING command on client and server.
2844
2845         * Implemented NAMES command on client and server.  The server side
2846           supports currently only normal server not router server yet.
2847           Some changes to NAMES definition in SILC protocol specification.
2848
2849 Sun Jul  2 18:23:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2850
2851         * Implemented LEAVE command on client and server.
2852
2853         * Previously deprecated SILC_PACKET_FORWARDED flag is now in use 
2854           again.  This change was made to the protocol as well.  Server
2855           should not violate the protocol specification anymore.
2856
2857 Fri Jun 30 14:03:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
2858
2859         * Added SOCKS4 and SOCKS5 support to SILC client.  SOCKS5
2860           was tested.  SOCKS4 was not but should work anyway.