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