updates.
[silc.git] / lib / doc / porting.html
1 <big><b>Porting from Toolkit 1.0 to 1.1</b></big>
2
3 <br />&nbsp;<br />
4 This documents describes the differences between the SILC Toolkit 1.0 and
5 1.1 and should help application programmers to port their SILC applications
6 to the new Toolkit version.
7
8 <br />&nbsp;<br />
9 <li><a href="#general">General</a><br />
10 <li><a href="#client">Client library</a><br />
11 <li><a href="#util">Utility library</a><br />
12 <li><a href="#apputil">Application utility library</a>
13 <li><a href="#crypto">Crypto library</a>
14 <li><a href="#skr">Key Repository library</a>
15 <li><a href="#vcard">VCard library</a>
16 <li><a href="#http">HTTP library</a>
17 <li><a href="#asn1">ASN.1 library</a>
18 <li><a href="#other">Other libraries</a>
19
20 <br />&nbsp;<br />
21 <h3><a name="general"></a>General changes</h3>
22
23 The main SILC Toolkit header file has changed its name from silcincludes.h
24 to silc.h.  The first task in porting from 1.0 to 1.1 is to change these
25 filenames in your source tree.
26
27
28 <br />&nbsp;<br />
29 <h3><a name="client"></a>Client library, lib/silcclient/</h3>
30
31 The client library in Toolkit 1.1 has been partially rewritten.  It was
32 rewritten to work out some technical issues and to increase performance
33 and decrease memory consumption.  The client library API has also faced
34 some changes, altough most of it has remained the same.  Most major change
35 in the client library is that is now fully supports multiple threads.  In
36 the past making multithreaded SILC client application was always a bit hard
37 but with Toolkit 1.1 it should be relatively straightforward.
38
39 <h4>SilcClientOperations structure</h4>
40
41 The SilcClientOperation structure has changed significantly.  It no longer
42 has `connected', `disconnected' and `failure' function pointers.  Instead a
43 new SilcClientConnectCallback has been defined that is given as argument to
44 functions like silc_client_connect_to_server, silc_client_connect_to_client
45 and silc_client_key_exchange (last two being entirely new functions in the
46 API).  That callback is called when connection is established and when it
47 is disconnected, or if a protocol failure occurred during connecting.  That
48 callback also delivers a detailed error information when error occurs.  New
49 connection related status types in SilcClientConnectionStatus has also been
50 added, see the API for the details.
51
52 <br />&nbsp;<br />
53 Also the `detach' client operation function pointer has been removed.  Instead
54 the detachment data is now simply delivered in the SILC_COMMNAD_DETACH
55 command reply.
56
57 <br />&nbsp;<br />
58 Some of the remaining client operation function pointers have changed a bit.
59 Most major change is the `command' operation now having the arguments that
60 user gave on the user interface sent back to application.  The `command_reply'
61 does not anymore include the SilcCommandPayload as an argument.  Also the
62 variable argument lis is now delivered as va_list.  Also the boolean
63 success indicator is removed and SilcStatus error argument instead is telling
64 the exact error if the SilcStatus status is other than SILC_STATUS_OK.
65
66 <br />&nbsp;<br />
67 The `get_auth_method' client operation now includes the authentication method
68 that has been resolved from the remote server.  The application no longer
69 needs to resolve it and the function silc_client_request_authentication_method
70 has been removed from the API.
71
72 <br />&nbsp;<br />
73 The `verify_public_key' client operation now include the SilcPublicKey pointer
74 instead of the public key in raw encoded form.  Also the connection type
75 argument has changed to SilcConnectionType.
76
77 <br />&nbsp;<br />
78 The `key_agreement' client operation now includes a new protocol argument
79 which tells whether the key agremeent is supposed to be done on TCP or on
80 UDP transport.  The new Toolkit 1.1 supports both.
81
82 <h4>SilcClient</h4>
83
84 The SilcClientParams includes new fields and some fields have been removed
85 or moved to other places.  All connection timeout related fields have been
86 moved to SilcClientConnectionParams.  The nickname_parse callback pointer has
87 also been removed from SilcClientParams.  The Toolkit 1.1 now automatically
88 parses formatted nicknames.
89
90 <br />&nbsp;<br />
91 The new field boolean `threads' can be used to tell whether the new SilcClient
92 is to use multiple threads or not. If threads support has been compiled in
93 and that field is set to TRUE then the client library will create new thread
94 for each new connection to a remote host.  If you are going to use several
95 connections or some of the connections are high throughput connections (like
96 multimedia connections) then using threads is recommended for performance.
97 Note that your application needs to be multithreaded and, if necessary to,
98 perform concurrencly control in client operation callbacks which may be
99 called from multiple threads at the same time for different connections.
100 However, it is always guaranteed that for one connection the client
101 operations cannot be called from multiple threads.  The multithreads
102 support in Toolkit 1.1 client library means that each new connection and
103 everything related to that connection is handled in own dedicated thread.
104
105 <br />&nbsp;<br />
106 The silc_client_init function now takes several new arguments.  It now takes
107 the username, hostname and realname as argument that used to be required
108 by the application to update directly to SilcClient pointer.  This is not
109 longer required.  Also the nickname is no longer required to be put to
110 SilcClient context as it has been made SilcClientConnection specific.
111 The function also takes a SilcClientRunning callback as argument which will
112 be called when the client library is running.  Only after the callback is
113 delivered may the application start using other client library API functions.
114 For example, connecting to a server will fail if it is performed before
115 the SilcClientRunning callback is called.  The callback is called after the
116 silc_client_run or silc_client_run_one has been called.
117
118 <br />&nbsp;<br />
119 The silc_client_stop function takes new SilcClientStopped callback as
120 argument, and it will be called after the client library has been completely
121 stopped.  The application should not quit before that is called in order
122 to clean up all resources allocation by the client library.
123
124 <br />&nbsp;<br />
125 It is also not required to put the public key pair (SilcPublicKey and
126 SilcPrivateKey) into SilcClient.  They have been made connection specific so
127 you simply give them as argument when you create new connection.  This way
128 it is now possible to use different key pairs with different connections,
129 one that was not possible in Toolkit 1.0 without creating new SilcClient
130 instance for each new connection.
131
132 <h4>SilcClientConnection</h4>
133
134 The SilcClientConnection represents connection to a remote host.  In new
135 Toolkit 1.1 this structure now includes all connection related data and
136 no connection related data is anymore included in SilcClient.  For this
137 reason it is no longer necessary to create multiple SilcClient instances
138 just because you want to create multiple connections.
139
140 <br />&nbsp;<br />
141 The SilcClientConnectionParams structure has many new fields.  This structure
142 is given as argument to any function that is able to create a new connection
143 or to create a network listener or to create a new SILC sessions.  See the
144 API documentation for all the details but the following one field of special
145 relevance when creating new SILC server connections.  The nickname field is
146 now included in this structure and it is the nickname user would like to
147 initially use in the SILC network.
148
149 <br />&nbsp;<br />
150 The functions silc_client_connect_to_server, silc_client_connect_to_client
151 and silc_client_key_exchange can all be used to create new SILC session with
152 a remote.  To connect SILC server use silc_client_connect_to_server.  You
153 now give the SilcClientCnnectionParams as argument which includes the nickname
154 user wants to use, you now can give the public key pair as argument that is
155 to be used in the connecting.  The new SilcClientConnectCallback will be
156 called once the connection has been established and it delivers the
157 SilcClientConection context to the application.  It will be later called
158 again to indicated disconnection from the remote host.  These functions
159 now return SilcAsyncOperation context which can be used to cancel the
160 connecting, if necessary.  In the past canceling connection was not possible.
161
162 <br />&nbsp;<br />
163 <pre>
164 SilcAsyncOperations op;
165 SilcClientConnectionParams params;
166
167 memset(&params, 0, sizeof(params));
168
169 /* Set nickname user wants to use */
170 params.nickname = nickname;
171
172 /* Set perfect forward secery for key exchange */
173 params.pfs = TRUE;
174
175 /* Example of creating, and then canceling a connection */
176 op = silc_client_connect_to_server(client, params, public_key, private_key,
177                                    remote_host, remote_port, connection_cb,
178                                    app_context);
179 if (!op) {
180   fatal("Connecting failed immediately"));
181   exit(1);
182 }
183
184 ...
185
186 /* Cancel connecting.  After canceling the `connection_cb' will not be
187    called. */
188 silc_async_abort(op);
189 </pre>
190
191 <br />&nbsp;<br />
192 The old function silc_client_start_key_exchange has been replaced with
193 silc_client_key_exchange function.  Semantically it is equivalent to
194 silc_client_connect_to_server but it does not create new connection.  Instead,
195 it accepts SilcStream as argument which is already established connection
196 to a remote host and it merely starts the key exchange.  See an example
197 in the API documentation on how to use the silc_client_key_exchange, if
198 your application wishes itself to create connection instead of using the
199 client library to do it.
200
201 The functions silc_client_add_connection, silc_client_del_connection and
202 silc_client_del_socket has been removed.  They are no longer needed.
203
204 <h4>Entries</h4>
205
206 Just like in Toolkit 1.0 we now have SilcClientEntry to represent user,
207 SilcChannelEntry to represent channel and SilcServerEntry to represent
208 server.  In the past these structures and all API functions that dealt
209 with them were in silcclient.h file.  They are now in silcclient_entry.h
210 in Toolkit 1.1.
211
212 <br />&nbsp;<br />
213 As an general convention each of these new entries now are reference
214 counted and they have locks when using them in multithreaded application.
215 Even in one-threaded application the application must always acquire a
216 reference of the entry if it wishes to save the entry pointer in the
217 application.  The reference must be released once the entry pointer is
218 not needed anymore.  This ensures that the library cannot free the entry
219 pointer underneath the application.  An own API for taking and releasing
220 the reference is in Toolkit 1.1.
221
222 <br />&nbsp;<br />
223 <pre>
224 /* Take reference of the client entry I save to my own context. */
225 my_context->client_entry = silc_client_ref_client(client, conn, client_entry);
226 </pre>
227
228 <br />&nbsp;<br />
229 If multiple threads are used and application wants to access the entry it
230 must always first lock the entry.  After application has read the information
231 it needs from the entry it must release the entry lock.  The entry lock
232 should be held only for short periods of time and failure to release the
233 lock will result into deadlock.   An own API for taking and releasing the
234 entry lock is in Toolkit 1.1.  If you application is not multithreaded
235 you do not need to use the entry locking.
236
237 <br />&nbsp;<br />
238 <pre>
239 /* Read data from client entry in multithreaded environment */
240 silc_client_lock_client(client_entry);
241 fprintf(stdout, "%s\n", client_entry->nickname);
242 fprintf(stdout, "%s\n", silc_id_render(SILC_ID_CLIENT, &client_entry->id));
243 silc_client_unlock_client(client_entry);
244 </pre>
245
246 <br />&nbsp;<br />
247 From the entries all unnecessary information for application has been either
248 removed or moved to internal structure that is not accessible by the
249 application.  As a result the entry structures are much smaller and cleaner.
250
251 <br />&nbsp;<br />
252 The SilcClientEntry now includes nickname_normalized field and it is the
253 normalized version of the user's nickname, in case application needs it.
254 It is also guaranteed in Toolkit 1.1 that the nickname inside SilcCientEntry
255 is always valid nickname.
256
257 <br />&nbsp;<br />
258 The SilcChannelEntry now includes new channel_pubkeys list, which includes
259 the channel public keys if they have added to the channel.  This information
260 was not present in Toolkit 1.0.
261
262 <br />&nbsp;<br />
263 The SilcServerEntry now includes new field public_key, which is the server's
264 public key if we have resolved it.  This information was not present in
265 Toolkit 1.0.
266
267 <br />&nbsp;<br />
268 In Toolkit 1.1 it is now easier to search and resolve entries.  As a new
269 feature it now also possible to search and resolve server entries from the
270 SILC network.  See the API documentation for all the details on searching
271 entries from the client library cache and from the SILC network.
272
273 <h4>Sending/Receiving messages</h4>
274
275 Sending messages has not much changed from the Toolkit 1.1.  In Toolkit 1.1
276 the message may now safely be sent in from multiple threads for same client
277 or for same channel.  In case the message are digitally signed the hash
278 function used in the signature computation must now be given as argument.
279 If this is done in multiple threads, each thread must use different SilcHash
280 context because SilcHash does not support multiple threads.  Simply allocate
281 new SilcHash for each thread where you send digitally signed messages.
282
283 <br />&nbsp;<br />
284 Receiving message is same as in Toolkit 1.0.  You receive private_message
285 or channel_message client operation.  It is always guaranteed that even in
286 multithreaded application the messages are received in one thread.  You need
287 concurrency control in your application only if you access shared data in
288 your client operation callbacks.
289
290 <br />&nbsp;<br />
291 In Toolkit 1.1 as a new feature it is also possible to wait for incoming
292 private messages in a thread.  New function silc_client_private_message_wait
293 can be used to block the calling process or thread until private message
294 for the specified client is received.
295
296 <h4>Calling and sending commands</h4>
297
298 Just like in Toolkit 1.0 in Toolkit 1.1 you can call command implemented
299 inside the client library with silc_client_command_call.  The command_reply
300 client operation will be called once the command reply has arrived.
301
302 <br />&nbsp;<br />
303 As a major change in semantics of sending commands with the
304 silc_client_command_send function is the way the command reply is handled
305 in Toolkit 1.1.  In the new Toolkit the command_reply client operation will
306 not be anymore called for commands that has been sent with
307 silc_client_command_send.  The command_reply client operation is called only
308 when silc_client_command_call function is used.  With silc_client_command_send
309 you can give the command reply callback, SilcClientCommandReply, as argument,
310 and it will be called for each command reply that is received from the
311 server.
312
313 <br />&nbsp;<br />
314 Just likein 1.0 in 1.1 it is also possible to attach to pending commands
315 by using silc_client_command_pending.  As a difference to 1.0 the command
316 identifier is not anymore available to application from the
317 SilcClientConnection context.  Instead the silc_client_command_call and
318 silc_client_command_send return the command identifier, and application needs
319 to save it in order to be able to attach to it at later time.  However,
320 this feature is not expected to be very important for application
321 programmers as the new silc_client_command_send already includes the
322 command reply callback.
323
324 <br />&nbsp;<br />
325 <pre>
326 Comparison between 1.0 and 1.1
327
328 Toolkit 1.0:
329 /* Send ping command.  The reply will be in the attached command reply
330    and in the command_reply client operation. */
331 silc_client_command_send(client, conn, SILC_COMMAND_PING, ++conn->cmd_ident,
332                          1, 1, server_id, server_id_len);
333 silc_client_command_pending(conn, SILC_COMMAND_PING, conn->cmd_ident,
334                             ping_command_reply, context);
335
336 Toolkit 1.1:
337 /* Send ping command.  The reply will be ping_command_reply function. */
338 silc_client_command_send(client, conn, SILC_COMMAND_PING,
339                          ping_command_reply, context,
340                          1, 1, server_id, server_id_len);
341
342 </pre>
343
344 <h4>Notify arguments</h4>
345
346 In Toolkit 1.1 the following notify arguments have had changes.  See
347 the <a href="notifyargs.html">Notify Arguments</a> for details.  You should
348 go through your application and change the handling of the following notify
349 messages for Toolkit 1.1.
350
351 <br />&nbsp;<br />
352 SILC_NOTIFY_TYPE_NICK_CHANGE<br />
353 SILC_NOTIFY_TYPE_CMODE_CHANGE<br />
354 SILC_NOTIFY_TYPE_SERVER_SIGNOFF<br />
355
356 <br />&nbsp;<br />
357 The basic changes in notify arguments from Toolkit 1.0 is that the
358 Toolkit 1.1 parses various lists and other raw data for the application as
359 opposed to sending them in the raw format.  This makes programming easier.
360
361 <h4>Command reply arguments</h4>
362
363 In Toolkit 1.1 the following command reply arguments have had changes.  See
364 the <a href="command_reply_args.html">Command Reply Arguments</a> for
365 details.  You should go through your application and change the handling
366 of the following command replies for Toolkit 1.1.
367
368 <br />&nbsp;<br />
369 SILC_COMMAND_WHOIS<br />
370 SILC_COMMAND_INVITE<br />
371 SILC_COMMAND_STATS<br />
372 SILC_COMMAND_JOIN<br />
373 SILC_COMMAND_CMODE<br />
374 SILC_COMMAND_BAN<br />
375 SILC_COMMAND_DETACH<br />
376 SILC_COMMAND_USERS<br />
377
378 <br />&nbsp;<br />
379 The basic changes in command reply arguments from Toolkit 1.0 is that the
380 Toolkit 1.1 parses various lists and other raw data for the application as
381 opposed to sending them in the raw format..  This makes programming easier.
382
383 <h4>Other changes in client library</h4>
384
385 There are many other smaller changes in Toolkit 1.1 that require you to
386 change your application when porting from Toolkit 1.0.  We are not listing
387 all of them here but briefly mention some API changes.
388
389 <br />&nbsp;<br />
390 Listing channel private keys now return SilcDList instead of an array.
391
392 <br />&nbsp;<br />
393 The key agreement API has changed a little bit and is now more cleaner and
394 supports all the features that are needed in full featured key agreement.
395 The silc_client_peform_key_agreement_fd has been replaced by
396 silc_client_perform_key_agreement_stream.
397
398 <br />&nbsp;<br />
399 The private message key API has slight changes also.  It is no longer
400 necessary for the caller to specify whether the private message key is for
401 responder or initiator use.
402
403 <br />&nbsp;<br />
404 The file transfer API has changed a little bit and is now more cleaner and
405 supports all the features that are needed in full featured file transfer.
406 It is now easier to send files when you are behind NAT when you can
407 specifically define the IPs that are used in both file sending and
408 receiving.
409
410 <br />&nbsp;<br />
411 As a new function silc_client_nickname_format can now be used to format
412 the nickname of a client entry.  The client library automatically formats
413 the nicknames but in some cases application might like to change the
414 nickname of a certain client entry.
415
416
417 <br />&nbsp;<br />
418 <h3><a name="util"></a>Utility library, lib/silcutil/</h3>
419
420 The Utility library (runtime library) has had several changes and has several
421 new interfaces.  Some interfaces has also been removed or moved to some
422 other library.  Removed interfaces rae: silcprotocol.h and silcsockconn.h.
423 Moved interfaces are: silcapputil.h and silcvcard.h.
424
425 <h4>SILC Async Operation Interface</h4>
426
427 A new asynchronous operation API (silcasync.h) has been added.  It can be
428 used to control asynchronous operations, like to cancel them.  Many
429 asynchronous routines in SILC Toolkit now return SilcAsyncOperation context
430 so that the operation can be controlled by the caller.  It especiallly
431 provides a generic way to cancel asynchronous operations which
432 can be difficult.
433
434 <h4>SILC Atomic Operations Interface</h4>
435
436 A new atomic operations API (silcatomic.h) has been added.  It provides
437 routines to perform various operations on integeres and pointers atomically.
438
439 <h4>SILC Data Stack Interface</h4>
440
441 A new data stack (memory pool system) API (silcstack.h) has been added.
442 It provides a fast memory allocation system.  Many routines in the SILC Toolkit
443 are SilcStack aware thus enabling them to use the SilcStack as their source
444 for memory allocation.  All routines that are SilcStack aware automatically
445 revert back to normal memory allocation if SilcStack is not given as
446 argument.  See silcstack.h for list of utility routines that support SilcStack
447 by default.
448
449 <h4>SILC Condition Variable Interface</h4>
450
451 A new condition variable API (silccond.h) has been added.  It provides
452 condition variables for multithreaded applications.
453
454 <h4>SILC Stream Interface</h4>
455
456 A new abstract stream API (silcstream.h) has been added.  The SilcStream
457 provides an abstract way of representing different kinds of streams.  The
458 API provides functions that can be used to read, write, control and destroy
459 streams.  The API is not used to create streams but separate interfaces
460 exist for streams that use the SilcStream abstraction.  For example,
461 socket stream and file descriptor stream exist.
462
463 <h4>SILC FD Stream Interface</h4>
464
465 A new file descriptor stream API (silcfdstream.h) has been added.  It
466 provides a blocking and non-blocking file descriptor stream through the
467 SilcStream abstraction.
468
469 <h4>SILC Socket Stream Interface</h4>
470
471 A new socket stream API (silcsocketstream.h) has been added.  It provides
472 a blocking and non-blocking socket stream through the SilcStream
473 abstraction.
474
475 <h4>SILC FSM Interface</h4>
476
477 A new Finite State Machine API (silcfsm.h) has been added.  It provides
478 an FSM that can be used to implement all kinds of machines and protocols.
479 The machine also supports threads, and threads that are actually executed
480 in real system threads.  The SILC FSM API also supports asynchronous
481 events.
482
483 <h4>SILC Time Interface</h4>
484
485 A new SILC Time API (silctime.h) has been added.  It provides utility
486 functions to retrieve and represent time in different ways.  It supports
487 Universal and Generalized time string creation and parsing and adds a new
488 SilcTime structure to represent time.
489
490 <h4>SILC Snprintf Interface</h4>
491
492 A new snprintf API (silcsnprintf.h) has been added.  It provides snprintf
493 and other string formatting routines.
494
495 <h4>SILC Mutex Interface changes</h4>
496
497 The SILC Mutex API (silcmutex) has several changes.  A support for read/write
498 locks has been added (SilcRwLock).  Also silc_mutex_assert_locked function
499 is added.
500
501 <h4>SILC Network Interface changes</h4>
502
503 The SILC Network API (silcnet.h) has several changes.  The API is almost
504 entirely rewritten and most of the old functions have been removed.  The
505 API has now both TCP and UDP support, and as previously supports IPv4
506 and IPv6.  New functions are silc_net_tcp_create_listener,
507 silc_net_listener_get_port, silc_net_close_listener, silc_net_tcp_connnect,
508 silc_net_udp_connect, silc_net_udp_receive, silc_net_udp_send.
509
510 <h4>SILC Scheduler Interface changes</h4>
511
512 The SILC Schedule API (silcschedule.h) has several changes.  The scheduler
513 has been entirely rewritten but most of the API remains the same.
514 The SILC_TASK_GENERIC and SILC_TASK_CALLBACK_GLOCAL have been removed.
515 The way signal are dispatched has been changed.  The SILC Schedule is now
516 able to itself dispatch all signals.  New functions are
517 silc_schedule_task_add_fd, silc_schedule_task_add_timeout,
518 silc_schedule_task_add_signal, silc_task_del_by_all,
519 silc_schedule_get_fd_events.  The functions silc_schedule_signal_register,
520 silc_schedule_signal_unregister and silc_schedule_signal_call have been
521 removed.
522
523 <h4>SILC Types Interface changes</h4>
524
525 The SILC Type API (silctypes.h) has several changes.  The bool type is
526 replaced with SilcBool.  Sockets are now represented by SilcSocket.
527
528 <h4>SILC String util Interface changes</h4>
529
530 The SILC string utility API (silcstrutil.h) has changes.  The PEM encoding
531 and decoding routines has been renamed, silc_base64_encode,
532 silc_base64_encode_file and silc_base64_decode.  The silc_mime_parse has
533 been removed.  A new silc_string_split function has been added.
534
535 <h4>SILC Utility Interface changes</h4>
536
537
538 <h4>SILC File Util Interface changes</h4>
539
540 The SILC file utility API (silcfileutil.h) has changes.  A new function
541 silc_file_set_nonblock has been added.
542
543 <h4>SILC List and Dynamic List Interface changes</h4>
544
545 The SILC List (silclist.h) and SILC Dynamic List (silcdlist.h) APIs have
546 changes. New functions silc_list_insert and silc_dlist_insert have been
547 added.
548
549 <h4>SILC Buffer Interface changes</h4>
550
551 The SILC Buffer API (silcbuffer.h) has several changes.  The SilcBuffer
552 structure no longer contain the buffer length and true length fields
553 but silc_buffer_len() and silc_buffr_truelen() macros are available
554 instead.  Also silc_buffer_data(), silc_buffer_datalen(), silc_buffer_purge(),
555 silc_buffer_reset(), silc_buffer_start(), silc_buffer_end() and
556 silc_buffer_enlarge() has been added.  The API also supports SilcStack.
557
558 <h4>SILC Buffer Formatting Interface changes</h4>
559
560 The SILC Buffer Formatting API (silcbuffmt.h) has several changes.  The
561 silc_buffer_format now automatically allocates memory to the destination
562 buffer if it does not have space.  Also new the following new formatters
563 have been added: SILC_STR_DATA (replaces SILC_STR_UI_XNSTRING),
564 SILC_STR_BUFFER, SILC_STR_FUNC, SILC_STF_OFFSET and SILC_STR_ADVANCE.
565 The API also supports SilcStack.
566
567 <h4>SILC Memory Interface changes</h4>
568
569 The memory allocation API (silcmemory.h) has several changes.  It supports
570 now SilcStack as memory source.  Also all memory allocation routines can
571 now fail and return NULL as opposed to fatally failing when memory allocation
572 fails.
573
574 <br />&nbsp;<br />
575 <h3><a name="apputil"></a>SILC Application Utility library, lib/silcapputil/</h3>
576
577 A new SILC Application Utility library has been added.  It provides
578 various application specific utility libraries that are not part of
579 the runtime library (lib/silcutil/).  The interfaces in the Application
580 utility library were in other libraries in Toolkit 1.0 and the library
581 does not contain any entirely new interfaces.
582
583 <h4>SILC Application Utility Interface</h4>
584
585 The silcapputil.h contains various application utility functions.  It
586 existed in Toolkit 1.0 but some of the APIs has been changed.  The
587 silc_create_key_pair, silc_load_key_pair and silc_show_public_key APIs
588 has changed.  A new silc_show_public_key_file has been added.  Functions
589 silc_identifier_check, silc_identifier_verify, silc_channel_name_check,
590 silc_channel_name_verify, silc_get_mode_list silc_get_status_message,
591 silc_get_packet_name, silc_get_command_name, silc_parse_version_string,
592 silc_version_to_num, silc_client_chmode, silc_client_chumode,
593 silc_client_chumode_char and silc_id_render has been moved from other
594 libraries into this interface in Toolkit 1.1.
595
596 <h4>SILC ID Cache Interface</h4>
597
598 The ID Cache interface (silcidcache.h) has been moved from lib/silccore
599 into lib/silcapputil/.
600
601 <br />&nbsp;<br />
602 <h3><a name="skr"></a>SILC Key Repository library, lib/silcskr/</h3>
603
604 A new SILC Key Repository library has been added.  The library provides
605 a SILC Key Repository API (silcskr.h) which provides a repository for
606 storing and retrieving public keys.
607
608 <br />&nbsp;<br />
609 <h3><a name="vcard"></a>SILC VCard library, lib/silcvcard/</h3>
610
611 A new SILC VCard library has been added.  The SILC VCard API has been
612 moved from utility library to own library in lib/silcvcard/.
613
614 <br />&nbsp;<br />
615 <h3><a name="http"></a>SILC HTTP library, lib/silchttp/</h3>
616
617 A new SILC HTTP library has been added.  The library includes SILC HTTP
618 Server Interface and SILC HTTP PHP Translator Interface.
619
620 <h4>SILC HTTP Server Interface</h4>
621
622 The SILC HTTP Server API (silchttpservder.h) provides a simple HTTP
623 server implementation for applications that want to integrate a small
624 HTTP server.
625
626 <h4>SILC HTTP PHP Translator Interface</h4>
627
628 The SILC HTTP PHP Translator API (silchttpphp.h) provides PHP translates
629 PHP code into HTML.  It can be used to serve PHP pages in HTTP server.
630
631 <br />&nbsp;<br />
632 <h3><a name="asn1"></a>SILC ASN.1 library, lib/silcasn1/</h3>
633
634 A new Abstract Syntax Notation One (ASN.1) library has been added.  The
635 library provides SILC ASN.1 encoder and decoder interface and SILC BER
636 encoder and decoder interface.
637
638 <h4>SILC ASN.1 Interface</h4>
639
640 The SILC ASN.1 API (silcasn1.h) provides ASN.1 encoder and decoder.  The
641 interface provides efficient encoder and decoder and is support SilcStack
642 as memory source.  The interface is simple and it supports almost all ASN.1
643 features.
644
645 <h4>SILC BER Interface</h4>
646
647 The SILC BER API (silcber.h) provides BER/DER encoder and decoder.  It is
648 integral part of the ASN.1 library and the ASN.1 encoder and decoder.