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