updates.
[silc.git] / CHANGES
1 Sun Jul  8 18:44:53 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
2
3         * Added SILC_MUTEX_DEFINE to define the mutex on environments
4           that may or may not compile the mutex support in.
5         
6           Changed the silc_mutex_alloc interface. It allocates the
7           mutex now to the sent pointer and returns TRUE or FALSE.
8
9           Affected file lib/silcutil/silcmutex.h.
10
11         * Wrote the SILC Task Queue interface to support multi-threads.
12           Affected file lib/silcutil/silctask.[ch].
13
14         * Wrote the SILC Scheduler to support multi-threads.  Affected
15           file lib/silcutil/silcschedule.c.
16
17 Sun Jul  8 11:16:01 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
18
19         * Implemented the SILC Mutex API and SILC Thread API for WIN32
20           in lib/silcutil/win32/.
21
22 Sun Jul  8 00:18:15 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
23
24         * Defined SILC Mutex API and SILC Thread API and implemented
25           them for Unix.  Affected files are
26           lib/silcutil/silcmutex.h, lib/silcutil/silcthread.h,
27           lib/silcutil/unix/silcunixmutex.c and
28           lib/silcutil/unix/silcunixthread.c.
29
30 Sat Jul  7 14:40:31 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
31
32         * Fixed the silc_server_remove_clients_by_server's channel
33           key re-generation.  The hash table handling was incorrect
34           and would not work with many channels.  Affected file is
35           silcd/server.c.
36
37         * Fixed some memory leaks around the server code.
38
39         * Rewrote the silc_server_get_users_on_channel to support IPv6
40           based Client ID's.  Affected file silcd/server.c.
41
42         * Defined the SILC_MESSAGE_FLAG_SIGNED to the protocol
43           specification.  However, a separate document must be written
44           to define the detailed signing procedure and the payload
45           associated with the flag.  Defined the flag to the
46           lib/silccore/silcchannel.h as well.
47
48 Fri Jul  6 18:26:31 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
49
50         * Changed the dynamic tables to static size tables in the
51           lib/silccrypt/silchmac.c.
52
53         * Removed GCC dependencies from the code.  A patch by cras.
54
55 Fri Jul  6 09:39:35 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
56
57         * Do not show the error "Error receiving packet bla bla"
58           in server if it really was not an error (-2 means that reading
59           is pending).  Affected file silcd/server.c.
60
61 Thu Jul  5 21:22:32 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
62
63         * Fixed a possible crash in silc_server_remove_clients_by_server
64           in silcd/server.c.  Fixed there also some memory leaks.
65
66         * Fixed the silc_idlist_replace_client_id.  It could replace
67           wrong key in the hash table.  Affected file silcd/idlist.c.
68
69         * Do not check whether there are global users on the channel
70           if the channel->global_users is FALSE.  Affected functions
71           silc_server_remove_from_one_channel and
72           silc_server_remove_from_channels in silcd/server.c.  Also,
73           do not check if the removed client is local as we can be
74           sure that global client was not removed from the channel
75           and checking for global users is not needed.
76
77         * The silc_server_remove_clients_by_server now re-generates
78           the channel keys correctly for those channels that had
79           clients removed from them.  Affected file silcd/server.c.
80
81 Tue Jul  3 11:39:20 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
82
83         * Found the reason of random crashes in the server.  We weren't
84           ignoring the SIGPIPE signal (which can be sent in write())
85           and it crashed the server.  Affected file silcd/silcd.c.
86
87 Fri Jun 29 20:05:25 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
88
89         * Assure that sock->user_data is not NULL in the function
90           silc_server_packet_send in silcd/packet_send.c.
91
92         * Disconnect the remote connection if it could not be added
93           to any ID lists in the server.  The affected file is
94           silcd/server.c.
95
96         * Check in silc_server_packet_send[_real/dest] that the
97           socket is not disconnecting and ignore the data if it is.
98           Affected file silcd/packet_send.c.
99
100         * Define inline to __inline on native WIN32 compilation.
101           Affected file includes/silcwin32.h.
102
103         * Added some explicit type casts for inline code since MSVC
104           require them.  Affected files lib/silcutil/silcbuffer.h,
105           lib/trq/silcdlist.h and lib/trq/silclist.h.
106
107         * Print warning in log files from now on if the packet
108           decryption fails.  Affected file silcd/server.c.
109
110 Thu Jun 28 21:30:39 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
111
112         * Changed the `say' client operation's interface to accept
113           new `type' argument to indicate the type of the message sent
114           by the library.  The application may filter the library's
115           messages according the type.  The affected file is the
116           lib/silcclient/silcapi.h.
117
118         * Added two new functions to lib/silcclient/silcapi.h:
119           silc_client_del_client and silc_client_del_client_by_id.
120           Affected file lib/silcclient/idlist.c.
121
122         * Moved the clientincludes.h from includes/ to silc/ and
123           serverincludes.h from includes/ to silcd/.
124
125         * The modes for the CMODE and CUMODE are now passed as
126           uint32 for application with COMMAND_REPLY.  The affected
127           file is lib/silcclient/command_reply.c.
128
129 Wed Jun 27 22:24:47 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
130
131         * /WHOIS without arguments shows client's own information.
132           Affected file lib/silcclient/command.c.
133
134         * Changed PING to not accept any arguments.  The specs
135           says that client can ping only the connected server so
136           requiring an argument is not needed.  Affected file is
137           lib/silcclient/command.c.
138
139 Wed Jun 27 00:10:33 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
140
141         * Fixed a fatal bug in private message sending and reception
142           encryption and decryption when using private message keys.
143           The implementation was incorrect and did not follow the
144           specification.  It causd that some of the message were
145           lost since it did not use the sending and receiving keys
146           as the protocol suggests.  This has been fixed and will cause
147           incompatibilities with older clients when sending private
148           message encrypted with private message keys.  Affected files
149           lib/silcclient/client_prvmsg.c, lib/silcclient/client_keyagr.c
150           and various other in Irssi SILC Client.
151
152           Added `responder' boolean argument to the functions
153           silc_client_add_private_message_key[_ske] to indicate when
154           the key is added as responder or initiator of the key
155           negotiation.
156
157 Tue Jun 26 19:23:07 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
158
159         * Removed the silc_ske_check_version function and created
160           a SilcSKECheckVersion callback.  Added also a function
161           silc_ske_set_callbacks that is now used to set all SKE
162           callbacks.  The callback functions are not given to
163           the SKE functions anymore, but this function is used to
164           set the callbacks.
165
166         * Fixed the WIN32 DLL generation in lib/Makefile.am.pre.
167
168         * Added `silc_version' argument to the silc_client_alloc
169           to define the version of the application for the library.
170           The library will use the version string to compare it
171           against the remote host's (usually a server) version
172           string.  Affected file lib/silcclient/silcapi.h
173
174         * Added the KE protocol context to Key Agreement context
175           in client library so that we can abort the SKE if it
176           is in process when we get timeout.  Affected file is
177           lib/silcclient/client_keyagr.c.
178
179         * Do not resolve the client ID forever if it returns in the
180           first time that such client does not exist.  This was done
181           for example with private message.  Affected file is
182           lib/silcclient/client_prvmsg.c.
183
184 Mon Jun 25 21:42:51 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
185
186         * Do not add regex.h for WIN32.  The affected file
187           includes/silcincludes.h.
188
189         * Added WIN32 DLL generation to lib/Makefile.am.pre.  It might
190           not work yet 100%.  It generates the DLL's automatically
191           when compiling with --with-win32 under cygwin.
192
193 Sun Jun 24 19:49:23 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
194
195         * lib/contrib/regex.c is not compiled on WIN32.
196
197         * Added silc_net_get_socket_opt function to the
198           lib/silcutil/silcnet.h.
199
200         * Added includes/silcwin32.h for WIN32 specific includes
201           and definitions.
202
203         * Do not use ptime structure or any of the posix process
204           functions on WIN32 in lib/silccrypt/silrng.c.
205
206         * Added silc_gettimeofday to provide generic function
207           for struct timeval on all platforms.  Added the function
208           to lib/silcutil/silcutil.h.
209
210 Sun Jun 24 12:19:52 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
211
212         * Moved the lib/silccore/silcsockconn.[ch] to the utility
213           library as they clearly belong there.  As a plus side we
214           can make the actual socket connection routines platform
215           specific.
216
217           Added also new generic function silc_socket_read and
218           silc_socket_write (that used to be silc_packet_[read/write].
219           The implementation of these are platform specific.
220
221         * Added WIN32 specific routines of silc_socket_[read/write]
222           to lib/silcutil/win32/silcwin32sockconn.c.
223
224 Sat Jun 23 16:01:00 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
225
226         * Added preliminary support for native WIN32 compilation under
227           cygwin (using the -mno-cygwin option for GCC) to the
228           ./configure.in.pre.  The --with-win32 now prepares the
229           compilation for native WIN32.
230
231         * Rewrote the SILC Scheduler interface in the file
232           lib/silcutil/silcschedule.h.  The scheduler is now context
233           based and does not have anymore any global static scheduler.
234           Moved the Unix scheduler to the lib/silcutil/unix/ directory
235           and created lib/silcutil/win32 directory for WIN32 based
236           scheduler.
237
238         * Added Unix specific network routines to the
239           lib/silcutil/unix/silcunixnet.c and the old
240           lib/silcutil/silcnet.c includes now only generic routines.
241
242           Added WIN32 specific network routines to the
243           lib/silcutil/win32/silcwin32net.c.
244
245         * Added Unix specific utility functions from the
246           lib/silcutil/silcutil.c to lib/silcutil/unix/silcunixutil.c.
247
248         * Added WIN32 SILC Scheduler to the file
249           lib/silcutil/win32/silcwin32schedule.c. The code is of course
250           untested.
251
252 Fri Jun 22 10:44:14 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
253
254         * Do not handle JOIN notify in the server if the target client
255           is not registered (idata->registered == FALSE).  The affected
256           file is silcd/packet_receive.c.
257
258         * Update the nickrec->founder in event_cumode in the Irssi SILC
259           client.  Affected file irssi/src/silc/core/silc-channels.c.
260
261         * Fixed the CUMODE_CHANGE notify handling in the server when
262           server and router are announcing their clients on channels.
263           Now the mode changes are saved and notified correctly.  The
264           affected file is /silcd/packet_receive.c.
265
266         * Fixed silc_idlit_replace_[server/client/channel]_id functions.
267           They really did not replace the cache entry in the ID Cache.
268           Now they do that.  Affected file silcd/idlist.c.
269
270         * Fixed the KICK notify handling in the Irssi SILC client to
271           update the channel records so that the kicked client does not
272           appear to be on the channel.  The affected file is 
273           irssi/src/silc/core/silc-channels.c.
274
275         * Always update the conn->current_channel when executing command
276           on a channel.  Affected file irssi/src/silc/core/silc-servers.c.
277
278         * Fixed the KILL notify handling in Irssi SILC client to remove
279           the killed client on all channels.
280
281 Thu Jun 21 17:10:08 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
282
283         * Fixed the silc_parse_command_line to remove extra spaces
284           from the start and end of the arguments.  Affected file is
285           lib/silcutil/silcutil.c.
286
287         * Cancel and free any active protocol in the function
288           silc_server_close_connection.  Affected file silcd/server.c.
289
290         * Cancel and free any active protocol in the function
291           silc_client_close_connction.  Affected file is
292           lib/silcclient/client.c.
293
294         * Do not execute the KILL command for clients that are in
295           history (ie. they are not in the network).  Affected file is
296           silcd/command.c.
297
298         * Fixed KILL notify handling, client does not crash anymore.
299           Affected file irssi/src/silc/core/silc-channels.c.
300
301         * Reduced the default packet buffer size from 2048 to 1024 in   
302           lib/silccore/silcpacket.c.
303
304         * Added SILC_SKE_STATUS_FREED SKE status type and a reference
305           counter to the SKE context that is incresed when the SKE library
306           performs async operation outside the library.  If the outside
307           process frees the SKE context and FREED status will be set 
308           and the library will detect after the sync operation that the
309           libary is freed.  The affected files are
310           lib/silcske/silcske[_status].[ch].
311
312         * Resolve the client entry information in the function
313           silc_client_channel_message to assure that NULL pointer is not
314           passed as client entry to the application. */
315
316         * Fixed the task timeout calculation to assure that there is
317           never negative timeouts.  The affected file is 
318           lib/silcutil/silcschedule.c.
319
320         * Fixed the channel user mode notification sending in server.
321           It was sent point-to-point to the router (or to server by router)
322           but it needs to be destined to a channel.  The routines now
323           supports sending the channel user mode notifys to the channels
324           when announcing clients and channels.  Affected files are
325           silcd/server.c and silcd/packet_receive.c.
326
327         * Fixed the CHANNEL_CHANGE notify handling in the client libary.
328           It did not actually replace the old channel entry in the cache.
329           Affected file lib/silcclient/client_notify.c.
330
331 Tue Jun 19 22:10:36 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
332
333         * Fixed a possible crash in silc_packet_send_prepare.  It now
334           assures always that there is enough space in the buffer and
335           at the tail area of the buffer (for MAC). 
336
337           Fixed the inbound buffer reallocation in silc_packet_read.
338           It was old code and did not handle the reallocation correctly.
339           Affected
340
341           The affected file is lib/silccore/silcpacket.c.
342
343         * Fixed buffer overflow in silc_parse_nickname in the file
344           lib/silcutil/silcutil.c.
345
346 Tue Jun 19 13:40:09 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
347
348         * make install generates new server keys only if there is not
349           keys already.
350
351 Mon Jun 18 18:49:07 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
352
353         * Set SILC_MESSAGE_FLAG_NOREPLY when sending the away message.
354           Added check that if the NOREPLY is set then we will not send
355           the away message.  This avoids infinite loop of away messages
356           if both clients are away.  The affected file is
357           lib/silcclient/client_prvmsg.c.
358
359         * Fixed client crash if /NICK was given without arguments.
360           Affected file lib/silcclient/command.c.
361
362         * Server does not send the invite list in INVITE command back
363           to the client if the list was not altered.  Added this notion
364           to the protocol spec as well.  Affected file silcd/command.c.
365
366           Fixed possible crash in INVITE command by checking the
367           value of silc_server_get_client_route command.
368
369         * Fixed the INVITE notify type handling.  The arguments are now
370           taken in correct order and client does not crash.  The affected
371           file is irssi/src/silc/core/silc-channels.c.
372
373           Removed the "Inviting xxx to channel" message from the
374           client library away and let the application handle it.
375           Affected file lib/silcclient/command.c.  Added that message
376           to Irssi SILC client's message formats.
377
378         * Fixed CMODE command crash in client.  It now checks the
379           amount of arguments correctly and does not crash.  The affected
380           file is lib/silcclient/command.c.
381
382         * Do not create new channel automatically in silc_channels_join
383           but check whether the channel by that name already exists.
384           Affected file irssi/silc/core/silc-channels.c.
385
386         * Do not send the SERVER_SIGNOFF to router if the disconnected
387           entity was the router.  Affected file silcd/server.c.
388
389         * Added the handling of the SERVER_SIGNOFF notify to the Irssi
390           SILC client as it was missing from there.
391
392           Added the handling of the KICK notify to the Irssi SILC client
393           as it was missing.  Added "you have been kicked" message to
394           Irssi SILC client's message modules formats.
395
396           Added the handing of the KILL notify to the Irssi SILC client
397           as it was missing.  Added the kill message module formats 
398           as well.
399
400           The affected file is irssi/src/silc/core/silc-channels.c.
401
402         * The router did not save the channel mode the server announced.
403           Affected file silcd/packet_receive.c.
404
405         * Fixed a possible crash in INFO command in server.  If the
406           server did not provide the server info it crashed.  Affected
407           file silcd/command.c.
408
409 Sun Jun 17 15:26:05 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
410
411         * Fixed the GETKEY command in the server to check also the
412           global list.  Otherwise the GETKEY would not work correctly
413           in normal SILC server.  Affected file silcd/command.c.
414
415 Sat Jun 16 18:00:00 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
416
417         * Fixed GETKEY crash, it crashed if the command did not succseed.
418
419 Tue Jun 12 21:36:18 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
420
421         * Redefined the SILC MP API in lib/silcmath/silcmp.h. The API
422           is now real and not just an macro interface to GMP.
423
424           Removed the entire GMP from the source tree and imported new
425           NSS MPI library instead.  Reason for removing GMP is that it is
426           extremely large and compiles extremely slow.  The NSS MPI
427           is only a few files and compiles in less than 10 seconds.
428           The speed is also about the same as GMP.  The MPI is imported
429           to lib/silcmath/mpi.
430
431           If the system has GMP installed we will still use the GMP.
432           If it is not then the NSS MPI will be compiled.
433
434 Mon Jun 11 18:07:24 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
435
436         * Merged a long nickname (127 characters long) crash bugfix from
437           Irssi CVS tree.  Affected file irssi/src/core/misc.c.
438
439         * Merged a freed memory reference bugfix from Irssi CVS tree.
440           Affected file irssi/src/core/commands.c.
441
442 Sun Jun 10 16:08:35 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
443
444         * Added the server's public key sving and verification to the
445           server when performing the SKE.  This was missing and the
446           remote server's (or router's) public key was accepted without
447           checking whether we have it previously or trust it at all.
448           Affected file silcd/protocol.c.
449
450 Sat Jun  9 20:17:30 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
451
452         * Check in the silc_server_timeout_remote if protocol is active
453           and make sure that the protocol's final callback is called so
454           that all memory if freed.  Affected file silcd/server.c.
455
456 Sat Jun  9 12:51:27 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
457
458         * silc_server_whois_send_reply crashed the server if the nickname
459           was 127 characters long.  Affected file silcd/command.c.
460
461 Thu Jun  7 16:29:56 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
462
463         * Added sanity check to the silc_server_new_client. If the hostname
464           is provided inside username then check that the provided hostname
465           really is the same as the resolved one.  If the hostname was not
466           resolved then check it from the public key.  Affected file is
467           silcd/packet_receive.c.
468
469         * Fixed a fatal bug in Irssi SILC client. Do not send QUIT command
470           if the server disconnected us and the connection is not valid
471           anymore.  Affected file irssi/src/silc/core/silc-channels.c.
472
473         * Moved the silc_client_[chmode|chumode|chumode_char] away from
474           the library to the lib/silcutil/silcutil.[ch].
475
476 Thu Jun  7 08:57:16 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
477
478         * Close log file after open.  Affected file 
479           lib/silcutil/silclog.c.
480
481         * Check whether sock == NULL in silc_client_send_packet and return
482           if it is.  Affected file lib/silcclient/silcclient.c.
483
484         * Check rec->entry == NULL in the Irssi SILC Client before
485           sending the channel message.  Affecte file is
486           irssi/src/silc/core/silc-servers.c.
487
488 Tue Jun  5 08:08:21 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
489
490         * Merged a splitted window bugfix from Irssi CVS tree.  The 
491           affected file is irssi/src/fe-text/textbuffer-view.c.
492
493         * Fixed the ME, ACTION and NOTICE printing in Irssi Client.
494           It did not print nickname.
495
496         * Improved the distributions system a bit.
497
498 Mon Jun  4 17:57:16 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
499
500         * Merged /WINDOW bugfix from irssi CVS tree. Affected file is
501           irssi/src/fe-text/gui-window.c.
502
503         * Fixed a fatal bug in Irssi SILC client. Crashed if sent message
504           to in-active server.  The affected file is
505           irssi/src/silc/core/client_ops.c.
506
507         * Resolve the client in USERS command reply if the entry does
508           not have username resolved.  The affected file is
509           lib/silcclient/command_reply.c.  Also, changed the IDENTIFY
510           command to WHOIS command to really resolve stuff.  The USERS
511           is not used any more in any critical section so WHOIS can
512           be used even though it might be slower than IDENTIFY.
513
514         * Changed the lib/silcutil/silchashtable.h header to ROBODoc
515           format.
516
517 Sun Jun  3 14:21:32 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
518
519         * Changed the protocol API a bit more consistent in the
520           lib/silccore/silcprotocol.[ch].
521
522         * Changed the following headers to ROBODoc format:
523
524                 lib/silccore/silcpayload.h
525                 lib/silccore/silcprotocol.h
526                 lib/silccore/silcsockconn.h
527
528           All core library headers are now formatted.
529
530 Sat Jun  2 10:45:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
531
532         * Fixed a bug in Irssi SILC client; do not show that you are
533           server/router operator if you really are not.  Affected file is
534           irssi/src/silc/core/client_ops.c.
535
536         * Renamed silc_command_free_payload to silc_command_payload_free.
537           Affected file lib/silccore/silccommand.h
538
539         * Added silcmath.h to include the prototoypes of various routines
540           in the lib/silcmath.  Removed the old modinv.h, mpbin.h and
541           silcprimegen.h.
542
543         * Changed the following headers to ROBODoc format:
544
545                 lib/silccore/silcchannel.h
546                 lib/silccore/silccommand.h
547                 lib/silccore/silcid.h
548                 lib/silccore/silcidcache.h
549                 lib/silccore/silcmode.h
550                 lib/silccore/silcnotify.h
551                 lib/silccore/silcpacket.h
552                 lib/silcmath/silcmath.h
553
554 Fri Jun  1 22:19:37 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
555
556         * Added checking to the server code not to start the server if
557           ciphers and stuff are not configured properly.  Affected files
558           silcd/serverconfig.[h] and silcd/server.c.
559
560         * Changed the layout of the header files of the public interfaces
561           in the SILC libraries.  The new layout supports ROBODoc 
562           documentation tool (and some others) so that it is easy to create
563           a library reference manual.  All the other headers and source
564           code must still follow the CodingStyle document.  Also source
565           code must not include these ROBODoc stuffs, only the headers.
566           Furthermore, all public interface headers must now be named
567           by using `silc' prefix, example: silcapi.h, silccipher.h.
568           Some files were renamed due to this.  All the other headers
569           must not be used as public interfaces.  I will update the
570           CodingStyle document later.  Changed following headers, so far:
571
572                 lib/silcclient/silcapi.h
573                 lib/silccore/silcauth.h
574                 lib/silccore/silcprivate.h
575                 lib/silccrypt/silcdh.h
576
577 Fri Jun  1 10:28:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
578
579         * Updated TODO.
580
581         * Removed silc_client_packet_send_flush from the client library
582           as it is not needed.  Affected file lib/silcclient/client.[ch].
583
584         * Added printing of message of unresolved authentication method
585           to the Irssi SILC client.  Added it to the module formats.
586           Removed the same message from the client library.
587
588 Thu May 31 13:57:33 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
589
590         * Added new distribution feature, DISTLABEL.  Every distribution
591           can define own preprocessor label that can be used in the
592           source code.  For example: #ifdef SILC_DIST_CLIENT.  Affected
593           file distributions, acconfig.h.pre and prepare.
594
595 Tue May 29 22:16:40 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
596
597         * Added Makefile.defines_int to include the actual definitions
598           for Makefile.defines.in.  Tested the new distribution system,
599           created distributions and tested installation.
600
601         * Added AWAY message printing to the Irssi SILC client.  Added
602           the messages to the irssi/src/fe-common/silc/module-formats.[ch].
603
604         * Added SCONNECT command to call the SILC's CONNECT command.
605           Cannot use CONNECT directly since Irssi uses that internally.
606           Affected file irssi/src/silc/core/silc-servers.c.
607
608           Added ACTION local command.  It is same as ME command but takes
609           the channel as mandatory argument.
610
611           Rewrote some of the Irssi's help files to suite for SILC
612           protocol.
613
614 Mon May 28 19:05:22 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
615
616         * Added Makefile.defines[.in] that should for now on be included
617           in all Makefile.am file in the source tree.  That file includes
618           all common compilation definitions for SILC source tree.
619
620 Mon May 28 10:30:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
621
622         * Minor changes to the ./prepare script to change the package
623           name according the distribution name to the configure.in.
624
625 Sun May 27 22:24:57 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
626
627         * Created new distribution system.  Added file `distributions'
628           that defines all the distributions that can be created out of
629           the SILC source tree.  The ./prepare script now reads that
630           file to determine how to prepare the distributions.  The
631           first argument to the ./prepare is the name of the distribution
632           and second is the version of the distribution.  If given
633           without arguments it creates the default (toolkit) distribution
634           with the default version (defined in ./prepare).
635
636           All Makefile.am files that are subject to the distributions
637           are now named as Makefile.am.pre.  These are ./Makefile.am
638           and lib/Makefile.am.  Others may be changed later.
639
640 Sun May 27 15:57:17 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
641
642         * Added invite list, ban list, some key management and connection
643           error message printing to module formats in the Irssi SILC client.
644
645         * Added new silc_client_set_away_message to set the away message
646           that is back to the person who sent private message.  The 
647           affected file lib/silcclient/silcapi.h and the
648           lib/silcclient/client_prvmsg.c.
649
650 Sun May 27 12:39:48 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
651
652         * Fixed the private message sending in the Irssi SILC client,
653           added local command KEY to the Irssi SILC client.
654
655           Added key management and key agreement message formats to the
656           irssi/src/fe-common/silc/module-formats.[ch].
657
658           Added USERS (alias WHO) printing, server/router operator
659           indication and LIST command printing to the module formats.
660
661 Sat May 26 17:43:42 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
662
663         * Fixed channel joining notify handling, cumode notify handling
664           from Irssi SILC client.
665
666         * Added SILC specific module-formats to the Irssi SILC client so
667           that SILC specific message hilighting, colors etc is possible.
668           Affected file irssi/src/fe-common/silc/module-formats.[ch].
669
670           Added channel mode, channel user mode, actions, notices,
671           whois and whowas printing to the the module-formats.c.
672
673         * Fixed a bug in channel deletion in the server.  The channel
674           is not left to the cache even if the channel founder auth mode
675           is set when there are no users anymore on the channel.  Affected
676           file silcd/server.c.
677
678         * The silc_net_localhost now resolves the entire hostname including
679           the domain name.  Affected file lib/silcutil/silcnet.c.
680
681 Sat May 26 12:13:37 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
682
683         * Changed the ask_passphrase client operation to be ascynchronous.
684           It has now a completion callback and a context that the 
685           application must call after it has got the passphrase from
686           the user.  Affected files lib/silcclient/silcapi.h,
687           lib/silcclient/protocol.c, lib/silcclient/command.c and
688           silc/client_ops.c.
689
690           Added SilcAskPassphrase callback that the application calls
691           to deliver the passphrase to the library.
692
693         * Changed the SKE protocol's SilcSKEVerifyCb to be asynchronous.
694           The public key verification and especially a certificate
695           verification is asynchronous procedure.
696
697           Added new SILC_SKE_STATUS_PENDING status to indicate the
698           request is pending and a callback will be called to finalize
699           the request.
700
701           Added also SILC_SKE_STATUS_PUBLIC_KEY_NOT_PROVIDED status to
702           indicate that remote end did not send its public key (or
703           certificate), even though we require it.  Added check for this
704           condition in the SKE.  This was a security bug, now fixed.
705
706           Defined new SilcSKEVerifyCbCompletion callback that is called
707           when the verification process is completed.
708
709           The affected files lib/silcske/silcske_status.h and
710           lib/silcske/silcske.[ch].
711
712         * Changed the verify_public_key client operation to be async
713           as well.  Defined SilcVerifyPublicKey callback that is used to
714           indicate the success of the public key verification process.
715
716           Changed the server and client to use the new async client 
717           operations.
718
719         * Changed the Irssi SILC client's internal scheduler to be called
720           twice as many times as it used to be.  As a result the client
721           should be a bit faster now.  Affected file is
722           irssi/src/silc/core/silc-core.c.
723
724         * Added support to Irssi SILC client of asynchronous public key
725           verification and passphrase inquiry.  Affected file is
726           irssi/src/silc/core/silc-core.c.
727
728 Fri May 25 14:38:38 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
729
730         * Do not say "You have left channel %s" in client library.
731           Moved it to the application.  Affected files are
732           lib/silcclient/command.c and silc/client_ops.c.
733
734         * Fixed silc_client_get_clients.  Command context was not
735           duplicated and was freed memory in the callback.  Affected
736           file lib/silcclient/idlist.c.
737
738         * Do not say "you are now talking..." on JOIN command in the
739           client library.  The appliation must handle it.
740
741         * Do not say ".. changed topic to" in command reply in the
742           client libary.  The application must handle it.
743
744         * Fixed TOPIC command sending in the client library.
745
746         * Fixed a memory leak in silc_client_command_free in the file
747           lib/silcclient/command.c.
748
749 Thu May 24 19:08:55 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
750
751         * Imported a modified version of Irssi client to the source tree.
752           The Irssi will be used to create a new client called
753           Irssi SILC.  Imported to irssi/.
754
755           Added silc_core_init_finish function to the Irssi.  Affected
756           file irssi/configure.in.
757
758           A lot changes in the Makefile.ams around the irssi tree.
759
760 Tue May 22 22:23:49 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
761
762         * Do not rehash if the new size is same as the old size of the
763           hash table, in the silc_hash_table_rehash*.  The affected file
764           lib/silcutil/silchashtable.c.
765
766         * Replaced hash_table_del_by_context calls from the server
767           (when channel->user_list and client->channels) to the
768           hash_table_del as it is sufficient and faster.
769
770 Tue May 22 17:27:16 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
771
772         * Added silc_hash_table_list, silc_hash_table_get and the
773           SilcHashTableList structure to provide an alternative way to
774           traverse the hash table.  The affected files are
775           lib/silcutil/silchashtable.[ch].
776
777         * Changed the server's idlist routines to use the hash table
778           routines to optimize the code.
779
780 Mon May 21 21:46:20 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
781
782         * Replaced the client entry's `channel' list and channel entry's
783           `user_list' list to hash tables for optimized lookup.  Changed
784           the code to use the hash table interface around the code. 
785           Affected file lib/silcd/idlist.[ch].
786
787         * Added `auto_rehash' boolean argument to the function
788           silc_hash_table_alloc to indicate whether the hash table should
789           auto-rehash when it thinks is appropriate time.  It will
790           increase the hash table size if the there is twice as much
791           entries in the table than the size of the table, and will
792           decrease the size if there are twice as less entries than
793           the size of the table.
794
795 Mon May 21 09:51:11 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
796
797         * Fixed silc_xxx_get_supported to not crash at some circumstances.
798
799 Sun May 20 13:45:58 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
800
801         * silc_idcache_purge_by_context deletes the entry now by context
802           as it is supposed to do.  Affected file lib/silccore/idcache.c.
803
804         * Send the ERR_NO_SUCH_NICK in the WHOIS command reply if the
805           client is not anymore valid (WHOWAS givens the info) and not
806           the ERR_NO_SUCH_CLIENT_ID if the nickname still exists.
807
808 Sat May 19 16:30:03 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
809
810         * Removed the `data' and `data_len' arguments from the ID Cache
811           interfaces and added `name' argument.  ID Cache does not handle
812           anymore the binary data only a names associated with given ID.
813
814         * When hashing a Client ID with silc_hash_id the entire ID is
815           not hashed anymore, instead only the hash of the Client ID is
816           hashed.  This way we can access the Client ID from the cache
817           with Client ID but with the hash of the ID (which is a hash of
818           the nickname) as well without any difference in performance.
819
820           Added also silc_idcache_find_by_id_one_ext to do one on one 
821           searching when we have the actual ID.  Added also function
822           silc_hash_client_id_compare.  The affected files are
823           lib/silccore/idcache.[ch] and lib/silcutil/silcutil.[ch].
824
825         * When hashing the name associated with a ID it is always done
826           in lowercase.  This way we can access the cache without worrying
827           about case-sensitivity, even though, for example nicknames are
828           case sensitive.
829
830         * Fixed a bug in server with channel message sending.  It put
831           wrong ID type as destination ID.  The affected file 
832           silcd/packet_send.c.
833
834         * silc_idcache_del_by_context now deletes from all hash tables
835           by context.  Affected file lib/silccore/idcache.c.
836
837 Fri May 18 17:42:00 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
838
839         * Changed the client library to use the new ID Cache interface.
840           Changes around the source tree.
841
842         * Added silc_hash_table_rehash_ext to rehash with specific
843           hash function.  Affected file lib/silcutil/silchashtable.[ch].
844
845         * Added silc_hash_string_compare to compare two strings in the
846           hash table.  Affected file lib/silcutil/silcutil.[ch].
847
848 Fri May 18 11:18:45 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
849
850         * Added new function silc_idcache_del_by_context into the
851           lib/silccore/idcache.[ch].
852
853         * Changed the server's ID list routines to use the new ID Cache
854           interface.  Changes around the source tree.
855
856 Fri May 18 08:35:31 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
857
858         * Added silc_hash_table_del[_by_context]_ext functions in to the
859           lib/silcutil/silchashtable.[ch].
860
861           Removed silc_hash_table_find_all* routines and added new
862           silc_hash_table_find_foreach to replace them.
863
864           Added silc_hash_table_replace_ext function as extended
865           replacing function.  Separated the simple hash table interface
866           from the extended hash table interface in the file
867           lib/silcutil/silchashtable.h.
868
869         * Fixed minor bugs and changed it to use some of the new
870           hash table functions in lib/silccore/idcache.c
871
872 Thu May 17 18:15:12 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
873
874         * Added new function silc_hash_table_find_all to return all keys
875           in the hash table by the specified key.  As the hash table is
876           collision resistant it also makes it possible to have several
877           duplicate keys in the hash table.  This function may be used to
878           find all of the keys from the hash.
879
880           Added user_context arguments to the SilcHashFunction,
881           SilcHashCompare and SilcHashDestructor to deliver user specified
882           context.
883
884           Added new fuctions silc_hash_table_find[_all]_ext to do
885           extended lookup with specified hash and compare functions and
886           specified user contexts.
887
888           Added new function silc_hash_table_add_ext to add the key
889           with specified hash function and user context.
890
891           Added new function silc_hash_table_foreach to traverse all
892           entrys in the hash table.  Added SilcHashForeach callback
893           function.
894
895           Added new function silc_hash_table_del_by_context to delete
896           the entry only if the context associated with the key matches.
897
898           Affected files are lib/silcutil/silchashtable.[ch].
899
900         * Removed silc_hash_[server/client/channel]_id and added just
901           silc_hash_id to the lib/silcutil/silcutil.[ch].  Added also
902           silc_hash_id_compare to compare two ID's using as the hash table
903           comparison function.  Added also silc_hash_data to hash
904           binary data and silc_hash_data_compare to compare it.
905
906         * Removed silc_idlist_find_client_by_hash as it is not needed
907           anymore.  Affected file silcd/idlist.[ch].
908
909         * Rewrote the entire ID Cache system (in lib/silccore/idcache.[ch])
910           to use internally the SilcHashTable.  The new ID Cache is a lot
911           faster than the old one.  Some of the ID Cache interface was also
912           rewritten and obsolete and stupid functions were removed.
913
914 Wed May 16 23:03:30 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
915
916         * Added entry_count field to the SilcHashTable to keep the number
917           of the entries in the table.  Implemented the function
918           silc_hash_table_rehash.  Added new function
919           silc_hash_table_count.  Affected file lib/silcutil/silchashtable.c.
920
921           Fixed a minor bug in silc_hash_table_free.
922
923         * Added silc_hash_string, silc_hash_uint, silc_hash_ptr,
924           silc_hash_client_id, silc_hash_server_id and silc_hash_channel_id
925           into the lib/silcutil/silcutil.[ch].
926
927 Wed May 16 20:02:47 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
928
929         * Implemented a collision resistant hash table into the
930           lib/silcutil/silchashtable[ch].  See the header and the source
931           for the SilcHashTable API.
932
933 Tue May 15 22:05:46 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
934
935         * Merged dotconf version 1.0.2 into lib/dotconf.
936
937 Sun May 13 19:32:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
938
939         * Do not compile anything in lib/silcsim/* if the SIM support
940           is not enabled.  The tree should now compile without problems
941           under cygwin.
942
943 Thu May 10 22:49:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
944
945         * Compiled the SILC under cygwin.  Compiled and tested briefly
946           without problems.  More tests needed.  The SIMs didn't compile
947           though.
948
949         * Added various #ifdef HAVE_* stuff to lib/silccrypt/silrng.c.
950
951         * Fixed possible crash in silc_get_username in the
952           lib/silcutil/silcutil.c.
953
954 Tue May  8 09:04:03 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
955
956         * Fixed a va_arg in silc/client_ops.c.
957
958         * Oops, RC5 routines were named AES and caused some problems
959           when not using SIM's.  Affected file lib/silccrypt/rc5.c.
960
961 Sun May  6 13:59:48 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
962
963         * Added new SilcIDIP structure into the lib/silccore/id.h and
964           replaced the old `ip' fields from all SILC ID's to that type.
965           This is a step towards IPv6 support.
966
967           The silc_id_get_len takes now the ID as an extra argument.
968           The silc_id_id2str, silc_id_str2id and silc_id_dup now supports
969           both IPv4 and IPv6 based ID's.
970
971           The affected files are lib/silccore/id.[ch] and other files
972           around the tree using these routines.
973
974         * Removed the ID length arguments in server from various 
975           silc_server_send_notify_* routines -> they are not needed 
976           anymore.
977
978 Sat May  5 13:56:33 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
979
980         * Fixed memory leak in silc_encode_pem_file in the file
981           lib/silcutil/silcutil.c.
982
983 Thu May  3 21:23:50 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
984
985         * Check minor version as well in the SKE.  Affected files are
986           silcd/protocol.c and lib/silcclient/protocol.c.
987
988         * Added --identifier option to the server so that an identifier
989           can be when creating the public key for the server.  Affected
990           file is silcd/silcd.c.
991
992         * Fixed minor decoding bug in silc_pkcs_decode_identifier in
993           lib/silccrypt/silcpkcs.c.
994
995 Wed May  2 20:50:49 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
996
997         * Register default ciphers and stuff when using -C option with
998           the server.  Affected file sildc/silcd.c.
999
1000         * Put back the servers public key filename format, it is better
1001           than the new one.  For now, the client keys are saved with the
1002           new filename format.  The affected file silc/client_ops.c.
1003
1004         * Implemented the Cipher API for the rest of the ciphers that
1005           did not implement it or implemented it the wrong way.
1006
1007 Wed May  2 13:31:26 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1008
1009         * Register default ciphers and stuff when using the -S option
1010           in the client.  Affected file silc/silc.c.  Same also when
1011           creating new key pair with -C option.
1012
1013 Tue May  1 14:18:13 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1014
1015         * Fixed the silc_verify_public_key client operation function to
1016           save the public keys differently.  The fingerprint is now 
1017           used as filename and not the hostname.  This way also the
1018           client keys are saved uniquely and not with hostnames.  The
1019           affected file is silc/client_ops.c.
1020
1021         * Trimmed the silc_hash_fingerprint function to remove extra
1022           whitespaces from the end of the fingerprint.  The affected
1023           file is lib/silccrypt/silchash.c.
1024
1025         * Updated TODO.
1026
1027         * Added silc_cipher_register_default function to register all
1028           default ciphers.  It can be used when configuration files
1029           does not exist and the application does not want any specific
1030           ciphers in any specific order.
1031
1032           The SilcDList is now used as silc_cipher_list dynamically
1033           allocated cipher list.  Removed the static list all together
1034           and now all ciphers must be allocated to the dynamic list.
1035           The silc_cipher_alloc routine was changed to check only the
1036           dynamic list.
1037
1038           All silc_cipher_* routines that used to return int returns
1039           now bool.
1040
1041           The affected files lib/silccrypt/silccrypt.[ch].
1042
1043         * The same thing was done to silc_hash_* as for silc_cipher_*
1044           routines.  Affected files lib/silccrypt/silchash.[ch].
1045
1046         * The same thing was done to silc_pkcs_* as for silc_cipher_*
1047           routines.  Affected files lib/silccrypt/silcpkcs.[ch].
1048           Added also silc_pkcs_[un]register[_default] functions.
1049           Removed the data_context from the PKCS API.
1050
1051         * Added silc_hmac_register_default function to register default
1052           hmacs.  Affected files lib/silccrypt/silchmac.[ch].  Added also
1053           SILC_ALL_HMACS macro that can be used with silc_hmac_unregister
1054           to unregister all hmacs at once.
1055
1056         * Register the default ciphers, hash functions, PKCSs and HMACs
1057           if client's configuration file does not exist.  The affected
1058           file silc/silc.c.
1059
1060         * The client did not load the hash functions from the SIM
1061           modules at all.  Added support for this.  Affected file is
1062           silc/clientconfig.c.
1063
1064         * When decoding public key with silc_pkcs_public_key_decode, check
1065           the supported algorithm only if PKCS are registered.  Affected
1066           file lib/silccrypt/silcpkcs.c.  The same was done with the
1067           silc_pkcs_private_key_decode.
1068
1069         * Fixed the SILC List routines to keep the list always in order.
1070           It used to change the list's order when traversing the list but
1071           not it preserves the order.  Affected file lib/trq/silclist.h.
1072
1073 Mon Apr 30 17:29:03 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1074
1075         * Added the client library to use the SilcSocketConnection's
1076           reference counter (by silc_socket_dup) to prevent the bug that
1077           the socket object may be freed underneath async operation.
1078
1079         * The name resolv library checking fixes in the configure.in.pre.
1080           The patch by salo.
1081
1082         * Created new version of the protocol drafts for future
1083           development. The -03 drafts are the ones that will be changed
1084           in the trunk now and the -02 will remain as they are.
1085
1086         * Send list of CUMODE notifys to the router when announcing
1087           the channel users to the router.  Affected file silcd/server.c.
1088           If the router receiving channel founder CUMODE for a channel
1089           that already has channel founder it will send CUMODE notify
1090           to the sender to remove the channel founder rights from the
1091           announced client.  Affected file silcd/packet_receive.c.
1092
1093         * The CUMODE notify may now use Server ID as well as the entity
1094           who changes the mode.  Updated protocool specs.
1095
1096         * Updated INSTALL and README files.
1097
1098 Sun Apr 29 23:17:50 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1099
1100         * New web pages in the http://silc.pspt.fi.  The pages was
1101           designed by salo.
1102
1103         * Updated CREDITS.
1104
1105 Sun Apr 29 13:33:41 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1106
1107         * Implemented the [DenyConnectin] config section in the server.
1108           Added silc_server_config_denied_conn to check whether incoming
1109           connection is denied.  Affected file silcd/serverconfig.[ch].
1110
1111         * Do not check the ports when checking the incoming configuration
1112           data if the port is 0, meaning any.  Affected file is
1113           silcd/serverconfig.c.
1114
1115 Fri Apr 20 18:58:43 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1116
1117         * Fixed buffer overflow in silc_string_compare in the file
1118           lib/silcutil/silcutil.c.
1119
1120         * Fixed double free in silc_server_command_leave in the file
1121           silcd/command.c.
1122
1123 Fri Apr 20 14:00:11 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1124
1125         * Fixed the version checking in the server.  Affected file is
1126           silcd/protocol.c.
1127
1128 Thu Apr 19 19:52:46 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1129
1130         * Fixed the configuration data fetching when accepting new
1131           connections in the server.  Affected file silcd/server.c.
1132
1133 Thu Apr 19 11:40:20 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1134
1135         * Added `sender_entry' argument to the function
1136           silc_server_packet_relay_to_channel so that we can check
1137           whether some destination actually belongs to the same route
1138           the sender belongs (ie, we must not resend the packet to the
1139           sender).  Affected file silcd/packet_send.[ch].
1140
1141         * Added `servername' field to the SilcClientEntry in the server
1142           to hold the name of the server where client is from.  Affected
1143           file is silcd/idlist.h.
1144
1145 Wed Apr 18 22:19:03 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1146
1147         * Moved the channel message encrypting in the router betwen
1148           router connections from silc_server_channel_message to the
1149           silc_server_packet_relay_to_channel since we want to check
1150           whether we have anybody channel before encrypting anything.
1151           Affected files silcd/packet_[receive/send].c.
1152
1153 Tue Apr 17 21:18:19 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1154
1155         * Fixed the [AdminConnection] server config section to support
1156           multiple entries.  Affected file silcd/serverconfig.c.
1157
1158         * Added support into the server to check the validity of the
1159           incoming connection before executing any KE or authentication
1160           protocols.
1161
1162         * The connection configuration is now saved to the KE and 
1163           connection auth protocol contexts and not fetched anymore in 
1164           the protocol.  Affected files silcd/server.c, silcd/protocol.[ch].
1165
1166         * The local hosts listenning address and port is also resolved
1167           now when starting the server.  We want to have the socket object
1168           to include the real address and port for the listener.  Added
1169           new function silc_net_check_local_by_sock into the files
1170           lib/silcutil/silcnet.[ch].
1171
1172         * Fixed a broadcast bug in server -> do not broadcast if we
1173           are standalone.
1174
1175         * Fixed a routing bug.  Do not route broadcast packets ever.
1176           Broadcast packets must be processed always and not routed since
1177           they may be destined to some other host than yourself and thus
1178           would get routed without no good reason.  Affected file is
1179           silcd/server.c.
1180
1181         * Added function silc_server_config_is_primary_route to check
1182           whether primary router connection has been configured (a router
1183           configuration that we are initiating).  If there is not, we 
1184           will assume that there is only two routers in the SILC network
1185           and we will use the incoming router connection as our primary
1186           route.  Affected files silcd/serverconfig.[ch], silcd/server.c.
1187
1188         * Changed the order of the broadcasting.  Broadcast _after_ the
1189           packet has been processed not before.  Affected file is
1190           silcd/server.c.
1191
1192         * Fixed a [ClientConnection] parsing bug.  The port was never
1193           parsed correctly thus resulting to port 0.  Affected file
1194           silcd/serverconfig.c.
1195
1196         * Fixed silc_server_send_notify_args -> it ignored the `broadcast'
1197           argument and did not set the broadcast packet flag.  Affected
1198           file silcd/packet_send.c.  Fixed same bug in the function
1199           silc_server_send_notify as well.
1200
1201         * If we receive NEW_ID packet for our own ID in the server, ignore
1202           the packet.
1203
1204 Mon Apr 16 12:10:33 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1205
1206         * Updated TODO.
1207
1208         * Removed the nickname from the Private Message Payload.
1209           Updated the code and the protocol specs.
1210
1211         * Updated protocol specs for submitting to the IETF.
1212
1213         * Tweaked the Random Number Generator a bit.  Affected file
1214           lib/silccrypt/silcrng.c.  Exported a new function
1215           silc_rng_[global]_add_noise which can be used to add more
1216           noise to the RNG.
1217
1218 Sat Apr 14 16:21:32 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1219
1220         * Do not parse packets with different timeout when protocol
1221           is active -> may cause problem with rekey.  Affected file
1222           silcd/server.c.
1223
1224         * When server receives signoff notify it must not create
1225           new channel key if the client is on any channels since the
1226           sender of the signoff notify will create it.
1227
1228 Fri Apr 13 17:12:46 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1229
1230         * Added printing of error messages during SKE protocol from the
1231           failure packet sent by server during SKE.  Affected file
1232           silc/client_ops.c.
1233
1234         * Removed the client's failure_callback handling with timeout
1235           and handle it immediately when received.
1236
1237         * The SKE library returned wrong type in SUCCESS and FAILURE 
1238           packets.  They must be 32 bit MSB not 16 bit MSB.
1239
1240 Fri Apr 13 00:09:08 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1241
1242         * Ok, rewrote the logic of the re-key and now it seems to work.
1243           I tested it on high traffic with frequent re-keys without
1244           problems.  Added hmac_receive (and renamed hmac to hmac_send)
1245           in SilcClientConnection in lib/silcclient/client.h and
1246           in SilcIDListData in silcd/idlist.h.  Also, removed the
1247           SilcPacketParserContext's cipher and hmac fields as they are
1248           not needed anymore and actually caused some problems when
1249           the ciphers and hmac's changed underneath the packet parser.
1250
1251 Thu Apr 12 14:42:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1252
1253         * If re-key protocol is active then process the incoming packets
1254           synchronously since we must assure that icoming packets encrypted
1255           with the old key is processed before the new keys is set to
1256           use.  This is true other packets than for REKEY packets.
1257           Affected file silcd/server.c.  The same was done to client library
1258           as well, affected file lib/silcclient/client.c.
1259
1260 Thu Apr 12 12:01:52 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1261
1262         * Fixed bug in client and server to accept the force send if
1263           the packet is send from silc_[server/client]_packet_process
1264           function.  Otherwise the packets are never delivered, oops.
1265
1266 Wed Apr 11 22:10:15 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1267
1268         * Disable force sending of packets when REKEY protocol is active.
1269           We must assure that no packet is sent directly when rekey is
1270           performed.  All packets must be sent through packet queue.
1271           Added macro SILC_SERVER_IS_REKEY to silcd/server.h and
1272           SILC_CLIENT_IS_REKEY to lib/silcclient/client.h.  Affected
1273           function is silc_[server/client]_packet_send_real to check
1274           the situation.
1275
1276         * Replaced the SIM paths from example config files to 
1277           /usr/local/modules.  Also, make install creates now
1278           /usr/local/silc/logs directory to hold all the SILC server
1279           logs.
1280
1281 Wed Apr 11 16:59:59 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1282
1283         * Made the configure.in.pre work on Solaris.  Patch by salo.
1284
1285         * Made all ciphers compatible with non-x86 machines.  Defined
1286           CBC mode macros into lib/silccrypt/ciphers_def.h.
1287
1288 Tue Apr 10 20:32:44 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1289
1290         * Fixed the make install.
1291
1292 Tue Apr 10 16:20:34 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1293
1294         * When MAC computation fails the silc_packet_decrypt returned 0
1295           even though it was supposed to return -1.  Fixed this.  The
1296           affected file is lib/silccore/silcpacket.c.
1297
1298         * Do not replace the config files in /etc/silc (in make install)
1299           if they already exist.  Affected file ./Makefile.am.
1300
1301         * Do not send re-key packets immediately but through packet queue.
1302           Affected file silcd/protocol.c and lib/silcclient/protocol.c.
1303
1304         * Changed silc_net_check_host_by_sock to return FALSE if the
1305           IP/DNS could not be resolved.  Though, it returns the IP address
1306           now even if it could not resolve it (but returns also FALSE).
1307           Affected file lib/silcutil/silcnet.[ch].
1308
1309 Mon Apr  9 21:54:44 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1310
1311         * Added silc_pkcs_decode_identifier to decode the public key's
1312           identifier.  Affected file lib/silccrypt/silpkcs.[ch].
1313           Added also silc_pkcs_free_identifier.  Added also new context
1314           SilcPublicKeyIdentifier.
1315
1316         * Added -S option to the silc client.  It is used to dump the
1317           contents of the specified public key file.
1318
1319         * Changed the PKCS api to return the public key length when
1320           setting the public key.
1321
1322         * Fixed a fatal bug in the public and private key file loading.
1323           Affected file lib/silccrypt/silcpkcs.c.
1324
1325         * Execute the packet parsing for client with zero (0) timeout
1326           if the protocol is active.  Affected file silcd/server.c.
1327
1328 Sun Apr  8 19:30:56 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1329
1330         * Made the key generation options to the silcd program.  Added
1331           -C option, equivalent to client's option.
1332
1333         * Added new [ServerKeys] config section to the server.  It
1334           configures the server's public and private key.
1335
1336         * Defined generic Public Key Payload into the protocol
1337           specification to send specific type of public keys and
1338           certificates.
1339
1340         * Defined new command SILC_COMMAND_GETKEY to fetch a client's
1341           public key or certificate.
1342
1343         * Implemented the GETKEY command to the server and to the
1344           client library and on user interface.
1345
1346 Sun Apr  8 01:37:21 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1347
1348         * Made preliminary `make install' work.
1349
1350 Thu Apr  5 17:42:30 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1351
1352         * Added SilcServerRekey context into silcd/idlist.h.
1353
1354         * Added the PFS support as defined in the specification to the
1355           SKE protocol.  Affected files lib/silcske/*.c.
1356
1357         * Added `ske_group' field to the SilcServerRekey context to hold
1358           the number of the SKE group that is used with PFS in re-key.
1359           Affected file silcd/idlist.h.
1360
1361         * Added PFS re-key support to the server.  Affected file is
1362           silcd/protocol.c.
1363
1364         * Added silc_protocol_cancel to cancel execution of the next
1365           state of the protocol.  Affected file is
1366           lib/silccore/silcprotocol.[ch].
1367
1368         * Added the re-key support with and without PFS to the client
1369           library.  Re-key is performed once in an hour, by default.
1370
1371           Added new protocol type SILC_PROTOCOL_CLIENT_REKEY.
1372           Added silc_client_rekey_callback and silc_client_rekey_final.
1373           Affected files are lib/silcclient/protocol.[ch] and
1374           lib/silcclient/client.[ch].
1375
1376         * Removed the `hmac_key' and `hmac_key_len' fields from the
1377           SilcClientConnection structure; not needed.  Affected file is
1378           lib/silcclient/client.h.
1379
1380         * Updated TODO.
1381
1382 Wed Apr  4 16:32:31 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1383
1384         * Do not ask whether user wants to use the negotiated private key
1385           for private messages, just use it.  Affected file is 
1386           silc/local_command.c.
1387
1388         * Added `send_enc_key' and `enc_key_len' fields to the 
1389           SilcIDListData structure since they are needed in the re-key
1390           phase.  Affected file is silcd/idlist.[ch].
1391
1392         * Implemented the simple re-key protocol into the server.
1393           Affected files silcd/server.c and silcd/protocol.[ch].  The
1394           re-key will be performed once in an hour, by default.
1395
1396           Added new protocol type SILC_PROTOCOL_SERVER_REKEY.
1397           Added silc_server_rekey, silc_server_rekey_callback and
1398           silc_server_rekey_final.
1399
1400         * Removed Tunneled flag from the protocol.  Updated the code
1401           and the specifications.
1402
1403         * Adde `pfs' field to the SilcIDListData to indicate whether
1404           the PFS is to be performed in the re-key.  Affected file is
1405           silcd/idlist.h.
1406
1407 Tue Apr  3 21:52:42 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1408
1409         * Defined uint8, int8, uint16, int16, uint32, int32, uint64 and
1410           int64 of at least the xintXX size.  If void * is less that 4
1411           bytes uint32 * will be used.  Defined bool as boolean.
1412
1413         * Changed _ALL_ unsigned long and unsigned int to uint32, 
1414           unsgined short to uint16 in the source tree.
1415
1416         * Fixed a fatal bug in silc_server_remove_clients_by_server.  Do
1417           not handle clients that has entry->data.registered == FALSE.
1418           They are not in the network anymore.  Affected file is
1419           silcd/server.c.
1420
1421 Tue Apr  3 16:39:19 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1422
1423         * Implemented the sending of the SERVER_SIGNOFF notify in the
1424           server.  Affected file is silcd/server.c.
1425
1426         * Added silc_server_send_notify_args into silcd/packet_send.[ch].
1427           Added also silc_notify_payload_encode_args into the
1428           lib/silccore/silcnotify.[ch].
1429
1430         * Implemented ther SERVER_SIGNOFF notify handling in the server.
1431           Affected file silcd/packet_receive.c.
1432
1433         * Implemented the SERVER_SIGNOFF notify handling in the client
1434           library.  Affected file lib/silcclient/client_notify.c.  Also,
1435           implemnted the printing of the SERVER_SIGNOFF info to the
1436           application.  Affected file silc/client_ops.c.
1437
1438         * The silc_idlist_del_server now returns TRUE or FALSE to indicate
1439           if the deleting was successful.  Affected file silcd/idlist.[ch].
1440
1441         * Added support for public key authentication in the connection
1442           authentication protocol in the client library.  Affected file
1443           lib/silcclient/protocol.c.
1444
1445         * Changed the server's silc_idlist_get_clients_by_* interface
1446           to support already allocated array so that new entries may be
1447           added to pre-allocated array.  Affected file silcd/idlist.[ch].
1448           This fixes some bugs with WHOIS, WHOWAS and IDENTIFY commands
1449           and command replies.
1450
1451         * All command reply functions in the server now calls the 
1452           pending command callback even if error occured.  This way the
1453           error will be delivered to the client as well.  Affected files
1454           silcd/command.c and silcd/command_reply.c.
1455
1456         * Fixed INFO command to return local server's info if no server
1457           was provided.  Affected file lib/silcclient/command.c.
1458
1459         * Removed RESTART command for good.  Updated the code and the
1460           protocol specs.
1461
1462         * Rewrote parts of the task system.  It is a bit simpler now.
1463           Removed unsued task priorities. The affected files are
1464           lib/silcutil/silctask.[ch].
1465
1466 Mon Apr  2 20:02:33 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1467
1468         * Moved the USERS printing from the library to the application.
1469           Affected files lib/silcclient/command.c and silc/client_ops.c.
1470
1471 Mon Apr  2 13:13:23 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1472
1473         * Updated TODO.
1474
1475         * Added channel key re-key support.  The re-key is perfomed
1476           only by the router and is done once in an hour.  Added `rekey'
1477           field to the SilcChannelEntry in the server.  Affected files
1478           silcd/server.c and silcd/idlist.h.
1479
1480         * Added silc_task_unregister_by_context into the file
1481           lib/silcutil/silctask.[ch].
1482
1483 Sun Apr  1 19:49:34 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1484
1485         * Added SILC_UMODE_GONE mode to indicate when the client is not
1486           present in the SILC network.  Added also support to the local
1487           command AWAY that will set this mode.  Added support of showing
1488           "xxx is gone" in WHOIS command.  The USERS command shows the
1489           gone status as well.
1490
1491         * Fixed setting server and router operator privileges in the
1492           server's UMODE command.  Affected file silcd/command.c.
1493
1494         * Merged the SKE KE1 and KE2 payloads into one payload.  The
1495           new KE payload is equivalent to the old KE2 payload.
1496
1497           Cleaned up the SKE Start Payload parsing.  It now uses the
1498           simple buffer unformatting to do the parsing.  A lot faster
1499           now.
1500
1501           Added new Mutual Authentication flag (SILC_SKE_SP_FLAG_MUTUAL)
1502           to the SKE that is used to indicate whether both of the SKE
1503           parties should perform authentication.  By default only the
1504           responder performs authentication.  By setting this flag also
1505           the initiator must do authentication.  By default it is unset
1506           since in normal SKE case, client to server connection, only
1507           the responder should do authentication.  When doing SKE between
1508           two clients both should perform authentication.  Updated the
1509           code and the protocol specs.
1510
1511         * A little fix to IDENTIFY command in the server.  Search the
1512           client first by hash not nickname.  Affected file is 
1513           silcd/command.c.
1514
1515         * Fixed the silc_client_close_connection to support closing
1516           the client to client connections wihtout deleting too much
1517           data.  Affected file lib/silcclient/client.c.
1518
1519         * Fixed a fatal bug in server and client; if KE1 or KE2 packets
1520           are received if protocol used to be active but is not anymore
1521           the application would crash due to NULL pointer dereference.
1522           Affected files silcd/server.c and lib/silcclient/client.c.
1523
1524         * Added `hash' field to the SilcClientConnection to include
1525           the hash function negotiated in the SKE protocol.
1526
1527         * Added new channel mode SILC_CMODE_FOUNDER_AUTH that is used
1528           to set the channel founder authentication data.  A client can
1529           claim the founder rights later by providing the authentication
1530           data to the CUMODE command using SILC_CUMODE_FOUNDER mode.
1531           This way the channel founder can regain the channel founder
1532           privileges even it is left the channel.  This works only on
1533           local server and the client must be connected to the same
1534           server to be able to regain the founder rights.  Updated the
1535           protocol specs accordingly.
1536
1537           Added support to the CMODE command in the client to set the
1538           founder auth data.  Read the README to see how to set it.
1539
1540           Added support to the CUMODE command to claim the founder
1541           rights.  Read the README to see how to do it.
1542
1543           Added support for the founder authentication to the Channel
1544           Entry in the server.  Affected file silcd/idlist.h.
1545
1546           Added support for the SILC_CMODE_FOUNDER_AUTH mode in the
1547           server's CMODE command.  Affected file silcd/command.c.
1548
1549         * Added the following new functions into lib/silccore/silcauth.[ch]:
1550           silc_auth_get_method and silc_auth_get_data.    
1551
1552         * The server now saves the remote hosts public key to the
1553           SilcIDListData pointer.  Affected file silcd/protocol.c.
1554
1555         * The normal server now does not remove the channel entry from
1556           the cache if the founder authentication data is set.  It used
1557           to remove it if the founder was the last one on the channel on 
1558           the server and left the channel.  The auth data is saved and
1559           if the channel is re-joined later the old entry is used with
1560           the old auth data.  Affected files silcd/command_reply.c and
1561           silcd/server.c.
1562
1563         * Removed the `pkcs' field from the SilcIDListData structure
1564           in the server; it is not used.  Affected file silcd/idlist.h.
1565
1566 Sat Mar 31 15:38:36 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1567
1568         * Fixed packet processing on slow links.  Partial packets were
1569           never re-processed because the incoming data buffer was cleared
1570           by the application.  Application must not directly clear the
1571           sock->inbuf, the packet processing routines handle it.  Fixed
1572           this in client library and in server.
1573
1574 Fri Mar 30 16:35:27 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1575
1576         * Fixed the WHOIS and IDENTIFY send reply function to really
1577           check whether to send list or just one entry.  Affected file
1578           silcd/command.c.
1579
1580         * Cleaned up the LEAVE command's channel key distribution.  The
1581           affected file silcd/command.c.
1582
1583         * Changed CMODE_CHANGE's <Client ID> to <ID Payload> as server
1584           can enforce the channel mode as well.  In that case the ID
1585           includes the ID of the server.  The code now enforces the
1586           mode change if the router have different mode than the server.
1587
1588         * The notify client operation with CMODE_CHANGE notify can now
1589           return NULL client_entry pointer if the CMODE was not changed
1590           by client.  Application must check for this.
1591
1592         * Added <Server ID> argument to INFO command to support server
1593           info fetching by Server ID.
1594
1595         * Added silc_server_announce_get_channel_users to get assembled
1596           packets of channel users of the specified channel.  Affected
1597           file silcd/server.[ch].
1598
1599         * Fixed bug in CHANNEL_CHANGE notify in the server.  The new ID
1600           was freed underneath the ID Cache.
1601
1602         * Re-announce clients when the server received CHANNEL_CHANGE
1603           notify from the router.  Affected file silcd/packet_send.c.
1604
1605 Thu Mar 29 19:10:28 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1606
1607         * Fixed a fatal bug when client does /join 1 2 3 4 5 6 the server
1608           crashed since it did not handle the fact that there is no cipher
1609           called "3" and didn't check the error condition.  Now fixed.
1610
1611         * Added SILC_MESSAGE_FLAG_REQUEST message flag as generic request
1612           flag.  It can be used to send message requests.
1613
1614 Thu Mar 29 12:26:25 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1615
1616         * Implemented the RESTART command in the client.
1617
1618         * Added SILC_MESSAGE_FLAG_NOTICE message flag for informational
1619           notice type messages.  Added notice printing to the user
1620           interface.
1621
1622         * The channel keys are not re-generated if the channel's mode
1623           is PRIVKEY, ie private key on the channel exists.  Affected
1624           files silcd/server.c and silcd/command.c.
1625
1626         * Fixed a little bug in channel message delivery when channel
1627           private keys are set in the server.  Affected file is
1628           silcd/packet_send.c.
1629
1630         * Changed the setting on channel->on_channel = TRUE from the
1631           silc_client_save_channel_key to the JOIN command reply.  The
1632           key payload is not received if the private channel key is set.
1633           Affected file lib/silcclient/command_reply.c and the
1634           lib/silcclient/client_channel.c.
1635
1636         * When the CMODE_CHANGE notify is sent and the channel private
1637           key mode is removed the channel key must be re-generated in
1638           other cells as well.  Added this support for the router in the
1639           silcd/packet_receive.c.
1640
1641         * Added new local command NOTICE to send notice message on
1642           channel.  Affected file silc/local_command.[ch].
1643
1644 Wed Mar 28 23:55:54 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1645
1646         * Added new local command ME to the client.  It is used to send
1647           message to a channel with SILC_MESSAGE_FLAG_ACTION to indicate
1648           some action.  Affected file silc/local_command.[ch].
1649
1650         * Changed channel_message and private_message client operations 
1651           to deliver the message flags to the application.  Added also
1652           the `flags' arguments to the silc_client_send_channel_message
1653           and silc_client_send_private_message functions.  Affected file
1654           silcapi.h.
1655
1656 Wed Mar 28 20:50:47 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1657
1658         * Redefined the Private Message Payload to support private message
1659           keys and to support the new private message flags.  Updated
1660           the protocol specs.  Flags makes it possible to have for example
1661           CTCP style messages.
1662
1663         * Added new type SilcPrivateMessagePayload and defined an API
1664           for it in the lib/silcclient/silcprivate.[ch].
1665
1666         * Tested private message private keys successfully.  Tested the
1667           private message key set, unset and list commands with the new
1668           KEY command.
1669
1670         * Redefined the Channel Message Payload to include the channel
1671           message flags (equal with private message flags) to support
1672           for example CTCP style messages.
1673
1674         * Defined some of the message (for channel and private message)
1675           flags.  Updated the protocol specs and added the flags to the
1676           lib/silccore/silcchannel.h.  The type is SilcMessageFlags.
1677
1678 Wed Mar 28 15:52:36 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1679
1680         * Added SilcKeyAgreementStatus type to the key agreement routines
1681           to indicate the current status and error if one occured.
1682           The status types are defined in the lib/silcclient/silcapi.h.
1683
1684         * Added new local command KEY that is used to set and unset private
1685           keys for channels, set and unset private keys for private messages
1686           with remote clients and to send key agreement requests and
1687           negotiate the key agreement protocol with remote client.  The
1688           key agreement is supported only to negotiate private message keys,
1689           it currently cannot be used to negotiate private keys for channels,
1690           as it is not convenient for that purpose.
1691
1692         * Fixed a minor pending callback setting bug in the function
1693           silc_client_get_client_by_id_resolve, now the function works.
1694           Affected file lib/silcclient/idlist.c.
1695
1696         * Added function silc_net_get_local_port to get local bound
1697           port by socket.  Added to lib/silcutil/silcnet.[ch].
1698
1699         * Added `sockets' and `sockets_count' fields to the SilcClient
1700           object.  They hold the sockets of the listenning sockets in
1701           the client.  Listenning sockets may be for example the key 
1702           agreement server.  Affected file lib/silcclient/client.[ch].
1703           Added functions the silc_client_add_socket and the
1704           silc_client_del_socket.  They are exported to the application
1705           as well.
1706
1707         * Added ~./silc/clientkeys to support other client's public keys.
1708
1709         * Renamed verify_server_key client operation to verify_public_key
1710           and added one argument to indicate the type of the connection
1711           (server, client etc.).
1712
1713 Tue Mar 27 22:22:38 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1714
1715         * Added silc_server_connection_auth_request to handle the
1716           incoming CONNECTION_AUTH_REQUEST packet.  Affected file is
1717           silcd/packet_receive.[ch].
1718
1719         * Added silc_server_send_connection_auth_request into the
1720           silcd/packet_send.c to send the connection auth request packet.
1721
1722         * Cleaned up the silcd/protocol.c a bit and fixed some memory
1723           leaks.
1724
1725         * Fixed the public key authentication in responder side in the
1726           server.  The `auth_data' pointer includes the SilcPublicKey
1727           not the path to the public key.  Affected file silcd/protocol.c.
1728
1729         * Implemented the public key authentication in the initiator side
1730           in the server.  Affected file silcd/protocol.c.
1731
1732         * Removed the [RedirectClient] config section from the server
1733           configuration.  Is not needed and I don't want to implement it.
1734
1735 Tue Mar 27 12:49:56 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1736
1737         * Cleaned up the CMODE command in the server.  It now works
1738           correctly and supports all the modes defined in the protocol.
1739           Affected file is silcd/command.c.
1740
1741         * Added `hmac_name' field to the SilcChannelEntry in the server
1742           to hold the default HMAC of the channel.  It can be set when
1743           creating the channel (with JOIN command).  Affected files
1744           silcd/idlist.[ch].
1745
1746         * Added <cipher> and <hmac> argument to the CMODE_CHANGE notify
1747           type to indicate the change of the current cipher and hmac
1748           on the channel.  Client can safely ignore the <cipher> argument
1749           (if it chooses to do so) since the CHANNEL_KEY packet will 
1750           force the channel key change anyway.  The <hmac> argument is
1751           important since the client is responsible of setting the new
1752           HMAC and the hmac key into use.
1753
1754         * Fixed the CMODE command in the client library as well.
1755
1756         * Tested CMODE command in router environment successfully.
1757
1758 Mon Mar 26 14:39:48 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1759
1760         * Show the version of the remote client (or server) when connecting
1761           to the server.  It is logged to the log file.  Affected file
1762           is silcd/protocol.c.
1763
1764         * Fixed the KILLED notify handling in the client library.  The
1765           client must be removed from all channels when receiving the
1766           KILLED notify.
1767
1768           Also, do not remove the client entry when giving the KILL 
1769           command but when the KILLED notify is received.
1770
1771         * Removed silc_idlist_find_client_by_nickname from the server.
1772           Not needed anymore.  Affected files silcd/idlist.[ch].
1773
1774         * Implemented the CHANNEL_CHANGE notify type handling to the
1775           server.  Affected file silcd/server.c.
1776
1777         * Updated TODO.
1778
1779 Mon Mar 26 12:11:14 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1780
1781         * Added silc_server_send_notify_invite to send the INVITE
1782           notify between routers.
1783
1784         * Implemented the INVITE command correctly to the server.
1785
1786         * Implemented the INVITE notify type handling in the server.
1787
1788         * Implemented the INVITE command to the client library and on the
1789           user interface.
1790
1791 Sun Mar 25 20:27:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1792
1793         * Added function silc_server_get_client_resolve to find the
1794           client entry by ID from all ID lists and then resolve it
1795           (using WHOIS) if it cannot be found.  Affected file is
1796           silcd/server.[ch].
1797
1798 Sun Mar 25 13:52:51 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1799
1800         * Implemented the BAN command to the client library.
1801
1802         * The JOIN command in the server now checks the invite list
1803           and the ban list.
1804
1805         * Changed the silc_command_reply_payload_encode_va and the
1806           silc_command_payload_encode_va to support that if argument is
1807           NULL it ignores and checks the next argument.  Affected file
1808           lib/silccore/silccommand.c.
1809
1810         * Added silc_server_send_notify_ban to send the BAN notify
1811           type between routers.
1812
1813         * Chaned the silc_notify_payload_encode to support that if 
1814           argument is NULL it ignores and checks the next argument.
1815           Affected file lib/silccore/silcnotify.c.
1816
1817         * Tested ban lists in router environment successfully.
1818
1819 Sat Mar 24 14:47:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1820
1821         * Implemented BAN command to the server, in silcd/command.[ch].
1822
1823         * Removed the BAN and INVITE_LIST modes from the CMODE command
1824           in the server code.
1825
1826         * Added function silc_string_match to regex match two strings.
1827           Affected files lib/silcutil/silcutil.[ch].
1828
1829 Fri Mar 23 22:02:40 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1830
1831         * Redefined parts of the SilcChannelEntry in the server to support
1832           the new ban and invite lists.
1833
1834 Fri Mar 23 16:25:11 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1835
1836         * Redefined the INVITE command.  The same command can be used to
1837           invite individuals to the channel but also to manage the invite
1838           list of the channel (to add to and remove from the invite list).
1839           Updated the protocol specs.
1840
1841         * Added new command SILC_COMMAND_BAN that can be used to manage
1842           the ban list of the channel.  Updated the protocol specs.
1843
1844         * Removed the channel modes: the SILC_CMODE_BAN and the 
1845           SILC_CMODE_INVITE_LIST as they were a bit kludge to be included
1846           in the CMODE command.  The equivalent features are now available
1847           using INVITE and BAN commands.  Updated the protocol specs.
1848
1849         * Added new SILC_NOTIFY_TYPE_BAN notify type to notify routers
1850           in the network about change in the current ban list.  The notify
1851           type is not used by the client.
1852
1853         * Redefined parts of the SILC_NOTIFY_TYPE_INVITE command to 
1854           support the invite lists.
1855
1856 Thu Mar 22 22:52:23 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1857
1858         * Added new function silc_string_regexify that converts string
1859           including wildcard characters into regex string that can
1860           be used by the GNU regex library.  Added into the file
1861           lib/silcutil/silcutil.[ch].
1862
1863           Added silc_string_regex_combine to combine to regex strings
1864           into one so that they can be used as one regex string by
1865           the GNU regex library.  Added into the file
1866           lib/silcutil/silcutil.[ch].
1867
1868           Added silc_string_regex_match to match two strings.  It returns
1869           TRUE if the strings match.  Added into lib/silcutil/silcutil.[ch].
1870
1871 Thu Mar 22 15:29:42 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1872
1873         * Imported GNU regex to the soruce tree into lib/contrib.
1874           Fixed some compiler warning from the regex.c.
1875
1876 Wed Mar 21 15:27:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1877
1878         * Fixed MOTD command in the server to work in router environment.
1879
1880         * Fixed the MOTD command in the client library to support
1881           the server argument in the command.
1882
1883         * Added `nickname_len' argument to the silc_idlist_add_client
1884           in the server, as the `nickname' argument may be binary data
1885           (it may be hash).
1886
1887         * Added silc_idlist_get_channels to return all channels from
1888           the ID list.
1889
1890         * Implemented LIST command to the server.  Affected file is
1891           silcd/command.c.
1892
1893         * Implemented the LIST command to the client library and on the
1894           user interface.
1895
1896         * Added [<user count>] argument to the LIST command reply.
1897           With private channels the user count is not shown.
1898
1899         * Updated TODO and README.
1900
1901 Tue Mar 20 21:05:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1902
1903         * The client entry's data.registered must be TRUE even with
1904           global client entry on global client list.  The data.registered
1905           is used to check whether the client is anymore in the network,
1906           for example with WHOWAS command so it must be valid.
1907
1908         * Fixed the WHOWAS command in the server.  It now actually works
1909           in router environment.  Added function into silcd/command_reply.c
1910           silc_server_command_reply_whowas_save.
1911
1912         * Added silc_idlist_purge function to the silcd/idlist.c
1913           to periodically purge the ID Cache.
1914
1915         * Fixed INFO command in the server.  It works now in router
1916           environment.  Added <server name> argument to the INFO command
1917           reply.  Updated the protocol specs.
1918
1919         * Fixed minor bug in silc_idcache_purge to not purge if the
1920           expire value is zero.
1921
1922         * Fixed various bugs in WHOIS and IDENTIFY command handling as
1923           they were buggy because of the WHOWAS information.
1924
1925         * Fixed local command MSG to handle the async resolving of 
1926           the remote client properly.  It used to fail the first MSG.
1927           Affected file silc/local_command.c.
1928
1929         * Added `data_len' field to SilcIDCache context.
1930
1931 Tue Mar 20 16:29:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1932
1933         * Update TODO.  Todo in commands in the server.
1934
1935 Tue Mar 20 15:45:14 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1936
1937         * Added new notify type SILC_NOTIFY_TYPE_UMODE_CHANGE that is
1938           used by routers as broadcast packet to inform other routers
1939           about the changed user mode.
1940
1941           Implemented the notify handling in the server.  Affected file is
1942           silcd/packet_receive.c.  Added the function 
1943           silc_server_send_notify_umode to the silcd/packet_send.[ch].
1944
1945         * Added new generic Channel Payload and deprecated the New Channel
1946           Payload.  The New Channel Payload is now the generic Channel
1947           Payload.
1948
1949         * Added new argument `mode' to the silc_server_send_new_channel
1950           as it is required in the Channel Payload now.
1951
1952         * Renamed the SilcChannelPayload to SilcChannelMessagePayload
1953           and created a new and real SilChannelPayload to represent the
1954           new generic Channel Payload.  Implemented the encode/decode
1955           for Channel Payload.  Affected file lib/silccore/silcchannel.[ch].
1956
1957         * Added silc_server_get_client_channel_list to return the list
1958           of channels the client has joined for WHOIS command reply.
1959           Affected file silcd/server.[ch].
1960
1961         * Implemented the channel list sending in the WHOIS command reply
1962           in server and in the client.
1963
1964           Implemented the channel list displaying on the user interface
1965           as well.  Affected file silc/client_ops.c.
1966
1967         * Added silc_channel_payload_parse_list to parse list of Channel
1968           Payloads.  It returns SilcDList list of SilcChannelPayloads.
1969           Client for example can use this function to parse the list of
1970           channels it receives in the WHOIS command reply.  The caller
1971           must free the list by calling silc_channel_payload_list_free.
1972           Affected files lib/silccore/silcchannel.[ch].
1973
1974 Mon Mar 19 21:39:15 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1975
1976         * Added one new argument <user mode> to the WHOIS command reply
1977           to return the mode of the user in SILC.  Updated the protocol
1978           specs.
1979
1980           Implemented it to the server and client.
1981
1982 Mon Mar 19 18:43:06 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
1983
1984         * Fixed the mode printing on the user interface on joining.
1985           Affected file silc/client_ops.c.
1986
1987         * Implemented the UMODE command and user modes in general to the
1988           client library and to the user interface.
1989
1990         * Implemented the UMODE command to the server.
1991
1992         * The server now sends UNKNOWN_COMMAND error status if client sends
1993           unknown command.  Affected file silcd/command.c.
1994
1995         * All server commands now handle the command identifier the right
1996           way when sending the command reply to the client.  The client can
1997           use to identify the command replies with the identifier.
1998
1999 Mon Mar 19 16:13:07 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2000
2001         * Added silc_server_get_client_route to resolve the route to
2002           the client indicated by the client ID.  Affected file is
2003           silcd/server.[ch].
2004
2005         * Added silc_server_relay_packet as general function to relay
2006           packet to arbitrary destination.  This deprecates functions
2007           like _send_private_message_key, _relay_notify etc.  Affected
2008           file is silcd/packet_send.[ch].
2009
2010           Removed silc_server_send_key_agreement, 
2011           silc_server_send_private_message_key and
2012           silc_server_packet_relay_notify functions from the file
2013           silcd/packet_send.[ch].
2014
2015         * Updated TODO.
2016
2017         * Implemented the SILC_NOTIFY_TYPE_KILLED notify handling in the
2018           server.  Affected file silcd/packet_receive.[ch].
2019
2020         * Implemented the KILL command to the client.  Implemented the
2021           SILC_NOTIFY_TYPE_KILLED notify handling in the client library.
2022           Affected files lib/silcclient/command[_reply].c and
2023           lib/silcclient/client_notify.c.  Implemented the KILL notify
2024           printing in the user inteface.
2025
2026         * Fixed a lot silc_parse_nick memory leaks from the client
2027           library in the file lib/silcclient/command.c.
2028
2029         * Changed the silc_server_send_notify_on_channels's `sender'
2030           argument from SilcSocketConnection to SilcClientEntry to 
2031           check the sender as entry and not as connection object and not
2032           to send to the client provided as argument.  The affected file
2033           is silcd/packet_send.[ch].
2034
2035         * The notify packets that are destined directly to the client used
2036           to not to be processed by the server.  Now changed that and the
2037           server processes all notify packets.  After relaying the packet
2038           to the client the notify packet is processed in the server.
2039
2040         * The silc_server_free_client_data now checks whether there is
2041           pending outgoing traffic for the client and purges the data to
2042           the network before removing the client entry.
2043
2044 Sun Mar 18 21:02:47 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2045
2046         * Added SILC_NOTIFY_TYPE_KILLED notify type.  It is sent when
2047           an client is killed from the SILC Network.  Updated the protocol
2048           specs accordingly.
2049
2050           Added new function silc_server_send_notify_killed to the
2051           silcd/packet_send.[ch].
2052
2053         * Added function silc_server_packet_relay_notify to relay notify
2054           packets that are destined directly to a client.  In this case
2055           the server does not process the notify packets but merely relays
2056           it to the client.  Affected file silcd/packet_send.[ch].
2057
2058           Added also silc_server_packet_process_relay_notify to check
2059           whereto relay the notify.  Affected file is 
2060           silcd/packet_receive.[ch].
2061
2062         * Implemented the KILL command to the server.
2063
2064         * Updated TODO.
2065
2066         * Added the backup schema desgined last fall to the protocol
2067           specs for everyone to see.  The specification is in the
2068           *-spec-xx.txt draft and the packet type definitions for the
2069           backup routers is in *-pp-xx.txt draft.  Thusly, added also
2070           new packet type SILC_PACKET_CELL_ROUTERS.
2071
2072         * A big security problem in the implementation discovered.  The
2073           signoff of an client did not cause new channel key generation
2074           which it of course should've done.  The channel keys must be
2075           always re-generated when client leaves (or signoffs) the channel.
2076           The silc_server_remove_from_channels funtion now handles
2077           the channel key re-generation.
2078
2079         * Added `sender' argument to the silc_server_send_notify_on_channels
2080           to not to send the client provided as argument.  Affected file
2081           silcd/packet_send.[ch].
2082
2083 Fri Mar 16 15:52:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2084
2085         * Implemented OPER and SILCOPER commands into the server and
2086           the client library.
2087
2088         * Added silc_auth_verify and silc_auth_verify_data to verify
2089           the authentication directly from the authentication payload.
2090           It supports verifying both passphrase and public key based
2091           authentication.  Affected file lib/silccore/silcauth.[ch].
2092
2093         * Added `hash' field to the SilcIDListData structure.  It is the
2094           hash negotiated in the SKE protocol.  Affected file is
2095           silcd/idlist.[ch].
2096
2097         * Slight redesigning of the SilcAuthPayload handling routines.
2098           Do not send SilcPKCS but SilcPublicKey as argument.
2099
2100         * Implemented the public key authentication support to the
2101           serverconfig.  The public key is loaded from the provided path
2102           and saved as authentication data to void * pointer.  Thus,
2103           changed the unsigned char *auth_data to void *auth_data;
2104
2105         * Fixed SHUTDOWN command to send the reply before the server
2106           is shutdown. :)  Affected file silcd/command.c.
2107
2108         * Fixed fatal bug in CONNECT command.  The hostname was invalid
2109           memory and server crashed.  Affected file silcd/command.c.
2110
2111         * Fixed fatal bug in CLOSE command.  The server_entry became
2112           invalid but was referenced later in the command.  Affected file
2113           silcd/command.c.
2114
2115 Thu Mar 15 12:46:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2116
2117         * Fixed fatal bug in failure packet handling.  Server ignored
2118           the failure and thus crashed when it came.
2119
2120         * Updated TODO.
2121
2122 Wed Mar 14 20:37:35 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2123
2124         * Added new SILC_CF_LAG_STRICT command flag that strictly forces
2125           that the command may be executed only once in (about) 2 seconds.
2126           The old SILC_CF_LAG flag is same but allows command bursts up
2127           to five before limiting.
2128
2129           Added the support for CF_LAG and CF_LAG_STRICT flags to the
2130           server code.  Various commands now includes the CF_LAG_STRICT
2131           flag to disallow any kind of miss-use of the command.
2132
2133         * Fixed the silc_buffer_unformat to not to allocate any data
2134           if the length of the data is zero.  It used to allocate the
2135           length + 1.  Affected file lib/silcutil/silcbuffmt.c.
2136
2137 Wed Mar 14 16:10:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2138
2139         * Changed the format of AdminConnection configuration section
2140           in the server.  Added username of the admin to the format.
2141           Affected files silcd/serverconfig.[ch].
2142
2143           Added silc_server_config_find_admin into silcd/serverconfig.[ch]
2144           to return admin configuration data by host, username and/or
2145           nickname.
2146
2147 Wed Mar 14 13:18:16 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2148
2149         * Implemented WHOWAS command to the server.  Added the functions:
2150
2151           silc_server_command_whowas_parse,
2152           silc_server_command_whowas_send_reply,
2153           silc_server_command_whowas_from_client and
2154           silc_server_command_whowas_from_server
2155
2156         * Added <Client ID> argument to the WHOWAS command reply.  Updated
2157           the protocol specs accordingly.
2158
2159         * Implemented WHOWAS command and command_reply to the client
2160           library.
2161
2162           Implemented the WHOWAS printing on the user interface.
2163
2164 Tue Mar 13 22:17:34 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2165
2166         * Added new argument to the WHOWAS command reply, the real name.
2167           It is an optional argument.  Updated the protocol specs.
2168
2169         * Added SilcIDCacheDestructor callback that is registered when
2170           the SilcIDCache is allocated.  The callback is called when
2171           an cache entry in the ID Cache expires, or is purged from the
2172           cache.  Added into lib/silccore/idcache.[ch].
2173
2174           Added silc_idlist_client_destructor to the silcd/idlist.[ch]
2175           to destruct the client entries when the cache entry expires.
2176           Other ID Cache's in server and in the client library ignores
2177           the destructor.
2178
2179         * If the ID Cache entry's `expire' field is zero then the entry
2180           never expires.  Added boolean `expire' argument to the
2181           silc_idcache_add function in the lib/silccore/idcache.[ch].
2182           If it is TRUE the default expiry value is used.
2183
2184         * Added silc_server_free_client_data_timeout that is registered
2185           when client disconnects.  By default for 5 minutes we preserve
2186           the client entry for history - for WHOWAS command.
2187
2188 Tue Mar 13 13:26:18 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2189
2190         * Added support to the server to enforce that commands are not
2191           executed more than once in 2 seconds.  If server receives 
2192           commands from client more frequently, timeout is registered
2193           to process the commands.  Affected file silcd/command.c.
2194           Added new function silc_server_command_process_timeout.
2195
2196         * Changed NICK_NOTIFY handling in client library to check that
2197           if the client's nickname was changed, so there is no need to
2198           resolve anything from the server.
2199
2200         * Removed error printing from the WHOIS and IDENTIFY commands.
2201           If error occurs then it is ignored silently in the client library.
2202           The application, however, may map the received error to 
2203           human readable error string.  The application currently maps
2204           the NO_SUCH_NICKNAME error to string.
2205
2206         * Made the command status message public to the application.  Moved
2207           them from lib/silcclient/command_reply.c to 
2208           lib/silcclient/command_reply.h.  The application can map the
2209           received command status to the string with the
2210           silc_client_command_status_message function.
2211
2212         * Added check to the server to check that client's ID is same
2213           as the Source ID in the packet the client sent.  They must
2214           match.
2215
2216 Tue Mar 13 12:49:21 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2217
2218         * Added dist-bzip hook to the Makefile.am to make bzip2
2219           compressed distributions.
2220
2221 Mon Mar 12 18:43:38 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2222
2223         * Server now enforces the maximum length for the nickname and
2224           the channel as protocol specification dictates.  128 bytes for
2225           nickname and 256 bytes for channel name.
2226
2227         * Moved the WHOIS printing to the application.  The client libary
2228           does not print out the WHOIS information anymore, the application
2229           must do it.  Renamed silc_client_command_reply_whois_print to
2230           the silc_client_command_reply_whois_save.
2231
2232           The client's idle time is also sent to the application now, and
2233           the idle is shown on screen.
2234
2235         * Added silc_client_command_reply_identify_save to save the
2236           received IDENTIFY entries.
2237
2238         * Do not check for channel private keys in message sending and
2239           reception if the channel does not have the PRIVKEY mode set.
2240           Affected file lib/silclient/client_channel.c.
2241
2242 Sun Mar 11 20:25:06 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2243
2244         * Fixed a minor bug if WHOIS and IDENTIFY command parsing that
2245           just surfaced after chaning the JOIN procedure.
2246
2247 Sun Mar 11 14:59:05 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2248
2249         * Added silc_client_get_clients_by_list to get client entries
2250           from Client ID list, that is returned for example by JOIN
2251           and USERS command replies.  The application should use this
2252           function for example when JOIN command reply is received to
2253           resolve the clients already on the channel (library does not
2254           do that anymore as USERS command reply is not used in the JOIN
2255           procedure anymore).  Affected files lib/silcclient/silcapi.h and
2256           lib/silcclient/idlist.c.
2257
2258         * JOIN command reply and USERS command reply returns now SilcBuffer
2259           pointers instead of unsigned char pointers when returning
2260           the client list and mode list.
2261
2262         * Added <Client ID> argument to the JOIN command reply, mainly
2263           for the server to identify for which client the command was
2264           originally sent.  Updated protocol specs accordingly.
2265
2266         * Added SilcDlist private_key pointer to the SilcChannelEntry
2267           in the client to support the channel private keys.  Affected
2268           file is lib/silcclient/idlist.h.
2269
2270         * Added SilcChannelPrivateKey argument to the function
2271           silc_client_send_channel_message so that application can choose
2272           to use specific private ke if it wants to.  If it is not provided,
2273           the normal channel key is used, unless private keys are set. 
2274           In this case the first (key that was added first) is used 
2275           as the encryption key.
2276
2277         * Implemented the support for channel private key handling.
2278           Implemented the following functions:
2279
2280           silc_client_add_channel_private_key,
2281           silc_client_del_channel_private_keys,
2282           silc_client_del_channel_private_key,
2283           silc_client_list_channel_private_keys and
2284           silc_client_free_channel_private_keys
2285
2286           Affected file lib/silcclient/client_channel.c.
2287
2288         * Added the support for the private keys in the channel message
2289           sending and encryption and in the message reception and
2290           decryption.  Affected funtions are
2291           silc_client_send_channel_message and silc_client_channel_message.
2292
2293 Sat Mar 10 21:36:22 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2294
2295         * Added SKE's key verify callback to the client library's
2296           KE protocol context. Affected files lib/silcclient/protocol.[ch].
2297
2298         * Removed the statement that server (or router) must send USERS
2299           command reply when joining to the channel so that the client
2300           knows who are on the channel.  Instead, the client list and 
2301           client's mode list is now sent in the JOIN command reply to the
2302           client who joined channel.  This is better solution.
2303
2304         * Added function silc_server_get_users_on_channel and function
2305           silc_server_save_users_on_channel to the silcd/server.[ch].
2306
2307         * Removed function silc_server_command_send_users from the
2308           silcd/command.c.
2309
2310         * Do not show topic on the client library anymore.  The topic is
2311           sent in the command reply notify to the application and the
2312           application must show the topic now.
2313
2314 Sat Mar 10 00:07:37 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2315
2316         * Added client searching by nickname hash into the IDENTIFY and
2317           WHOIS commands in the server as they were clearly missing from
2318           them.  Affected file is silcd/command.c.
2319
2320         * Fixed a bug in private message receiving in the client library.
2321           The remote ID was freed and it wasn't supposed, now it is
2322           duplicated.
2323
2324 Fri Mar  9 12:40:42 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2325
2326         * Minor fix to the channel payload; allocate the data area, as it
2327           needs to be of specific length.
2328
2329         * If the key agreement port is zero then the operating
2330           system will define the bound port.  Affected files are
2331           lib/silcclient/silcapi.h and lib/silcclient/client_keyagr.c.
2332
2333         * Added new function silc_channel_payload_decrypt into the file
2334           lib/silccore/silcchannel.[ch].
2335
2336         * Moved the channel message etc, check from silc_packet_decrypt
2337           to applications.  The library calls now a generic 
2338           SilcPacketCheckDecrypt callback which is to return TRUE or FALSE
2339           when the packet is either normal or special.  This was done to
2340           allow more wide range of checking that was not allowed when
2341           the code was in library.  Now applications can do virtually any
2342           checks to the packet and return to the library the decision how
2343           the packet should be processed.  Affected files are
2344           lib/silccore/silcpacket.[ch].
2345
2346           Added silc_server_packet_decrypt_check to the server and
2347           silc_client_packet_decrypt_check to the client library.
2348
2349         * Added silc_server_packet_send_srcdest into silcd/packet_send.[ch]
2350           to send with specified source and destination information.
2351
2352         * Channel message delivery between routers was broken after the
2353           channel key distribution was fixed earlier.  The channel key
2354           was used be to distributed to other routers as well which is not
2355           allowed by the protocol.  Now this is fixed and channel keys
2356           really are cell specific and the channel message delivery between
2357           routers comply with the protocol specification.
2358
2359         * Fixed various commands in server to check also the global list
2360           for the channel entry and not just the local list.  The affected
2361           file silcd/command.c.
2362
2363 Thu Mar  8 21:39:03 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2364
2365         * Added assert()s to buffer formatting and unformatting routines
2366           to assert (if --enable-debug) when error occurs.  Affected
2367           file: lib/silcutil/silcbuffmt.c.
2368
2369         * Changed to auto-reconnect to check whether the remote host is
2370           router and register the re-connect timeout if it is.  It used 
2371           to check that whether we are normal server, but router must do
2372           auto-reconnect with another router as well.  Affected file
2373           silcd/server.c.
2374
2375         * Removed the [<key len>] option from CMODE command as the cipher
2376           name decides the key length, nowadays.  See the defined ciphers
2377           from the protocol specification.
2378
2379         * Added [<hmac>] option to the CMODE command to define the HMAC
2380           for the channel.  Added SILC_CMODE_HMAC channel mode.
2381
2382         * Added [<hmac>] option for the JOIN command so that user can
2383           select which HMAC is used to compute the MACs of the channel
2384           messages.
2385
2386         * Added Hmac field to the Channel Message Payload.  The integrity
2387           of plaintext channel messages are now protected by computing
2388           MAC of the message and attaching the MAC to the payload.  The
2389           MAC is encrypted.  Now, it is clear that this causes some
2390           overhead to the size of the packet but rationale for this is that
2391           now the receiver can verify whether the channel message decrypted
2392           correctly and also when private keys are set for the channel the
2393           receiver can decrypt the packet with several keys and check from
2394           the MAC which key decrypted the message correctly.
2395
2396         * Added silc_cipher_encrypt and silc_cipher_decrypt into the
2397           lib/silccrypt/silccipher.[ch].
2398
2399         * Added silc_hash_len to return the digest length into the
2400           lib/silcrypt/silchash.[ch].
2401
2402         * Rewrote parts of Silc Channel Payload interface in the
2403           lib/silccore/silcchannel.[ch].  The encode function now also
2404           encrypts the packet and parse function decrypts it.
2405
2406 Wed Mar  7 20:58:50 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2407
2408         * Fixed a minor formatting bug in the SKE's key material processing.
2409           It actually might have processed the keys wrong way resulting
2410           into wrong keys.
2411
2412         * Redefined the mandatory HMAC algorithms and added new algorithms.
2413           Added hmac-sha1-96 and hmac-md5-96 which are normal hmac-sha1
2414           and hmac-md5 truncated to 96 bits.  The mandatory is now 
2415           hmac-sha1-96.  Rest are optional (including the one that used
2416           to be mandatory).  Rationale for this is that the truncated HMAC
2417           length is sufficient from security point of view and can actually
2418           make the attack against the HMAC harder.  Also, the truncated
2419           HMAC causes less overhead to the packets.  See the RFC2104 for
2420           more information.
2421
2422         * Added new [hmac] configuration section.  The SKE used to use
2423           the hash names (md5 and sha1) in the SKE proposal as HMCAS which
2424           is of course wrong.  The official names that must be proposed in
2425           the SKE are the ones defined in the protocol specification
2426           (hmac-sha1-96 for example).  The user can configure any hmac
2427           using any hash function configured in the [hash] section.  At
2428           least, the mandatory must be configured.
2429
2430           Rewrote the HMAC interface in lib/silccrypt/silchmac.[ch].
2431
2432         * Added HMAC list to the SKE proposal list.  It has now both
2433           hash algorithm list and HMAC list.  This makes the protocol
2434           incompatible with previous versions.  The SKE now seems to work
2435           the way it is supposed to work, for the first time actually.
2436
2437         * Defined plain Hash algorithms to the protocol specification.
2438           Added sha1 and md5.
2439
2440 Tue Mar  6 15:36:11 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2441
2442         * Implemented support for key agreement packets into the server.
2443           Added functions silc_server_key_agreement and
2444           silc_server_send_key_agreement.  Other than these functions,
2445           server has nothing to do with this packet.
2446
2447         * Added support for private message key packets into the server.
2448           Added functions silc_server_private_message_key and
2449           silc_server_send_private_message_key.
2450
2451         * Updated TODO.
2452
2453         * Changed the silc_[client|server]_protocol_ke_set_keys to be
2454           called in the protocol's final callback instead in the END
2455           protocol state.  This makes a little more sense and in the same
2456           time in client we can use the same protocol routines for normal
2457           key exchange and to key agreement packet handling as well.
2458
2459         * Added to both client's and server's KE protocol context the
2460           SilcSKEKeyMaterial pointer to save the key material.  We will
2461           bring the key material to the protocol's final callback by doing
2462           this.  The final callback must free the key material.
2463
2464         * Added SKE's packet_send callback into client's KE protocol
2465           context so that the caller can choose what packet sending function
2466           is used.  This way we can use different packet sending when
2467           doing normal SKE when doing key agreement packet handling (in
2468           the key agreement packet handling we do not want to encrypt
2469           the packets).
2470
2471         * Implemented the responder side of the key agreement routines
2472           in the client.  The client can now bind to specified port and
2473           accept incoming key negotiation.  The key material is passed
2474           to the application after the protocol is over.
2475
2476         * Implemented the processing of incoming Key Agreement packet
2477           in the client.  Added function silc_client_key_agreement to
2478           process the packet.
2479
2480         * Implemented the intiator side of the key agreement routines
2481           in the client.  The client can now initiate key agreement with
2482           another remote client.  The key material is passed to the
2483           application after the protocol is over.
2484
2485         * Created client_keyagr.c to include all the key agreement 
2486           routines.
2487
2488         * Added macro SILC_TASK_CALLBACK_GLOBAL which is equal to the
2489           SILC_TASK_CALLBACK except that it is not static.
2490
2491         * Created client_notify.c and moved the Notify packet handling
2492           from the client.[ch] into that file.
2493
2494         * Created client_prvmsg.c and moved all private message and
2495           private message key routines from the client.[ch] into that file.
2496
2497         * Create client_channel.c and moved all channel message and
2498           channel private key routines from the client.[ch] into that file.
2499
2500         * Changed silc_client_get_client_by_id_resolve to resolve with
2501           WHOIS command instead of IDENTIFY command, in the file
2502           lib/silclient/idlist.c.
2503
2504 Mon Mar  5 18:39:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2505
2506         * Implemented the SKE's responder side to the Client library.
2507
2508         * When FAILURE is received to the protocol do not trust it
2509           blindly.  Register a timeout to wait whether the remote closes
2510           the connection as it should do it, only after that process the
2511           actual failure.  This was changed to both client and server.
2512
2513         * Added client_internal.h to include some of the structures
2514           there instead of client.h in lib/silcclient/.
2515
2516         * Added function silc_task_unregister_by_callback to unregister
2517           timeouts by the callback function.
2518
2519 Sat Mar  3 19:15:43 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2520
2521         * Some "Incomplete WHOIS info" errors has been appearing on the
2522           log files.  Took away the entry->userinfo check from WHOIS
2523           reply sending.  The entry->userinfo is now " " if client did not
2524           provide one.  I thought this was fixed earlier but something
2525           is wrong still.  Let's see if the error still appears.
2526
2527 Wed Feb 28 20:56:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2528
2529         * Fixed a minor bug in the login when the channel key is
2530           re-generated in the server.  It used to generate the key in
2531           wrong order and thus caused problems in the channel traffic.
2532
2533         * Fixed a minor bug in channel key distsribution after
2534           KICK command.  The key was not sent to the router even though
2535           it should've been.
2536
2537 Tue Feb 27 20:24:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2538
2539         * Added silc_ske_process_key_material_data as generic routine
2540           to process any key material as the SILC protocol dictates.  The
2541           function is used by the actual SKE library but can be used by
2542           applications as well.  This relates to the private message keys
2543           and the channel private keys since they must be processed the
2544           same way the normal SILC session keys.  The protocol dictates
2545           this.  Affected files: lib/silcske/silcske.[ch].
2546
2547           Added also silc_ske_free_key_material to free the
2548           SilcSKEKeyMaterial structure.
2549
2550         * Defined silc_cipher_set_key function to set the key for
2551           cipher without using the object's method function.  The affected
2552           files: lib/silccrypt/silccipher.[ch].
2553
2554         * Implemented silc silc_client_add_private_message_key,
2555           silc_client_add_private_message_key_ske, 
2556           silc_client_del_private_message_key,
2557           silc_client_list_private_message_keys and
2558           silc_client_free_private_message_keys functions in the
2559           client library.
2560
2561           Added functions silc_client_send_private_message_key to send
2562           the Private Message Key payload and silc_client_private_message_key
2563           to handle incoming Private Message Key payload.
2564
2565         * Added Cipher field to the Private Message Key payload to set
2566           the cipher to be used.  If ignored, the default cipher defined
2567           in the SILC protocol (aes-256-cbc) is used.
2568
2569 Tue Feb 27 13:30:52 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2570
2571         * Removed lib/silcclient/ops.h file.
2572
2573           Redefined parts of the SILC Client Library API. Created new
2574           file silcapi.h that deprecates the ops.h file and defines the
2575           published Client Library API.  Defined also private message key
2576           API and channel private key API into the file.
2577
2578           This is the file that the application must include from the
2579           SILC Client Library.  Other files need not be included by
2580           the application anymore.
2581
2582         * Added new key_agreement client operation callback and also
2583           defined the Key Agreement library API for the application.
2584
2585 Tue Feb 27 11:28:31 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2586
2587         * Added new packet type: SILC_PACKET_KEY_AGREEMENT.  This packet
2588           is used by clients to request key negotiation  between another
2589           client in the SILC network.  If the negotiation is started it
2590           is performed using the SKE protocol.  The result of the
2591           negotiation, the secret key material, can be used for example
2592           as private message key.
2593
2594           Implemented the Key Agreement payload into the files
2595           lib/silccore/silauth.[ch].
2596
2597 Mon Feb 26 12:13:58 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2598
2599         * Redefined ciphers for the SILC protocol.  Added some new ciphers
2600           and defined the key lengths for the algorithms.  Changed the
2601           code accordingly.  The default key length is now 256 bits.
2602
2603         * Fixed SKE key distribution function silc_ske_process_key_material
2604           when the key length is more than 128 bits.  The default key 
2605           length in SILC is now 256 bits.
2606
2607         * Added new command status type: SILC_STATUS_ERR_UNKOWN_ALGORITHM
2608           to indicate unsupported algorithm.
2609
2610         * Renamed rijndael.c to aes.c and all functions as well.
2611
2612         * Fixed a long standing channel key setting bug in client library.
2613           Weird that it has never surfaced before.
2614
2615         * Fixed bug in channel deletion.  If the entire channel is removed
2616           then it must also delete the references of the channel entry
2617           from the client's channel list as the client's channel entry and
2618           the channel's client entry share same memory.
2619
2620 Sun Feb 25 20:47:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2621
2622         * Implemented CONNECT and SHUTDOWN commands in the client.
2623
2624         * Implemented CLOSE command to the client.
2625
2626         * Added the function silc_idlist_find_server_by_name into the
2627           files silcd/idlist.[ch].
2628
2629           Added the function silc_idlist_find_server_by_conn into the
2630           files silcd/idlist.[ch].
2631
2632 Sat Feb 24 23:45:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2633
2634         * DIE command was renamed to SHUTDOWN.  Updated the both code
2635           and protocol specs.
2636
2637         * Defined SILC_UMODE_NONE, SILC_UMODE_SERVER_OPERATOR and
2638           SILC_UMODE_ROUTER_OPERATOR modes into lib/silccore/silcmode.h.
2639
2640         * Implemented CONNECT, CLOSE and SHUTDOWN commands to the server
2641           side.
2642
2643         * Added function silc_server_create_connection function to create
2644           connection to remote router.  My server implementation actually
2645           does not allow router to connect to normal server (it expects
2646           that normal server always initiates the connection to the router)
2647           so the CONNECT command is only good for connecting to another
2648           router.
2649
2650 Sat Feb 24 16:03:45 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2651
2652         * Added SILC_NOTIFY_TYPE_KICKED to indicate that the client
2653           or some other client was kicked from the channel.
2654
2655           Implemented the handling of the notify type to both client
2656           and server.
2657
2658           Implemented silc_server_send_notify_kicked to send the KICKED
2659           notify.  It is used to send it to the server's primary router.
2660
2661         * Implemented the KICK command into server and client.
2662
2663         * Added `query' argument to the silc_idlist_get_client function
2664           to indicate whether to query the client from server or not if
2665           it was not found.
2666
2667         * Added new command status type SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
2668           to indicate that the client is not channel founder.
2669
2670         * Updated TODO.
2671
2672 Sat Feb 24 00:00:55 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2673
2674         * Removed the rng context from SilcPacketContext structure and
2675           changed that the packet routine uses the Global RNG API.
2676
2677 Fri Feb 23 11:22:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2678
2679         * Added support for quit message that client can "leave" on the
2680           channel when it quits the SILC.  It is ditributed inside the
2681           SILC_NOTIFY_TYPE_SIGNOFF notify type.
2682
2683           Added silc_server_free_client_data that will take the
2684           signoff message as argument.
2685
2686         * Changed SKE routines to use the silc_pkcs_sign/verify routines.
2687
2688 Thu Feb 22 23:05:36 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2689
2690         * Updated parts of the protocol specification to keep it up
2691           to date.
2692
2693 Thu Feb 22 15:08:20 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2694
2695         * Added List flag (SILC_PACKET_FLAG_LIST) to indicate list of
2696           payloads in one packet.
2697
2698         * Deprecated following packet types: NEW_ID_LIST, NEW_CHANNEL_LIST,
2699           NEW_CHANNEL_USER_LIST, SET_MODE and SET_MODE_LIST.  List packets
2700           use now the new List flag.
2701
2702         * Also deprecated the following packet types: REPLACE_ID,
2703           NEW_CHANNEL_USER and REMOVE_CHANNEL_USER packet types.
2704          
2705         * Added list support for Notify packet in server.
2706
2707         * Added silc_server_send_notify_channel_change to send the
2708           CHANNEL_CHANGE notify type to replace channel ID's.  Deprecates
2709           the silc_server_send_replace_id.
2710
2711         * Added silc_server_send_notify_nick_change to send the
2712           NICK_CHANGE notify type.  Deprecates the function
2713           silc_server_send_replace_id.
2714
2715         * Added silc_server_send_notify_join to send the JOIN notify type.
2716           Deprecates the function silc_server_send_new_channel_user.
2717
2718         * Added silc_server_send_notify_leave to send LEAVE notify type.
2719           Deprecates the function silc_server_send_remove_channel_user.
2720
2721         * Added silc_server_send_notify_cmode and 
2722           silc_server_send_notify_cumode to send CMODE and CUMODE notify
2723           types.  Deprecates the silc_server_send_set_mode function.
2724
2725         * Added SERVER_SIGNOFF notify type to indicate that server has
2726           quit.  This means that all clients on the channel from that 
2727           server will drop.  This can be also used when netsplit happens.
2728
2729           Deprecated REMOVE_ID packet type since it is not needed anymore
2730           even from server.
2731
2732           Added silc_server_send_notify_server_signoff to send the
2733           SERVER_SIGNOFF notify type.  Deprecates the function
2734           silc_server_send_remove_id.
2735
2736           Added also silc_server_send_notify_signoff to send the
2737           SIGNOFF notify type.
2738
2739         * Employed the PKCS #1. It is the mandatory way to do RSA in the
2740           SILC protocol from this day on.  Changed the protocol 
2741           specification as well.
2742
2743         * Added silc_server_send_notify_topic_set to send TOPIC_SET
2744           notify type.  It is used between routers to notify about
2745           topic changes on a channel.
2746
2747         * Added silc_id_dup into lib/silccore/id.[ch] to duplicate
2748           ID data.
2749
2750         * Partly updated the protocol specification to comply with the
2751           changes now made.  It is still though a bit outdated.
2752
2753         * The JOIN notify type now takes one extra argument <Channel ID>.
2754           The packet used to be destined to the channel but now the
2755           JOIN type may be sent as list thus it is impossible to 
2756           destine it to any specific channel.  By adding this argument
2757           it is again possible.
2758
2759 Wed Feb 21 22:39:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2760
2761         * Added CREDITS file.  The CHANGES and CREDITS file will appear
2762           in the distribution as well.
2763
2764 Wed Feb 21 14:17:04 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2765
2766         * Implemented CMODE_CHANGE, CUMODE_CHANGE and TOPIC_SET notify
2767           types in the server's silcd/packet_receive.c.
2768
2769         * Implemented CMODE and CUMODE to work in router environment.
2770
2771         * Fixed minor encoding and decoding buglet from the
2772           lib/silccore/silcmode.c.
2773
2774         * Fixed buffer overflow from lib/silcclient/command.c in USERS
2775           command parsing.
2776
2777 Wed Feb 21 12:44:00 EET 2001  Mika Boström <bostik@lut.fi>
2778
2779         * Changed all SilcConfigServer* and silc_config_server* to
2780           SilcServerConfig* and silc_server_config*, respectively.
2781           Patch by Bostik.
2782
2783 Wed Feb 21 00:10:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2784
2785         * Associated the ID (client or server ID) to the Authentication
2786           Payload to avoid any possibility of forging.  Updated the
2787           protocol specification and the code accordingly.
2788
2789 Tue Feb 20 14:14:14 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2790
2791         * The RSA key length is now save to the RsaKey context in the
2792           key generation process in lib/silccrypt/rsa.c.  The key length
2793           is now used to figure out the maximum size of the block allowed
2794           to be encrypted/signed.
2795
2796         * Added silc_mp_mp2bin_noalloc into lib/silcmath/mpbin.[ch].  It
2797           is equivalent to the silc_mp_mp2bin but does not allocate any
2798           memory.
2799
2800         * Changed silc_mp_mp2bin API to take length argument.  If it is
2801           non-zero then the buffer is allocated that large.  If zero, then
2802           the size is approximated using silc_mp_sizeinbase, which however
2803           is not relieable.
2804
2805         * Created Global RNG API which is global RNG that application can
2806           initialize.  After initializing, any routine anywhere in the
2807           code (including library) can use RNG without allocating a new
2808           RNG object.  This was done to allow this sort of use of the 
2809           RNG in code that has no chance to allocate RNG object.  All
2810           applications currently allocate this and many routines in the
2811           library use this.  Affected file lib/silccrypt/silcrng.[ch].
2812
2813         * Removed the RNG kludge from lib/silcmath/primegen.c and changed
2814           it to use the Global RNG API.
2815
2816         * Defined Authentication Payload into protocol specification that
2817           is used during SILC session to authenticate entities.  It is
2818           used for example by client to authenticate itself to the server
2819           to obtain server operator privileges.
2820
2821           Implemented this payload into the lib/silccore/silcauth.[ch].
2822           Implemented also routines for public key based authentication
2823           as the new protocol specification dictates.
2824
2825           Moved definitions of different authentication methods from
2826           lib/silccore/silcprotocol.h into lib/silccore/silcauth.h.
2827
2828         * Added silc_pkcs_encrypt, silc_pkcs_decrypt, silc_pkcs_sign,
2829           silc_pkcs_verify and silc_pkcs_sign_with_hash and
2830           silc_pkcs_verify_with_hash functions into the file 
2831           lib/silccrypt/silcpkcs.[ch].
2832
2833 Mon Feb 19 19:59:28 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2834
2835         * The client entry's userinfo pointer must be always valid. 
2836           Otherwise the [<unknown>] bug will surface beacuse the WHOIS
2837           will fail since it requires the userinfo.  Now, the userinfo
2838           is allocated as "" if actual userinfo does not exist.  Actually,
2839           it must exist and it is totally Ok to drop client connections
2840           that does not announce the userinfo.  However, we will make
2841           this workaround for now.
2842
2843         * Added silc_net_get_remote_port into lib/silcutil/silcnet.[ch]
2844           to return the remote port by socket.
2845
2846 Mon Feb 19 14:26:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2847
2848         * Changed SILC_SERVER_COMMAND_EXEC_PENDING macro to the name
2849           SILC_SERVER_PENDING_EXEC and added an new macro
2850           SILC_SERVER_PENDING_DESTRUCTOR which is called to free the
2851           data or when error occurs while processing the pending command.
2852
2853           Added new argument `destructor' into silc_server_command_pending
2854           and to the SilcServerCommandPending object.  This destructor is
2855           now called after calling the pending callback or if error occurs
2856           immediately.  If error occurs the actual pending callback won't
2857           be called at all - only the destructor.  The destructor may be
2858           NULL if destructor is not needed.
2859
2860           All this applies for client library code as well.  Similar
2861           changes were made there as well for the pending commands.
2862
2863           In the client, the application must now allocate the 
2864           SilcClientCommandContext with the silc_client_command_alloc
2865           function.
2866
2867         * Added reference counter to the SilcServerCommandContext.  Added
2868           function silc_server_command_alloc and silc_server_command_dup 
2869           functions.
2870
2871           Same type of functions added to the client library for the same
2872           purpose as well.
2873
2874         * Removed the cmd_ident from IDListData away since it is now 
2875           global for all connections.  It is the command identifier used
2876           in command sending and with pending commands.  The affected file
2877           is silcd/idlist.h.
2878
2879         * Added reference counter to the SilcSocketConnection objecet to
2880           indicate the usage count of the object.  The object won't be
2881           freed untill the reference counter hits zero.  Currently only
2882           server uses this, and client ignores it.  The client must be
2883           set to use this too later.  The affected files are
2884           lib/silccore/silcsockconn.[ch].  Added also the function
2885           silc_socket_dup to increase the reference counter.
2886
2887           This was mainly added because it is possible that the socket
2888           is removed underneath of pending command or other async
2889           operation.  Now it won't be free'd and proper DISCONNECTING
2890           flags, etc. can be set to avoid sending data to connection that
2891           is not valid anymore.
2892
2893         * Added SILC_SET_DISCONNECTING to server.c when EOF is read from
2894           the connection.  After that it sets SILC_SET_DISCONNECTED.
2895           It is, however, possible that the socket data is not still freed.
2896           The silc_server_packet_process now checks that data is not
2897           read or written to connection that is DISCONNECTED.  The socket
2898           get's freed when the reference counter hits zero.
2899
2900 Mon Feb 19 00:50:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2901
2902         * Changed the client operation API: channel_message operation's
2903           `sender' is now the client entry of the sender, not the nickname
2904           and the `channel' is the channel entry, not the channel name.
2905
2906           In the private_message operation the `sender' is now also the
2907           client entry of the sender not the nickname.
2908
2909           Affected file is lib/silcclient/ops.h and all applications
2910           using the client operations.
2911
2912 Sat Feb 17 22:11:50 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2913
2914         * Moved the calling of ops->connect() from connect_to_server_final
2915           into receive_new_id functin since that is the point when the
2916           client is actually allowed to send traffic to network.  The
2917           affected file is lib/silcclient/client.c.
2918
2919 Sat Feb 17 13:15:35 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2920
2921         * When receiving NEW_CHANNEL_LIST, NEW_CHANNEL_USER_LIST,
2922           NEW_ID_LIST and SET_MODE_LIST packets, broadcast the list packet
2923           (if needs broadcasting) instead of broadcasting the packets one
2924           by one which would make a burst in the network traffic.
2925
2926         * Added `broadcast' argument to the functions in silcd/server.[ch]
2927           silc_server_create_new_channel[_with_id] to indicate whether
2928           to send New Channel packet to primary router.
2929
2930 Sat Feb 17 01:06:44 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2931
2932         * Added new function into the silcd/server.[ch] files:
2933           silc_server_create_new_channel_with_id to create new channel with
2934           already existing Channel ID.
2935
2936         * Added new packet type SILC_PACKET_SET_MODE_LIST into the file
2937           lib/silccore/silcpacket.h.  This packet is used t send list of
2938           Set Mode payloads inside one packet.  Server uses this to set
2939           the modes for the channels and clients on those channels, that it
2940           announced to the router when it connected to it.  The protocol
2941           specification has been updated accordingly.
2942
2943         * The silc_server_new_channel did not handle the packet coming
2944           from normal server as it normally does not send that.  However,
2945           when it announces its channels it does send it.  Implemented
2946           the support for that.
2947
2948         * Added SILC_ID_CHANNEL_COMPARE macro to compare to Channel ID's
2949           into the file lib/silccore/id.h.
2950
2951 Fri Feb 16 23:57:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2952
2953         * Fixed memory leaks in the functions silc_idlist_del_client,
2954           silc_idlist_del_channel and silc_idlist_del_server in the file
2955           silcd/idlist.c.  All of those leaked like a sieve.
2956
2957         * Fixed some small memory leaks in the client's function
2958           silc_client_notify_by_server.
2959
2960         * Added functions into silcd/server.c: silc_server_announce_clients,
2961           silc_server_announce_channels and silc_server_announce_server.
2962           These functions are used by normal and router server to announce
2963           to its primary router about clients, channels and servers (when
2964           router) that we own.  This is done after we've connected to the
2965           router.
2966
2967           These functions effectively implements the following packet types:
2968           SILC_PACKET_NEW_CHANNEL_LIST, SILC_PACKET_NEW_CHANNEL_USER_LIST
2969           and SILC_PACKET_NEW_ID_LIST.
2970
2971         * Added new functions into the silcd/packet_receive.[ch]:
2972           silc_server_new_id_list, silc_server_new_channel_list and
2973           silc_server_new_channel_user_list to handle the incoming 
2974           NEW_ID_LIST, NEW_CHANNEL_LIST and NEW_CHANNEL_USER_LIST packets.
2975
2976         * Added support of changing Channel ID in the function
2977           silc_server_replace_id.  If the server that announces a channel
2978           to the router already exists in the router (with same name but
2979           with different Channel ID), router is responsible to send
2980           Replace ID packet to the server and force the server to change
2981           the Channel ID to the one router has.
2982
2983         * Added new notify type SILC_NOTIFY_TYPE_CHANNEL_CHANGE to notify
2984           client that the Channel ID has been changed by the router.  The
2985           normal server sends this to the client.  Client must start using
2986           the new Channel ID as the channel's ID.
2987
2988           Implemented handling of this new type into lib/silcclient/client.c
2989           into the function silc_client_notify_by_server.
2990
2991         * Added new function silc_idlist_replace_channel_id into the files
2992           silcd/idlist.[ch] to replace the Channel ID.
2993
2994 Fri Feb 16 14:14:00 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
2995
2996         * Call silc_server_command_identify_check always when processing
2997           the IDENTIFY command in silcd/command.c
2998
2999 Thu Feb 15 20:07:37 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3000
3001         * Added new packet type SILC_PACKET_HEARTBEAT that is used to
3002           send keepalive packets.  The packet can be sent by clients, 
3003           servers and routers.
3004
3005           Added function silc_socket_set_heartbeat into the file
3006           lib/silccore/silcsockconn.[ch] to set the heartbeat timeout.
3007           If not set, the heartbeat is not performed.  The actual 
3008           heartbeat is implemented in the low level socket connection
3009           library.  However, application is responsible of actually
3010           sending the packet.
3011
3012           Added silc_server_send_heartbeat to send the actual heartbeat
3013           packet into silcd/packet_send.[ch].  Server now performs
3014           keepalive with all connections.
3015
3016         * Added silc_task_get_first function into lib/silcutil/silctask.c
3017           to return the timeout task with shortest timeout.  There was a bug
3018           in task unregistration that caused problems.  TODO has been
3019           updated to include that task system must be rewritten.
3020
3021         * The client library will now resolve the client information when
3022           receiving JOIN notify from server for client that we know but
3023           have incomplete information.
3024
3025         * Rewrote parts of silc_server_remove_from_channels and
3026           silc_server_remove_from_one_channel as they did not remove the
3027           channel in some circumstances even though they should've.
3028
3029         * Encryption problem encountered in server:
3030
3031           The LEAVE command used to send the Channel Key packet to the
3032           router immediately after generating it.  However, the code
3033           had earlier sent Remove Channel user packet but not immediately,
3034           ie. it was put to queue.  The order of packets in the router
3035           was that Channel Key packet was first and Remove Channel User
3036           packet was second, even though they were encrypted in the
3037           reverse order.  For this reason, MAC check failed.  Now, this
3038           is fixed by not sending the Channel Key packet immediately but
3039           putting it to queue.  However, this is more fundamental problem:
3040           packets that are in queue should actually not be encrypted 
3041           because packets that are sent immediately gets encrypted
3042           actually with wrong IV (and thus MAC check fails).  So, packets
3043           that are in queue should be encrypted when they are sent to
3044           the wire and not when they put to the queue.
3045
3046           However, the problem is that the current system has not been
3047           designed to work that way.  Instead, the packet is encrypted
3048           as soon as possible and left to the queue.  The queue is then
3049           just purged into wire.  There won't be any fixes for this
3050           any time soon.  So, the current semantic for packet sending
3051           is as follows:
3052
3053           o If you send packet to remote host and do not force the send
3054           (the packet will be in queue) then all subsequent packets to the
3055           same remote host must also be put to the queue.  Only after the
3056           queue has been purged is it safe again to force the packet
3057           send immediately.
3058
3059           o If you send all packets immediately then it safe to send
3060           any of subsequent packets through the queue, however, after
3061           the first packet is put to queue then any subsequent packets
3062           must also be put to the queue.
3063
3064           Follow these rules and everything works fine.
3065
3066 Thu Feb 15 14:24:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3067
3068         * Added new function silc_server_remove_clients_by_server to
3069           remove all client entries from ID list when the server connection
3070           is lost.  In this case it is also important to invalidate all
3071           client entires as they hold the invalid server entry.  This
3072           fixes fatal bug when server has lost connection and will reconnect
3073           again.
3074
3075 Wed Feb 14 16:03:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3076
3077         * Made some sanity checks to silc_server_daemonise like to check
3078           whether the requested user and group actually exists.
3079
3080         * Added sanity check to SKE's silc_ske_responder_finish to check
3081           that the public and private key actually is valid. 
3082
3083         * Invalidate the client's nickname when receiving Replace ID
3084           packet and the Client ID is being replaced.  This means that the
3085           server will query the nickname if someone needs it (client)
3086           a bit later.
3087
3088         * Sort the ID Cache in client library when the ID Cache data
3089           has changed (needs sorting).
3090
3091         * Do not allow for SILC client to create several connections to
3092           several servers.  The client does not support windows right now
3093           and generating multiple connections causes weird behaviour.
3094
3095           Irssi-silc client does support windows and can handle several
3096           connections without problems, see: www.irssi.org and SILC plugin.
3097
3098         * Fixed some places where client was added to the IDList.  The
3099           rule of thumb is following (in order to get everything right):
3100           If the client is directly connected local client then the 
3101           `connection' argument must be set and `router' argument must be 
3102           NULL to silc_idlist_add_client function.  If the client is not
3103           directly connected client then the `router' argument must
3104           bet set and the `connection' argument must be NULL to the
3105           silc_idlist_add_client function.
3106
3107         * The funtion silc_server_packet_send_local_channel actually did
3108           not check whether the client was locally connected or not.  It
3109           does that now.  Fixed a bug related to LEAVE command.
3110
3111         * Fixed Remove Channel User payload parsing bug in server's
3112           silcd/packet_receive.c.  Fixed a bug related to LEAVE command.
3113
3114         * The server's silc_server_save_channel_key now checks also the
3115           global ID list for the channel as it might not be in the local
3116           list.  Fixed a bug related to LEAVE command.
3117
3118         * Is this the end of the [<unknown>] buglet that has been lurking
3119           around for a long time?  A little for loop fix in server's
3120           silc_server_command_whois_parse that is used by both IDENTIFY
3121           and WHOIS command.  At least, this was a clear bug and a cause
3122           of one type of [<unknown>] buglet.
3123
3124         * WHOIS and IDENTIFY commands call the function
3125           silc_server_command_[whois/identify]_check function even if
3126           we are not router server.
3127
3128 Tue Feb 13 19:55:59 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3129
3130         * Added --with-gmp configuration option.  If set the GMP
3131           is always compiled in the SILC source tree.  If not set then
3132           it is checked whether the system has the GMP3 installed.  If
3133           it has then the GMP won't be compiled (the system's headers
3134           and library is used), if it doesn't have it then the GMP is
3135           compiled in the SILC source tree.
3136
3137 Mon Feb 12 11:20:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3138
3139         * Changed RSA private exponent generation to what PKCS #1
3140           suggests.  We try to find the smallest possible d by doing
3141           modinv(e, lcm(phi)) instead of modinv(e, phi).  Note: this is
3142           not security fix but optimization.
3143
3144 Sun Feb 11 18:19:51 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3145
3146         * Added new config entry [Identity] to fork the server and run
3147           it as specific user and group.  A patch from Bostik.
3148
3149         * Imported Dotconf configuration library into lib/dotconf.
3150           This will be used to create the SILC configuration files later.
3151           It will appear in the distsribution after this commit.
3152
3153 Sat Feb 10 21:13:45 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3154
3155         * A big code auditing weekend happening.  Auditing code for 
3156           obvious mistakes, bugs and errors.  Also, removing any code
3157           that is obsolete.
3158
3159           Removed files for being obsolete:
3160
3161           o lib/silcutil/silcbuffer.c (the buffer interface is entirely in
3162           inline in the file lib/silcutil/silcbuffer.h)
3163
3164           o lib/silcutil/silcbufutil.c (the header has inline versions)
3165
3166           Changed code to fix possible error conditions:
3167
3168           o The buffer formatting routines now check that the destination
3169           buffer really has enough space to add the data.  This applies for
3170           both buffer formatting and unformatting 
3171           (lib/silcutil/silcbuffmt.[ch]).  Also, the entire buffer
3172           unformatting was changed to accomodate following rules: 
3173           XXX_*STRING_ALLOC will allocate space for the data into the pointer
3174           sent to the function while XXX_*STRING will not allocate or copy 
3175           the data into the buffer.  Instead it sets the pointer from the
3176           buffer into the pointer sent as argument (XXX_*STRING used to
3177           require that the pointer must be allocated already).  This change
3178           makes this whole thing a bit more consistent and more optimized
3179           (note that the data returned in the unformatting with XXX_*STRING
3180           must not be freed now).  The routines return now -1 on error.
3181
3182           o Tried to find all code that use buffer_format and buffer_unformat
3183           and added return value checking to prevent formatting and
3184           especially unformatting errors and possible subsequent fatal
3185           errors.
3186
3187           o Changed ske->x and ske->KEY to mallocated pointers in
3188           lib/silcske/silcske.h.  Fixed possible data and memory leak.
3189
3190           o Added return value checking to all *_parse* functions.  Fixed
3191           many memory leaks as well.
3192
3193           o Added length argument to silc_id_str2id in lib/silccore/id.[ch]
3194           so that buffer overflows would not happen.  All code now also
3195           checks the return value as it can fail.
3196
3197 Mon Feb  5 20:08:30 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3198
3199         * Added reconnection support to server if the normal server looses
3200           its connection to the router (for example if router is rebooted).
3201           The server performs normal reconnection strategy implemented
3202           to the server.  Affected file silcd/server.c.
3203
3204 Sun Feb  4 13:18:32 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3205
3206         * Added new packet type SILC_PACKET_SET_MODE that is used to
3207           distribute the information about changed modes (for clients,
3208           channels and clients channel modes) to all routers in the
3209           network.  Updated the protocol specification accordingly.
3210
3211           Added functions into silcd/packet_send.c and 
3212           silcd/packet_receive.c: silc_server_send_set_mode, 
3213           silc_server_set_mode.
3214
3215           Added new files silcmode.[ch] into lib/silccore that implements
3216           the encoding and decoding of Set Mode Payload.  Added new type
3217           SilcSetModePayload.  Moved the definitions of different modes
3218           from lib/silccore/silcchannel.h into lib/silccore/silcmode.h.
3219
3220 Sat Feb  3 15:44:54 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3221
3222         * Oops, a little mistake in server's connection authentication 
3223           protocol.  The protocol is not ended with FAILURE but with
3224           SUCCESS if the authentication is Ok. :)  Affected file is
3225           silcd/protocol.c.
3226
3227         * Implemented NICK_CHANGE notify handling in server in the file
3228           silcd/packet_receive.c  The NICK_CHANGE notify is distributed to
3229           the local clients on the channel.  After the changing nickname
3230           in router environment snhould work and the [<unknown>] nickname
3231           should appear no more.
3232  
3233           The silc_server_replace_id function that receives the Replace ID
3234           payload now sends the NICK_CHANGE notify type also in the file
3235           silcd/packet_receive.c
3236
3237         * Changed WHOIS and IDENTIFY command to support the maximum amount
3238           of arguments defined in protocol specs (3328 arguments).  This 
3239           fixed a bug that caused problems when there were more than three
3240           users on a channel.
3241
3242 Fri Feb  2 11:42:56 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3243
3244         * Added extra parameter, command identifier, to the
3245           silc_client_send_command so that explicit command identifier
3246           can be defined.
3247
3248           Changed that ID list routines uses specific command identifier
3249           when sending WHOIS/IDENTIFY requests to the server so that they
3250           can be identified when the reply comes back.
3251
3252           Affected files lib/silcclient/command.[ch],
3253           lib/silcclient/client.c and lib/silcclient/idlist.[ch].
3254
3255         * Added `sender' argument to silc_server_packet_send_to_channel
3256           to indicaet the sender who originally sent the packet to us
3257           that we are now re-sending.  Ignored if NULL.  Affected file
3258           silcd/packet_send.[ch].
3259
3260         * Added some server statistics support in silcd/server_internal.h
3261           SilcServerStatistics structure and around the server code.  Also
3262           send some nice statistics information when client is connecting
3263           to the client.
3264
3265 Thu Feb  1 23:31:21 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3266
3267         * Fixed channel ID decoding in server's JOIN command reply in
3268           silcd/command_reply.c
3269
3270         * Fixed braodcasting of replace ID payload to not to send it if
3271           we are standalone server in silcd/packet_receive.c.
3272
3273         * Fixed all channel message sending routines to not to send
3274           packets to clients that has router set, since they are routed
3275           separately in the same function earlier.  Affects file
3276           silcd/packet_send.c and all channel packet sending functions.
3277
3278         * In USERS reply, res_argv[i] are not allocated, the table
3279           is allocated.  Thus changed that free the table, not its
3280           internals.
3281
3282         * In server's whois_check and identify_check if the client is
3283           locally connected do not send any WHOIS commands - they are not
3284           needed.
3285
3286 Thu Feb  1 21:32:27 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3287
3288         * Fixed some minor bugs in client when sending WHOIS command.  The
3289           arguments was in wrong order.
3290
3291         * Removed statis function add_to_channel from server in 
3292           silcd/command.c that was previously used with the joining but
3293           is obsolete now.
3294
3295         * Tested USERS command in router environment successfully with two
3296           routers, two servers and two clients.
3297
3298 Thu Feb  1 00:54:26 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3299
3300         * Reorganized the USERS command and command reply in client library
3301           in lib/silcclient/command.c and lib/silcclient/command_reply.c.
3302           When the command is given by user we register a pending command
3303           callback that will reprocess the command after the reply has been
3304           received from the server.  When reprocessing the packet we then
3305           display the information.  Thus, the USERS information is displayed
3306           now in the command callback instead of in the command reply
3307           callback.  The processing of the command is same as previously
3308           when server has sent the command reply in the JOINing process.
3309
3310         * Added to USERS command in silcd/command_reply.c to join the client,
3311           we didn't use to know about, to the channel after we've created
3312           a client entry for it.  Also, for clienet we did know already still
3313           check whether it is on the channel or not and add it if not.
3314
3315         * Removed silc_server_command_join_notify as the function and its
3316           use was obsolete.
3317
3318 Tue Jan 30 22:39:15 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3319
3320         * Changed the client's pending command handling to the same as the
3321           server's pending command handling.  It is also now possible to
3322           execute command reply functions from other command reply
3323           function as the function callbacks for commands and command
3324           replies are one and same.  The pending commands are not static
3325           list anymore, it is mallocated SilcDList in lib/silcclient/client.h
3326           in client connection context.  Thus, pending commands are server
3327           connection specific as it is convenient.
3328
3329           Changed the function silc_client_command_pending and
3330           silc_client_command_pending_del and added new function
3331           silc_client_command_pending_check.  Removed the 
3332           SILC_CLIENT_CMD_REPLY_EXEC, and SILC_CLIENT_PENDING_COMMAND_CHECK
3333           macros.
3334
3335         * Added cmd_ident, current command identifier, to the client
3336           connection context in lib/silcclient/client.h to keep track on
3337           command identifiers used in command sending.  Client's command reply
3338           function handling now supports the mandatory command identifiers.
3339
3340         * Added SILC_CLIENT_COMMAND_EXEC_PENDING macros to all command reply
3341           funtions in client to fully support pending command callbacks.
3342
3343         * NOTE: the name_list in USERS (old NAMES) command is NOT sent anymore
3344           as one of the arguments to the application in the command reply
3345           client operation.
3346
3347         * NOTE: The FORWARDED flag is depracated.  It used to be depracated
3348           before first releasing SILC but came back.  Now it is removed again
3349           and should come back nomore.  The FORWARDED flag was used only
3350           by the JOINing procedure by forwarding the command packet to router.
3351           Now, the JOINing procedure has been changed to more generic (due
3352           to various router environment issues) and FORWARDED is not needed
3353           anymore for anything.  The protocol specification is yet to be
3354           updated.
3355
3356           Now, removed silc_server_packet_forward from server and the flag
3357           SILC_PACKET_FORWARDED from lib/silccore/silcpacket.h.
3358
3359 Tue Jan 30 00:05:05 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3360
3361         * Renamed NAMES command to USERS command.  The NAMES was named that
3362           due to historical reasons.  Now it is renamed.  Also, rewrote
3363           parts of the USERS command.  The nickname list is not sent anymore
3364           by the server.  Only Client ID and mode lists are sent in the USERS
3365           command.  Changed this also to the protocol specification.
3366
3367           The client now resolves the names and stuff after it receives
3368           the USERS list from the server when joining to the channel.
3369
3370         * WHOIS and IDENTIFY commands has been changed to support multiple
3371           Client ID's per command.  One can now search for multiple users
3372           in the network by sending only one WHOIS or IDENTIFY command.
3373           Changed the code and the protocol specifications.
3374
3375         * Removed silc_server_command_identify_parse and changed that IDENTIFY
3376           uses silc_server_command_whois_parse to parse the request. */
3377
3378         * If normal server, do not parse the WHOIS and IDENTIFY requests
3379           before sending it to the router.  Saves some time.
3380
3381 Sun Jan 28 16:19:49 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3382
3383         * Fixed JOIN command on client library.  Wrong number of arguments
3384           used to crash the client.
3385
3386         * Added silc_server_channel_has_global function to check whether
3387           channel has global users or not.
3388
3389         * Added silc_server_channel_has_local function to check whether channel
3390           has locally connected clients on the channel.
3391
3392         * The silc_server_remove_from_one_channel now checks whether the
3393           channel has global users or not after given client was removed from
3394           the channel.  It also checks whether the channel has local clients
3395           on the channel anymore.  If it does not have then the channel entry
3396           is removed as it is not needed anymore.
3397
3398         * The silc_server_notify now checks on JOIN notify whether the joining
3399           client is one of locally connected or global.  If it is global then
3400           the channel has now global users on the channel and that is marked
3401           to the channel entry.  Also, it now saves the global client to
3402           global list who is joining and JOINs it to the channel.  This is
3403           for normal server, that is.
3404
3405           Changed silc_server_send_notify_on_channel, 
3406           silc_server_packet_relay_to_channel and 
3407           silc_server_packet_send_to_channel check if we are normal server
3408           and client has router set (ie. global client) do not send the
3409           message to that client, as it is already routed to our router.
3410
3411         * Implemented LEAVE notify type handling in silc_server_notify 
3412           function.
3413
3414         * Tested LEAVE command in router environment successfully.  Tested
3415           with two routers, two servers and two clients.
3416
3417         * Updated TODO.
3418
3419         * idlist_find_xxx_by_id routines now dumps the ID on the debug mode.
3420
3421         * Implemented SIGNOFF notify type handling in silc_server_notify
3422           function.
3423
3424         * silc_server_remove_id now removes the client entry from all channels
3425           it has joined and thusly sends SIGNOFF notify type.
3426
3427         * Rewrote the NAMES list generation in server by removing two excess
3428           loops.  The lists are created now inside one loop.
3429
3430 Sat Jan 27 22:34:56 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3431
3432         * silc_server_remove_channel_user checks now also global list
3433           for channel and client.
3434
3435         * silc_server_new_channel_user checks now both local and global
3436           list for channel and client.  Fixed a bug in client id decoding.
3437           Used to decode wrong buffer.
3438
3439         * silc_server_channel_message checks now both local and global
3440           list for channel entry.
3441
3442         * Tested channel joining (hence JOIN) in router environment
3443           successfully.  Tested with two routers, two servers and two
3444           clients.
3445
3446         * Tested channel message sending in router environment successfully.
3447
3448 Thu Jan 11 03:22:57 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
3449
3450         * Added silc_server_save_channel_key into server.[ch] to save the
3451           received channel key in Channel Key payload processing. It is
3452           also used in JOIN command reply handling.
3453
3454           Equivalent function silc_client_save_channel_key added into
3455           client.[ch] into client library.
3456
3457         * Changed JOIN command reply to send information whether the channel
3458           was created or not (is existing already) and the channel key 
3459           payload.  Changed protocol specs accordingly.
3460
3461         * Fixed bugs in WHOIS and IDENTIFY command reply sending when
3462           the request was sent by ID and not by nickname.  Crashed on
3463           NULL dereference.
3464
3465 Sat Dec 23 21:55:07 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3466
3467         * Fixed a bug in Client library.  IDENTIFY and WHOIS reply functions
3468           now correctly save the received data.
3469
3470         * silc_server_free_sock_user_data now notifies routers in the 
3471           network about entities leaving the network.
3472
3473           At the same time implemented functions silc_server_remove_id
3474           and silc_server_send_remove_id to receive and send REMOVE_ID
3475           packets.  The packet is used to notify routers in the network
3476           about leaving entities.  The ID removed will become invalid in
3477           the network.
3478
3479         * Added function silc_idlist_del_server into server. Removes and
3480           free's server entry from ID list.
3481
3482         * silc_server_private_message function now checks, if we are router,
3483           that the destination ID really is valid ID, naturally.
3484
3485         * In router when NEW_ID packet is received (for new client) the
3486           hash of the Client ID is saved in the ID Cache but the
3487           client->nickname is set to NULL, instead of putting the hash
3488           to it as well.
3489
3490           IDENTIFY command now also checks that client->nickname must be
3491           valid. If it is not if will request the data from the server who
3492           owns the client.  Added new function 
3493           silc_server_command_identify_check.
3494
3495         * Added silc_command_set_command into lib/silccore/silcommand.[ch]
3496           to set the command to already allocated Command Payload.
3497
3498         * Tested private message sending in router environment with two
3499           routers, two servers and two clients.  Fixed minor bugs and now
3500           it works fine.
3501
3502         * Fixed segfault from client's NAMES command. Used to crash if
3503           not on any channel.
3504
3505         * Forwarded packets must not be routed even if it is not destined
3506           to the receiver.  Changed server code comply with this.
3507
3508 Sun Dec 17 14:40:08 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3509
3510         * Added `require_reverse_mapping' boolean value to ServerParams
3511           structure. If TRUE (not default) the server will require that
3512           the connecting host has fully qualified domain name.
3513
3514           If the reverse mapping is not required and hostname could not be
3515           found the IP address is used as hostname.
3516
3517 Sat Dec 16 17:39:54 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3518
3519         * Implemented version string checking to both client and server.
3520           The check is incomplete currently due to the abnormal version 
3521           strings used in development version of SILC.
3522
3523         * Changed all command functions in server to use the new
3524           CHECK_ARGS macro.
3525
3526 Fri Dec 15 15:55:12 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3527
3528         * Changed char *data to unsigned char *data in ID Cache system to
3529           support binary data as ID Cache data. Changed code to support
3530           binary data in lib/silccore/idcache.c.
3531
3532         * Renamed silc_server_packet_relay_command_reply to 
3533           silc_server_command_reply as it is normal packet receiving
3534           function. Rewrote the function to accept command replys for
3535           servers and not only for clients.
3536
3537         * Mark remote router always as registered server if we are connecting
3538           to it.  Otherwise, commands sent by the router to us are ignored.
3539
3540         * All ID List find routines now returns the ID Cache Entry pointer
3541           as well if requested.
3542
3543         * WHOIS command works now in router environment, tested with two
3544           routers, two servers and two clients.
3545
3546         * Cleaned up and rewrote IDENTIFY command. IDENTIFY should work now
3547           in router environment (as it is almost equivalent to WHOIS) but
3548           hasn't been tested thoroughly.  Added new functions:
3549
3550           silc_server_command_identify_parse
3551           silc_server_command_identify_send_reply
3552           silc_server_command_identify_from_client
3553           silc_server_command_identify_from_server
3554
3555         * Disabled route cache adding because adding two different ID's with
3556           same IP replaces the old cache entry thus giving wrong route.
3557           The entry->router->connection is always the fastest route anyway
3558           so route cache may not be needed.  Of course, new routes maybe
3559           established after receiving the ID when the entry->router->connection
3560           might not be anymore the most optimal.
3561
3562 Thu Dec 14 15:55:35 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3563
3564         * Add route cache for received ID for fast routing.
3565
3566         * Added silc_server_packet_route to route received packet on router
3567           that is not destined to us.
3568
3569         * Renamed silc_server_get_route to silc_server_route_get.
3570
3571         * Added id_string and id_string_len fields into SilcServer to
3572           include encoded ServerID for fast comparing without excess
3573           encoding of the ID's.
3574
3575         * Cleaned up WHOIS command on server side. Added following static
3576           functions:
3577
3578           silc_server_command_whois_parse
3579           silc_server_command_whois_check
3580           silc_server_command_whois_send_reply
3581           silc_server_command_whois_from_client
3582           silc_server_command_whois_from_server
3583
3584         * Added macro SILC_SERVER_COMMAND_CHECK_ARGC to check mandatory
3585           arguments in command replies. All command functions should be
3586           updated to use this macro.
3587
3588 Sun Dec 10 23:52:00 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3589
3590         * Minor typo fixes on command reply handling on server.
3591
3592 Tue Nov 28 11:05:39 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3593
3594         * Added silc_server_command_add_to_channel internal routine to add
3595           the client to the channel after router has created the channel and
3596           sent command reply to the server.
3597
3598         * Added generic silc_server_send_command to send any command from
3599           server.
3600
3601         * Use static buffer with ID rendering instead of duplicating data.
3602
3603 Mon Nov 27 21:39:40 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3604
3605         * Fixed a channel user mode bug when joining to a channel server gave
3606           everybody channel founder rights, oops.
3607
3608         * We mark ourselves as the router of the incoming server connection
3609           if we are router ourselves.  This way we can check in some packet
3610           sending functions whether it is locally connected server.  For
3611           incoming router connections we put NULL.
3612
3613         * For router sending packets locally means now always sending the
3614           packet cell wide; to local clients and local servers.  For normal
3615           server sending packet locally means sending it to only local
3616           clients.
3617
3618         * Fixed the JOIN command to really work in router environment.  If the
3619           channel is created it is always created by the router.  Router is
3620           also responsible of making the initial joining to the channel,
3621           sending JOIN notify to the sending server and distributing 
3622           NEW_CHANNEL and NEW_CHANNEL_USER packets.  Hence, if the channel
3623           does not exist server doesn't do anything else but forward the
3624           command to the router which performs everything.
3625
3626         * Added silc_server_send_channel_key function to send the Channel Key
3627           payload.
3628
3629         * Added silc_server_create_channel_key to create new channel key.  The
3630           channel key is now re-generated everytime someone joins or leaves
3631           a channel, as protocol dictates.  Note: channel->key_len is the
3632           key length in bits.
3633
3634 Wed Nov 22 22:14:19 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3635
3636         * Splitted server.[ch] finally.  Created now packet_send.[ch] and
3637           packet_receive.[ch] to separate packet sending and receiving
3638           routines.  The server.[ch] now includes everything else including
3639           actual packet processing (writing and reading data) and other
3640           server issues.
3641
3642           Renamed silc_server_private_message_send_internal to
3643           silc_server_send_private_message.  The routine is still though
3644           used only to relay private messages as server does not send
3645           private messages itself.
3646
3647           Renamed silc_server_new_channel to silc_server_create_new_channel
3648           and added new function sicl_server_new_channel that handles the
3649           incoming New Channel packet.  Added also new sending function
3650           silc_server_send_new_channel to send New Channel Payload.
3651
3652         * Added new function silc_server_notify to process incoming notify
3653           packet to the server/router. Server may then relay the notify
3654           to clients if needed.
3655
3656         * Added new function silc_server_new_channel_user to process incoming
3657           New Channel User packet.  Router will redistribute the packet and
3658           send JOIN notify to its local clients and locally connected servers
3659           if needed.  Normal server will send JOIN notify to its local client
3660           on same channel when received this packet.  Added also corresponding
3661           sending function silc_server_send_new_channel_user to sent the
3662           payload.
3663
3664         * Added boolean route argument to send_notif_to_channel and
3665           packet_send_to_channel functions to attempt to route the packet
3666           if it is TRUE and send only locally if it is FALSE.
3667
3668 Tue Nov 21 19:49:31 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3669
3670         * silc_server_replace_id now broadcasts the received replace ID
3671           packet if it is not broadcast packet already. The router must
3672           broadcast to inform other routers about changed ID.
3673
3674         * Added backpointer to server's router into SilcServer context in
3675           silcd/server_internal.h.
3676
3677         * Fixed silc_server_packet_broadcast to send correct broadcast
3678           packets.
3679
3680         * The channel key is now distributed to the local client as soon
3681           as it is received from the router (in router environment) so that
3682           no other packet may be sent for the channel until client has 
3683           received the key.
3684
3685         * silc_server_remove_channel_user now broadcasts the received
3686           Remove Channel User packet if it is not broadcast packet already.
3687           The router must broadcast to inform other routers about removed
3688           channel user.
3689
3690         * Added users field into SilcPacketContext that is a reference count
3691           of the context.  One can increase the reference count by calling
3692           silc_packet_context_dup which is now changed to just increase the
3693           reference count instead of duplicating the data.  The reference
3694           count is decresed by calling silc_packet_context_free that will
3695           free the data after the reference count hits zero.
3696
3697           For now on the packet context and everything allocated into it
3698           (including the raw packet from network) must be freed by calling
3699           the new silc_packet_context_free function.  Added also new function
3700           silc_packet_context_alloc that must be used now to allocate the
3701           context.  This also means that if a routine is asynchronous from
3702           silc_[client/server]_packet_parse_type the packet context must
3703           be duplicated by calling silc_packet_context_dup.  Otherwise it
3704           gets free'd after silc_[client/server]_packet_parse_type returns.
3705           Also, one must remember that if packet is duplicated then its 
3706           reference count must be decresed by calling the free function as
3707           many times as it was duplicated.
3708
3709         * Changed SilcBuffer field from protocol contexts to SilcPacketContext
3710           from both client and server.
3711
3712 Mon Nov 20 23:47:03 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3713
3714         * Made joining to a channel working in router environment.
3715
3716         * Cleaned up JOIN command on server side and create function
3717           silc_server_command_join_channel internal routine to make the
3718           joining happen.
3719
3720 Thu Nov  9 21:12:39 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3721
3722         * Changed silc_command_pending list to SilcDList.  Also, added
3723           `ident' field to SilcServerCommandPending structure to identify
3724           the reply and to call correct callback.
3725
3726           Added silc_server_command_pending_check function to replace the
3727           corresnponding macro.  The silc_command_pending list is not
3728           extern anymore.
3729
3730         * Added silc_command_set_ident into lib/silccore/silccommand.[ch]
3731           to set identifier to previously allocated Command Payload.  It
3732           is used to set identifier for command when resending Command
3733           Payload.
3734
3735         * Added silc_command_payload_encode_payload to encode Command
3736           Payload buffer from SilcCommandPayload structure.
3737
3738         * Added silc_argument_payload_encode_payload to encode Argument
3739           payload buffer from SilcArgumentPayload structure.
3740
3741 Wed Nov  8 21:03:28 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3742
3743         * Changed WHOIS command to support router connection on server side.
3744           The whois request is always sent to router unless the server is
3745           standalone server.  After server has received the reply from the
3746           router will it send the reply to the client.
3747
3748         * Added silc_server_packet_broadcast into silcd/server.[ch] to
3749           broadcast received broadcast packet.  The function is used only
3750           by router.  The broadcast packet is always sent to the router's
3751           primary route.
3752
3753         * Added silc_id_render function in lib/silcutil/silcutil.[ch] to
3754           render given ID to printable string, for log files for example.
3755
3756 Tue Nov  7 22:14:19 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3757
3758         * Made basic router to router connections working.  At least they
3759           can now connect to each other but nothing really works the way
3760           they are supposed - yet.
3761
3762         * Added new initiator token to RouterConnection configuration
3763           file in silcd/serverconfig.[ch].  It is used to tell whether we
3764           are the initiator to the remote router or whether we'll expect
3765           the other end to connect.
3766
3767         * Moved registering of listener task to silc_server_init, hence
3768           the server starts listenning as soon as it is run, even if it
3769           does not have connections to other routers.  Let's see how well
3770           this will work.
3771
3772         * Changed default connection retry timeouts for more suitable in
3773           silcd/server.h.
3774
3775         * Removed cipher and such arguments from silc_idlist_add_client
3776           and silc_idlist_add_server prototypes from silcd/idlist.[ch].
3777           Added new function silc_idlist_add_data to add the keys and stuff
3778           to any ID entry.
3779
3780         * Added SilcIDListData structure and added it to SilcClientEntry
3781           and SilcServerEntry as their first field in the structure.  This
3782           way we can explicitly cast the ID entries to the SilcIDListData
3783           structure and get common data for the entries.  In past, we had
3784           to first check what type of connection it is and then cast it to
3785           correct ID entry type.  Now, we can directly cast the opaque
3786           pointer to the SilcIDListData (no matter what ID entry it actually
3787           is) and get the data needed.
3788
3789 Mon Nov  6 21:56:12 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3790
3791         * Wow, found a bug in scheduler.  The scheduler uninitialized itself
3792           in some circumstances even if threre were timeout tasks, though not
3793           IO tasks, but tasks anyway.  Now fixed.
3794
3795         * Defined SilcServerConnection structure to hold connection specific
3796           stuff about directly connected servers and routers.  The definition
3797           is currently in silcd/server_internal.h.  I thought about having
3798           a bit more important role fro this struct but for now it is used
3799           only when connecting to other server (or router actually).
3800
3801         * Added connecting retry support in server when connecting to
3802           router(s).  The retry feature implement exponential backoff
3803           algorithm.  Also, added SilcServerParams structure to hold default
3804           parameters for server.  For now, it include these retry settings
3805           and are hard coded.  After server is moded to be as Silc Server
3806           Library this structure will be more important.
3807
3808 Sun Nov  5 22:28:44 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3809
3810         * Changed client librarys channel->clients table to SilcList and
3811           changed code accordingly.
3812
3813 Thu Nov  2 16:28:01 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3814
3815         * Changed client's channel table to SilcList and changed code 
3816           accordingly.  Also changed SilcChannelClientEntry to include back-
3817           pointer to the channel so that client entry can use that structure
3818           as list as well and we have fast cross-reference to the channel.
3819           This change dramatically decreased the complexity of channel
3820           handling with client entry and vice versa (removed one extra
3821           loop when searching for channel entry from many functions).
3822
3823         * Changed server->sim from table to SilcDList and changed code
3824           accordingly.
3825
3826         * NAMES command can now be used from user interface.  It will show
3827           the user list on the channel, neatly.
3828
3829         * Added realname pointer to SilcClientEntry in lib/silcclient/idlist.h.
3830           Code now saves realname of the user if it becomes available.
3831
3832         * Renamed configure.in to configure.in.pre and made ./prepare
3833           script to automatically add correct version string to
3834           configure.in which it creates from configure.in.pre.
3835
3836 Wed Nov  1 17:21:26 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3837
3838         * NAMES command reply now shows users mode with the nickname when
3839           joining to channel.
3840
3841         * Moved silc_client_ch[u]mode[_char] functions from 
3842           silc/clientutil.[ch] to lib/silcclient/client.[ch].  Though, that
3843           place sucks, they are utility functions and should be in some
3844           other file.
3845
3846         * Fixed some unsigned int's to unsigned short's.  Patch by cras.
3847
3848         * Fixed contrib/getopt*.[ch] to not require config.h.  Patch by
3849           cras.
3850
3851 Tue Oct 31 20:10:37 EET 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
3852
3853         * Updated README.
3854
3855         * Added TRQ (efficient deque and list library) into lib/trq.  This is
3856           a very good list library that is currently used in the SILC.  Defined
3857           SilcList API over the library because I didn't like the API very
3858           much.  See lib/trq/silclist.h for the API and examples of how to
3859           use the API.  Fixed various places in the code to use the new
3860           SilcList API. The SilcList is meant for lists that has a structure
3861           already defined as a list.  It is not suitable to add just some
3862           context to the list (in TRQ, the context is the list actually).
3863
3864           So, I defined SilcDList that can be used for the purpose where 
3865           predefined list structure does not exit.  This can be used as
3866           such list.  Now some context just can be added to the SilcDList.
3867           Currently this list is not used in the SILC just yet, though there
3868           are a lot places where this can replace dynamically allocated
3869           tables and I will fix these places, later, to use SilcDList.
3870           See lib/trq/silcdlist.h for SilcDList (they are all inline functions,
3871           and use TRQ internally).
3872
3873           Also fixed some annoying warning messages that the original TRQ
3874           code generated.  Also minor changes to TRQ's Makefile.in.
3875
3876         * Added support for querying by Client ID to both WHOIS and 
3877           IDENTIFY commands into server, as required by the protocol.
3878
3879         * Removed method function pointers from SilcBuffer structure. They
3880           weren't used to anything and just increased the context size for
3881           no good reason.  This change also made silc_buffer_alloc and
3882           silc_buffer_free functions inline functions.
3883
3884         * Disabled command flooding detection support until it's fixed so 
3885           that it accepts commands in but does not execute them more than once
3886           in two seconds.
3887
3888         * Added silc_net_localhost(), to return local hostname, into
3889           lib/silcutil/silcnet.[ch].  Also added client->hostname pointer
3890           that must be initialized before calling silc_client_init.
3891
3892         * Added new function: silc_server_send_notify_on_channels to send
3893           notify messages to all channels client has joined.  It is assured
3894           that the message is sent only once per client.
3895
3896         * Moved silc_log_format (from lib/silcutil/silclog.[ch] into
3897           lib/silcutil/silcutil.[ch] as silc_format function.  The new 
3898           function is generic and is used by server as well, not only by
3899           the logging routines.
3900
3901         * Added new SKE status type: SILC_SKE_STATUS_BAD_VERSION to indicate
3902           the provided version string was not acceptable.  Added new function:
3903           silc_ske_check_version into lib/silcske/silcske.h.  The function
3904           must be implemented by the application (client or server) and it
3905           does not reside in the SKE library.  The function checks the version
3906           string remote end sent.
3907
3908         * Added back pointers (to opaque context and to SilcSocketConnection) 
3909           into SilcPacketContext structure into lib/silccore/silcpacket.h.
3910
3911         * Added silc_packet_context_dup into lib/silccore/silcpacket.[ch] to
3912           duplicate packet context structure.
3913
3914         * Changed `notify' client operation to send same arguments as client
3915           receives from server except for ID's.  ID's are mapped to correct
3916           ID entry and that is returned.  Also, if channel entry is not sent
3917           by server but the notify is for channel the channel entry is sent
3918           to application (otherwise application doesn't know that it is for
3919           channel (library gets it from packet's Destination ID)).
3920
3921         * Added silc_client_remove_from_channels into client library to 
3922           remove a client from all channels it has joined to.  Used when 
3923           received SIGNOFF notify from server.  Added also new function
3924           silc_client_replace_from_channels to replace old ID entry with
3925           new ID entry on all channels.  Used when received NICK_CHANGE
3926           notify from server.
3927
3928         * Fixed ID Cache list handling in silc_idlist_get_client in 
3929           lib/silcclient/idlist.c.  Also, added silc_idlist_get_client_by_id
3930           to get (or query) client by ID.
3931
3932         * Updated TODO list.
3933
3934         * Added connection authentication status message defined by the
3935           protocol: SILC_CONN_AUTH_OK and SILC_CONN_AUTH_FAILED and added the
3936           support for these into the code in client and server side.
3937
3938         * Added generic function silc_client_send_command to send any command
3939           with variable argument list.  Application should use this function
3940           to send commands if the command functions provided by the library
3941           does not suite for the application's user interface needs.
3942
3943         * Added new `failure' client operation.  Application is notified about
3944           received failure packet if client is executing a protocol.  In this
3945           case the protocol's execution has failed.
3946
3947         * Added SKE's end notify to send the SKE_SUCCESS notify message that
3948           is required by the protocol.
3949
3950         * Added SILC_PROTOCOL_STATE_FAILURE to indicate received failure
3951           packet from remote.  SILC_PROTOCOL_STATE_ERROR indicates local
3952           error at our end.
3953
3954         * Added status flag to SilcSKE object to indicate realtime status
3955           of the SKE protocol.
3956
3957         * Application receives now exactly same command reply arguments as
3958           the library receives from server.  However, if ID is received the
3959           corresponding ID entry is returned to the application (eg. Client
3960           ID is mapped to correct SilcClientEntry entry and that is returned).
3961           Changed command_reply client operation due to this change.
3962
3963         * Changed all ID's in commands and in command replys as ID Payloads.
3964           Change affected both client and server side codes.
3965
3966           All ID's sent in SILC network (with execption of ID's in SILC
3967           Packet header) are sent in ID Payload to support variable length
3968           ID's.
3969
3970         * Server now notifies nick changes and notifies all clients on
3971           the channels about the new nickname (about the new Client ID,
3972           actually).
3973
3974         * Implemented CMODE command to change channel modes. Supports all
3975           channel modes defined by the protocol specs except ban and invite
3976           lists. (Also, private channel key mode is supported but support for
3977           setting private channel key in client is missing, thus, this mode
3978           has no effect on client side (except that server requires that the
3979           client uses private channel key and normal channel traffic does not
3980           work anymore)).
3981
3982           Also, invite mode works per se, but INVITE command does not work
3983           yet correctly, so you can set channel as invite only channel but
3984           inviting clients to the channel does not work (it is yet to be
3985           thought what's the best way to do it).
3986
3987         * Added new command SILC_COMMAND_CUMODE to change user mode on the
3988           channel.  Defined user modes: CHANNEL_FOUNDER and CHANNEL_OPERATOR.
3989           Implemented CUMODE command to change user's mode on the channel.
3990           Supports all modes defined by the protocol specs.
3991
3992         * Added NAMES command reply to return users modes on the channel.
3993
3994         * Removed unnecessary and slow ciphers from lib/silccrypt.
3995
3996         * Set SO_KEEPALIVE option to connection sockets by default.
3997
3998         * Added new command reply status: SILC_STATUS_USER_NOT_ON_CHANNEL.
3999
4000         * Added notify types: MOTD, CMODE_CHANGE and CUMODE_CHANGE.  Also,
4001           redefined the Notify Payload into protocol specs.
4002
4003         * Added silc_id_payload_parse_id to get ID directly from raw
4004           ID payload data.
4005
4006 Mon Oct  9 20:57:02 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4007
4008         * Changed SILC_COMMAND_IDENTIFY in protocol specification to 
4009           accept searching by Client ID as well.
4010
4011         * Added support for LEAVE and SIGNOFF notify types in client library.
4012
4013         * Added silc_id_payload_parse_data into lib/silccore/silcpayload.[ch]
4014           to parse ID Payload from raw data.
4015
4016 Sun Oct  8 19:33:08 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4017
4018         * Added flags parameter into silc_ske_assemble_security_properties
4019           function in lib/silcske/silcske.[ch].
4020
4021         * Changed notify client operation to fit better for notify messages
4022           sent by server.  The notify payload received from server is now
4023           passed to the application (after parsing it to SilcNotifyPayload).
4024           It is application's responsibility to retrieve the arguments
4025           from the payload and show the message the way it wants.  The message
4026           sent by server is implementation specific.
4027
4028         * Changed public keys to comply with the protocol specification.
4029           Old public keys are not supported anymore and are not compatible.
4030
4031         * Removed nickname from Channel Payload as the latest draft removed
4032           it.  The client must resolve the nickname from the NAMES command
4033           reply received when it joined the channel.
4034
4035           Also, changed all channel_xxxx_payload to channel_payload_xxxx.
4036
4037 Sat Oct  7 21:55:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4038
4039         * Fixed some errors in protocol specification drafts.
4040
4041         * Created lib/silccore/silcnotify.c to implement Notify Payload
4042           encoding and decoding, lib/silccore/silcpayload.[ch] to implement
4043           generic payloads described by protocol specifications.  The file
4044           includes implementations for ID Payload and Argument Payload.
4045
4046         * Changed Command Payload implementation to use the new Argument
4047           Payload.  Changed command_xxxx_payload to command_payload_xxxx
4048           to comply with SILC coding conventions.
4049
4050         * Added suppport for Argument Payload handling in Notify Payload
4051           implementation as protocol requires it.  Added the new support
4052           into server and client lib as well.
4053
4054 Thu Oct  5 21:16:28 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4055
4056         * Added support for multiple nicknames on same channel.  [n] is
4057           added locally to the nickname if there are more than one same
4058           nicknames on the channel.
4059
4060         * Server now sends all nicknames that matched WHOIS request.
4061           Client also shows the list received from server.
4062
4063         * Added TOPIC command to client side.  User can now set and show
4064           current topic on channel.
4065
4066         * Added MOTD command to client and server.  Also, server sends the
4067           motd when client connects to the server.
4068
4069         * Changed version strings to comply ISO 8601.
4070
4071 Wed Oct  4 23:29:06 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4072
4073         * Fixed protocol error handling in client library.  It should now
4074           cope even if the SKE fails for some reason.
4075
4076         * Made new protocol specification drafts for submitting to IETF.
4077
4078         * Implemented TOPIC command to server in silcd/command.c.
4079
4080         * Added two new notify types into lib/silccore/silcnotify.h:
4081           SILC_NOTIFY_TYPE_NICK_CHANGE and SILC_NOTIFY_TYPE_TOPIC_SET to
4082           notify nickname change and topic setting/change on a channel.
4083
4084         * API change of command_reply operation in client library.  The
4085           application gets now the status type received from server as well.
4086
4087 Sat Sep 30 16:57:42 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4088
4089         * Removed the function just added to lib/silcutil/silcschedule.[ch].
4090
4091         * Cras fixed and optimized the packet handling even further and
4092           it should work now.  Minor change to the prototype of function
4093           silc_packet_receive_process in lib/silccore/silcpacket.[ch].
4094
4095 Sat Sep 30 08:48:47 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4096
4097         * Added new function into lib/silcutil/silcschedule.[ch]:
4098           silc_schedule_with_fd to select() a specified fd.  The function
4099           returns after timeout expires or data arrives or goes.  The
4100           function is used by packet routines to wait that all data is
4101           received from network.
4102
4103         * Fixed data reading from network in lib/silccore/silcpacket.c.
4104           The code now assures that all data is read from the fd and then
4105           continues packet processing.  This was a bug fix since the code
4106           used to drop some data in some circumstances.
4107
4108         * Added new function into lib/silcclient/client.[ch]:
4109           silc_client_start_key_exchange to start key exchange after
4110           connection has been established to server.  The code internally
4111           now uses this funtion but its main purpose was to provide it
4112           for applications that perform their own connecting.  After
4113           application has created a connection it merely calls this
4114           function to start the key exchange between client and server.
4115           The library takes care of everything else after that.
4116
4117           Updated also lib/silcclient/README to explain the usage of
4118           this new function.
4119
4120         * Do not send to application information that connection has
4121           been established.  Application gets notified it by connect
4122           operation anyway.
4123
4124 Thu Sep 28 23:40:19 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4125
4126         * Applied cras's patch to add silc_schedule_one function.  The
4127           function runs scheduler once and returns.
4128
4129         * Fixed the scheduler after cras messed it up.  The timeout
4130           handling works now as it's supposed to work.
4131
4132         * Added into lib/silccore/ silcnotify.h to include notify
4133           message types support.  Changed silc_server_send_notify*
4134           functions, in server.[ch], to support those new notify types.
4135           Added the support for the notify types into client library,
4136           as well.  Added new notify client operation into ops.h in
4137           lib/silcclient/.
4138
4139         * Changed silc_server_packet_send_to_channel to send normal
4140           packets instead of just channel message packets.  The function
4141           is now used to send the notify packets to channels.  It is not
4142           used to send channel message packets anymore, as server never
4143           sends them anymore.
4144
4145         * Added explicit casting into lib/silcutil/silcbuffmt.c to few
4146           va_arg()s as it seems to require it nowadays.  I guess, if SILC
4147           is compiled with older va_arg() the new code should work anyway.
4148
4149 Wed Sep 13 18:10:14 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4150
4151         * Splitted core library.  Core library (lib/silccore) includes
4152           now only SILC protocol specific core (and common) components.
4153           Created new utility library (lib/silcutil) that includes more
4154           generic purpose stuff.  The stuff for util library was taken
4155           from the old core library.  This was minor and easy split.
4156
4157         * Created SILC Client Library (lib/silcclient) that includes
4158           implementation of the SILC client without user interface.  This
4159           was major move from silc/ directory.  The code has been changed
4160           so that it is transparent towards the user interface.  The
4161           silc/ directory includes now the same user interface as before
4162           and it uses the new client library.  Read lib/silcclient/README.
4163           Basicly, the client library performs everything else related
4164           to SILC except user interface handling.  Also, configuration
4165           files are considered to be part of user interface and library
4166           does not handle them.
4167
4168           This change also changed a lot of structures, function naming etc.
4169           Most important change was that SilcClientWindow object was
4170           renamed to SilcClientConnection in the client library.  Created
4171           also new file lib/silcclient/ops.h.  Also added new files
4172           silc/local_command.[ch] and silc/client_ops.[ch].
4173
4174           All these changes were made to make it easier for user interface
4175           designers to create what ever user interface for the SILC client
4176           they want.
4177
4178           It is also expected that the server will be moved to lib
4179           directory as well and SILC Server Library will be created;
4180           sometimes in the future.
4181
4182         * Removed Local commands from lib/silccore/silccommand.h as
4183           they are application specific and new client library does not
4184           handle any of those anymore.
4185
4186         * Several functions moved to lib/silcutil/silcutilc.[ch] from
4187           old client implementation in silc/.
4188
4189         * Added support for callback functions in SILC_LOG_* macros.
4190           Application can now set its own callbacks that will be called
4191           instead of using the default functions that will always print
4192           the debug messages to stderr (or stdout).  Also, debugging can
4193           now be disabled by setting silc_debug to FALSE and re-enabled by
4194           setting it to TRUE.  Note, that logging will still work even
4195           if debugging is disabled.
4196
4197           New functions in lib/silcutil/silclog.[ch]: silc_log_set_callbacks,
4198           silc_log_reset_callbacks, silc_log_set_debug_callbacks and
4199           silc_log_reset_debug_callbacks.
4200
4201         * To enable debugging in silc client one must give now -d
4202           option on command line.
4203
4204         * Changed silc_schedule_init to automatically allocate task queues
4205           if they are not allocated before calling it.
4206
4207 Thu Sep  7 10:49:33 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4208
4209         * Added GMP 3.1 into math library.
4210
4211 Sun Aug 20 21:27:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4212
4213         * Added SILC_PACKET_REMOVE_CHANNEL_USER to remove a client from
4214           a channel in SILC network.  The packet is used by servers and
4215           routers to notify other routers that user has left a channel.
4216           This little feature was missing until now.  Added the feature
4217           to protocol specification as well.
4218
4219           Added functions: silc_server_send_remove_channel_user and
4220           silc_server_remove_channel_user into server.[ch].
4221
4222         * Added SILC_PACKET_REKEY and SILC_PACKET_REKEY_DONE into
4223           lib/silccore/silcpacket.h.  However, they are not implemented
4224           yet.
4225
4226 Sat Aug 19 23:04:16 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4227
4228         * Fixed joining to a channel and sending channel messages
4229           between server and router.  The channel message sending should
4230           now work inside a cell.
4231
4232 Tue Jul 25 20:46:13 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4233
4234         * Fixed the private message sending between server and router.
4235           The private message sending should now work inside a cell.
4236
4237         * Added silc_server_replace_id into server.[ch] to replace
4238           existing ID in the SILC network.
4239
4240         * Added silc_idlist_find_server_by, silc_idlist_replace_client_id
4241           and silc_idlist_replace_server_id into idlist.[ch] in server.
4242
4243 Mon Jul 24 18:33:31 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4244
4245         * Fixed the server to server connections.  Server can again now
4246           connect to router.  Router to router connections probably does
4247           not work just yet.
4248
4249 Thu Jul 20 13:15:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4250
4251         * Added dynamic protocol registering support.  Now protocols can
4252           registered and unregistered on the fly.  Patch by cras.
4253
4254 Wed Jul 19 19:08:46 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4255
4256         * Added lib/contrib directory to hold routines that some platforms
4257           don't have but are needed by SILC.
4258
4259         * Added getopt.c, getopt1.c and getopt.h from GNU C library
4260           into lin/contrib to provide getopt() and getopt_long() for
4261           those who don't have it.
4262
4263 Tue Jul 18 20:41:20 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4264
4265         * Added AWAY command to client.  When away message is set and
4266           client receives a private message packet the client automatically
4267           replies to the sender with the away message.
4268
4269         * Fixed a bug in lib/silcmath/mpbin.c: silc_mp_mp2bin.  This
4270           bug seemed to be the cause of recent problems when compiling
4271           with gcc-2.95.
4272
4273         * Added version detection support to SKE protocol specification
4274           and added the new changes to the SKE implementation as well.
4275           There were other minor changes in the SKE protocol as well.
4276
4277           Many changes in lib/silcske/silcske.[ch] and in
4278           lib/silcske/payload.[ch].
4279
4280         * Added ^U functionality, clear input line.  Patch from cras.
4281
4282 Mon Jul 17 23:33:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4283
4284         * Mainly small bugfixes on core library.  Fixed some debugging
4285           logging and buffer overflow in silclog.c.
4286
4287         * Updated config.sub and config.guess on the distribution tree.
4288
4289 Sat Jul 15 15:33:48 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4290
4291         * Added command lagging support in server. Client may execute
4292           commands now only once in two seconds.
4293
4294 Thu Jul 13 22:10:21 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4295
4296         * Optimized packet reception. MAC computation and checking is now
4297           also more optimized.  A lot previously duplicated code is now
4298           used as generic by both client and server.
4299
4300         * Fixed key pair generation in clientutil.c
4301
4302 Wed Jul 12 18:28:07 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4303
4304         * Added into lib/silccore/silcbufutil.[ch] new function;
4305           silc_buffer_realloc.
4306
4307         * Moved generic packet sending/encryption functions to 
4308           lib/silccore/silcpacket.[ch] from client and server.  Some
4309           rewriting of the functions.
4310
4311         * Moved all generic packet reception/decryption functions to
4312           lib/silccore/silcpacket.[ch] from client and server.  The
4313           packet processing is now much cleaner in both client and server.
4314           These were major changes in both client and server.
4315
4316         * Created many common functions in server to do packet sending.
4317           Previously code were duplicated a lot, this has been removed
4318           with these changes.
4319
4320 Tue Jul 11 20:27:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4321
4322         * Rewrote major parts of the ID cache system.  Don't know 
4323           whether it is better now or not but at least the API is more
4324           cleaner now.
4325
4326         * Major rewrite on ID cache stuff on client because of the ID
4327           cache API changes.  Added idlist.c to client.
4328
4329         * Also major rewrite on ID cache stuff on server as well.
4330           Major rewrite of idlist.[ch]. SilcXXXList's are now named
4331           SilcXXXEntry's.  We won't keep anymore idlist specific pointers
4332           in hand, instead they are all put into the ID cache system now.
4333           All server_idlist_* routines uses ID cache now instead of
4334           traversing its own lists (those lists does not exist anymore).
4335           SilcIDList though still exists.  Also, SilcXXXEntry's are
4336           now pointers.
4337
4338 Sun Jul  9 15:19:24 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4339
4340         * Finally made the SKE implementation compliant to the protocol
4341           specification.  All mp integers are now binary encoded as
4342           opposed being HEX encoded.
4343
4344         * Added lib/silcmath/mpbin.[ch].  Encoding mp intergers to and
4345           from binary data.
4346
4347         * Added into lib/silccore/silcutil.[ch] PEM encoding/decoding
4348           functions: silc_[encode/decode]_pem.  Also added function
4349           silc_encode_pem_file to PEM encode with newlines ('\n') for
4350           saving into a file.
4351
4352         * SILC public keys are now encoded either PEM or binary.  Same
4353           option is for private keys as well.  By default private keys
4354           are binary encoded and public keys PEM encoded.  Silly HEX
4355           encoding were removed.
4356
4357         * Added into lib/silccrypt/silchash.[ch] silc_hash_fingerprint
4358           function to create fingerprints.
4359
4360         * Fixed a bug in SHA1; does not change the original data anymore.
4361
4362         * Partly implemented INFO command on client and server side.
4363           Fixed CLEAR command.  Changes to SERVER command; show current
4364           server(s) when giving command without arguments.  Added
4365           VERSION command to client.
4366
4367         * Added check to server that unregistered connections cannot
4368           execute commands (unless it is specificly allowed).
4369
4370 Thu Jul  6 18:12:24 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4371
4372         * Fixed screen refresh.
4373
4374         * Fixed channel joining bug from client.  On some circumstances
4375           client tried to join to a channel it had already joined.
4376
4377         * Added public key verification process into client's protocol.c.
4378           The client now verifies the public key from user and saves
4379           it into ~./silc/serverkeys/ directory. 
4380
4381           Added into: clientutil.[ch]: silc_client_verify_server_key.
4382
4383         * Changed SKE protocol's silc_ske_initiator_finish function
4384           to accept callback function that verifies the received public
4385           key.  Removed old silc_ske_verify_public_key function.
4386
4387 Wed Jul  5 19:19:02 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4388
4389         * Added into silcpkcs[ch]: silc_pkcs_public_key[_data]_set and
4390           silc_pkcs_private_key[_data]_set.
4391
4392         * Made the password and public authentication more cleaner in
4393           server's protocol.c.
4394
4395         * Removed historic and obsolete protocol `channel_auth' from
4396           both client and server.
4397
4398         * Removed wrong way of sending command status messages from
4399           server to client in server's command.c.  The old way violated
4400           protocol specification.  
4401
4402           Changes to silccore/silccommand.[ch]: removed
4403           silc_command_encode_status_payload -> not needed anymore,
4404           changed silc_command_encode_payload_va to accept extra
4405           argument on variable argument list.  The argument type must
4406           now be provided to the function.  Also, added new function:
4407           silc_command_encode_reply_payload_va which is same as
4408           normal command_encode_payload_va except command status type
4409           is provided as extra argument.
4410
4411 Tue Jul  4 18:26:39 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4412
4413         * Added ~./silc directory handling.  The directory includes the
4414           public and private keys for the client.
4415
4416           Added silc_client_check_silc_dir, silc_client_create_identifier
4417           and silc_client_load_keys.
4418
4419         * Implemented SILC protocol compliant public key.  Added public
4420           and private key saving to and loading from files.
4421
4422           Added into silcpkcs.[ch]: silc_pkcs_encode_identifier,
4423           silc_pkcs_public_key_encode[_data], silc_pkcs_public_key_decode,
4424           silc_pkcs_private_key_encode[_data], silc_pkcs_private_key_decode,
4425           silc_pkcs_public_key_alloc, silc_pkcs_public_key_free,
4426           silc_pkcs_private_key_alloc and silc_pkcs_private_key_free.
4427
4428           Implemented: silc_pkcs_save_[public/private]_key[_data] and
4429           silc_pkcs_load_[public/private]_key.
4430
4431 Mon Jul  3 18:51:27 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4432
4433         * Added silc_server_get_route (route.[ch]) to get connection
4434           data for the fastest route for given ID.
4435
4436         * Implemented INVITE command on client and server.  The command
4437           were re-defined in the SILC Protocol Specification and the
4438           implementation now complies with the specification.
4439
4440         * Implemented PING command on client and server.
4441
4442         * Implemented NAMES command on client and server.  The server side
4443           supports currently only normal server not router server yet.
4444           Some changes to NAMES definition in SILC protocol specification.
4445
4446 Sun Jul  2 18:23:01 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4447
4448         * Implemented LEAVE command on client and server.
4449
4450         * Previously deprecated SILC_PACKET_FORWARDED flag is now in use 
4451           again.  This change was made to the protocol as well.  Server
4452           should not violate the protocol specification anymore.
4453
4454 Fri Jun 30 14:03:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
4455
4456         * Added SOCKS4 and SOCKS5 support to SILC client.  SOCKS5
4457           was tested.  SOCKS4 was not but should work anyway.