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