6621298a97218b160ed42009767fab230122cc8f
[crypto.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_SIGNOFF<br />
355 SILC_NOTIFY_TYPE_SERVER_SIGNOFF<br />
356
357 <br />&nbsp;<br />
358 The basic changes in notify arguments from Toolkit 1.0 is that the
359 Toolkit 1.1 parses various lists and other raw data for the application as
360 opposed to sending them in the raw format.  This makes programming easier.
361
362 <h4>Command reply arguments</h4>
363
364 In Toolkit 1.1 the following command reply arguments have had changes.  See
365 the <a href="command_reply_args.html">Command Reply Arguments</a> for
366 details.  You should go through your application and change the handling
367 of the following command replies for Toolkit 1.1.
368
369 <br />&nbsp;<br />
370 SILC_COMMAND_WHOIS<br />
371 SILC_COMMAND_INVITE<br />
372 SILC_COMMAND_STATS<br />
373 SILC_COMMAND_JOIN<br />
374 SILC_COMMAND_CMODE<br />
375 SILC_COMMAND_BAN<br />
376 SILC_COMMAND_DETACH<br />
377 SILC_COMMAND_USERS<br />
378
379 <br />&nbsp;<br />
380 The basic changes in command reply arguments from Toolkit 1.0 is that the
381 Toolkit 1.1 parses various lists and other raw data for the application as
382 opposed to sending them in the raw format..  This makes programming easier.
383
384 <h4>Other changes in client library</h4>
385
386 There are many other smaller changes in Toolkit 1.1 that require you to
387 change your application when porting from Toolkit 1.0.  We are not listing
388 all of them here but briefly mention some API changes.
389
390 <br />&nbsp;<br />
391 Listing channel private keys now return SilcDList instead of an array.
392
393 <br />&nbsp;<br />
394 The key agreement API has changed a little bit and is now more cleaner and
395 supports all the features that are needed in full featured key agreement.
396 The silc_client_peform_key_agreement_fd has been replaced by
397 silc_client_perform_key_agreement_stream.
398
399 <br />&nbsp;<br />
400 The private message key API has slight changes also.  It is no longer
401 necessary for the caller to specify whether the private message key is for
402 responder or initiator use.
403
404 <br />&nbsp;<br />
405 The file transfer API has changed a little bit and is now more cleaner and
406 supports all the features that are needed in full featured file transfer.
407 It is now easier to send files when you are behind NAT when you can
408 specifically define the IPs that are used in both file sending and
409 receiving.
410
411 <br />&nbsp;<br />
412 As a new function silc_client_nickname_format can now be used to format
413 the nickname of a client entry.  The client library automatically formats
414 the nicknames but in some cases application might like to change the
415 nickname of a certain client entry.
416
417
418 <br />&nbsp;<br />
419 <h3><a name="util"></a>Utility library, lib/silcutil/</h3>
420
421 The Utility library (runtime library) has had several changes and has several
422 new interfaces.  Some interfaces has also been removed or moved to some
423 other library.  Removed interfaces rae: silcprotocol.h and silcsockconn.h.
424 Moved interfaces are: silcapputil.h and silcvcard.h.
425
426 <h4>SILC Async Operation Interface</h4>
427
428 A new asynchronous operation API (silcasync.h) has been added.  It can be
429 used to control asynchronous operations, like to cancel them.  Many
430 asynchronous routines in SILC Toolkit now return SilcAsyncOperation context
431 so that the operation can be controlled by the caller.  It especiallly
432 provides a generic way to cancel asynchronous operations which
433 can be difficult.
434
435 <h4>SILC Atomic Operations Interface</h4>
436
437 A new atomic operations API (silcatomic.h) has been added.  It provides
438 routines to perform various operations on integeres and pointers atomically.
439
440 <h4>SILC Data Stack Interface</h4>
441
442 A new data stack (memory pool system) API (silcstack.h) has been added.
443 It provides a fast memory allocation system.  Many routines in the SILC Toolkit
444 are SilcStack aware thus enabling them to use the SilcStack as their source
445 for memory allocation.  All routines that are SilcStack aware automatically
446 revert back to normal memory allocation if SilcStack is not given as
447 argument.  See silcstack.h for list of utility routines that support SilcStack
448 by default.
449
450 <h4>SILC Condition Variable Interface</h4>
451
452 A new condition variable API (silccond.h) has been added.  It provides
453 condition variables for multithreaded applications.
454
455 <h4>SILC Stream Interface</h4>
456
457 A new abstract stream API (silcstream.h) has been added.  The SilcStream
458 provides an abstract way of representing different kinds of streams.  The
459 API provides functions that can be used to read, write, control and destroy
460 streams.  The API is not used to create streams but separate interfaces
461 exist for streams that use the SilcStream abstraction.  For example,
462 socket stream and file descriptor stream exist.
463
464 <h4>SILC FD Stream Interface</h4>
465
466 A new file descriptor stream API (silcfdstream.h) has been added.  It
467 provides a blocking and non-blocking file descriptor stream through the
468 SilcStream abstraction.
469
470 <h4>SILC Socket Stream Interface</h4>
471
472 A new socket stream API (silcsocketstream.h) has been added.  It provides
473 a blocking and non-blocking socket stream through the SilcStream
474 abstraction.
475
476 <h4>SILC FSM Interface</h4>
477
478 A new Finite State Machine API (silcfsm.h) has been added.  It provides
479 an FSM that can be used to implement all kinds of machines and protocols.
480 The machine also supports threads, and threads that are actually executed
481 in real system threads.  The SILC FSM API also supports asynchronous
482 events.
483
484 <h4>SILC Time Interface</h4>
485
486 A new SILC Time API (silctime.h) has been added.  It provides utility
487 functions to retrieve and represent time in different ways.  It supports
488 Universal and Generalized time string creation and parsing and adds a new
489 SilcTime structure to represent time.
490
491 <h4>SILC Snprintf Interface</h4>
492
493 A new snprintf API (silcsnprintf.h) has been added.  It provides snprintf
494 and other string formatting routines.
495
496 <h4>SILC Mutex Interface changes</h4>
497
498 The SILC Mutex API (silcmutex) has several changes.  A support for read/write
499 locks has been added (SilcRwLock).  Also silc_mutex_assert_locked function
500 is added.
501
502 <h4>SILC Network Interface changes</h4>
503
504 The SILC Network API (silcnet.h) has several changes.  The API is almost
505 entirely rewritten and most of the old functions have been removed.  The
506 API has now both TCP and UDP support, and as previously supports IPv4
507 and IPv6.  New functions are silc_net_tcp_create_listener,
508 silc_net_listener_get_port, silc_net_close_listener, silc_net_tcp_connnect,
509 silc_net_udp_connect, silc_net_udp_receive, silc_net_udp_send.
510
511 <h4>SILC Scheduler Interface changes</h4>
512
513 The SILC Schedule API (silcschedule.h) has several changes.  The scheduler
514 has been entirely rewritten but most of the API remains the same.
515 The SILC_TASK_GENERIC and SILC_TASK_CALLBACK_GLOCAL have been removed.
516 The way signal are dispatched has been changed.  The SILC Schedule is now
517 able to itself dispatch all signals.  New functions are
518 silc_schedule_task_add_fd, silc_schedule_task_add_timeout,
519 silc_schedule_task_add_signal, silc_task_del_by_all,
520 silc_schedule_get_fd_events.  The functions silc_schedule_signal_register,
521 silc_schedule_signal_unregister and silc_schedule_signal_call have been
522 removed.
523
524 <h4>SILC Types Interface changes</h4>
525
526 The SILC Type API (silctypes.h) has several changes.  The bool type is
527 replaced with SilcBool.  Sockets are now represented by SilcSocket.
528
529 <h4>SILC String util Interface changes</h4>
530
531 The SILC string utility API (silcstrutil.h) has changes.  The PEM encoding
532 and decoding routines has been renamed, silc_base64_encode,
533 silc_base64_encode_file and silc_base64_decode.  The silc_mime_parse has
534 been removed.  A new silc_string_split function has been added.
535
536 <h4>SILC Utility Interface changes</h4>
537
538
539 <h4>SILC File Util Interface changes</h4>
540
541 The SILC file utility API (silcfileutil.h) has changes.  A new function
542 silc_file_set_nonblock has been added.
543
544 <h4>SILC List and Dynamic List Interface changes</h4>
545
546 The SILC List (silclist.h) and SILC Dynamic List (silcdlist.h) APIs have
547 changes. New functions silc_list_insert and silc_dlist_insert have been
548 added.
549
550 <h4>SILC Buffer Interface changes</h4>
551
552 The SILC Buffer API (silcbuffer.h) has several changes.  The SilcBuffer
553 structure no longer contain the buffer length and true length fields
554 but silc_buffer_len() and silc_buffr_truelen() macros are available
555 instead.  Also silc_buffer_data(), silc_buffer_datalen(), silc_buffer_purge(),
556 silc_buffer_reset(), silc_buffer_start(), silc_buffer_end() and
557 silc_buffer_enlarge() has been added.  The API also supports SilcStack.
558
559 <h4>SILC Buffer Formatting Interface changes</h4>
560
561 The SILC Buffer Formatting API (silcbuffmt.h) has several changes.  The
562 silc_buffer_format now automatically allocates memory to the destination
563 buffer if it does not have space.  Also new the following new formatters
564 have been added: SILC_STR_DATA (replaces SILC_STR_UI_XNSTRING),
565 SILC_STR_BUFFER, SILC_STR_FUNC, SILC_STF_OFFSET and SILC_STR_ADVANCE.
566 The API also supports SilcStack.
567
568 <h4>SILC Memory Interface changes</h4>
569
570 The memory allocation API (silcmemory.h) has several changes.  It supports
571 now SilcStack as memory source.  Also all memory allocation routines can
572 now fail and return NULL as opposed to fatally failing when memory allocation
573 fails.
574
575 <br />&nbsp;<br />
576 <h3><a name="apputil"></a>SILC Application Utility library, lib/silcapputil/</h3>
577
578 A new SILC Application Utility library has been added.  It provides
579 various application specific utility libraries that are not part of
580 the runtime library (lib/silcutil/).  The interfaces in the Application
581 utility library were in other libraries in Toolkit 1.0 and the library
582 does not contain any entirely new interfaces.
583
584 <h4>SILC Application Utility Interface</h4>
585
586 The silcapputil.h contains various application utility functions.  It
587 existed in Toolkit 1.0 but some of the APIs has been changed.  The
588 silc_create_key_pair, silc_load_key_pair and silc_show_public_key APIs
589 has changed.  A new silc_show_public_key_file has been added.  Functions
590 silc_identifier_check, silc_identifier_verify, silc_channel_name_check,
591 silc_channel_name_verify, silc_get_mode_list silc_get_status_message,
592 silc_get_packet_name, silc_get_command_name, silc_parse_version_string,
593 silc_version_to_num, silc_client_chmode, silc_client_chumode,
594 silc_client_chumode_char and silc_id_render has been moved from other
595 libraries into this interface in Toolkit 1.1.
596
597 <h4>SILC ID Cache Interface</h4>
598
599 The ID Cache interface (silcidcache.h) has been moved from lib/silccore
600 into lib/silcapputil/.
601
602 <br />&nbsp;<br />
603 <h3><a name="skr"></a>SILC Key Repository library, lib/silcskr/</h3>
604
605 A new SILC Key Repository library has been added.  The library provides
606 a SILC Key Repository API (silcskr.h) which provides a repository for
607 storing and retrieving public keys.
608
609 <br />&nbsp;<br />
610 <h3><a name="vcard"></a>SILC VCard library, lib/silcvcard/</h3>
611
612 A new SILC VCard library has been added.  The SILC VCard API has been
613 moved from utility library to own library in lib/silcvcard/.
614
615 <br />&nbsp;<br />
616 <h3><a name="http"></a>SILC HTTP library, lib/silchttp/</h3>
617
618 A new SILC HTTP library has been added.  The library includes SILC HTTP
619 Server Interface and SILC HTTP PHP Translator Interface.
620
621 <h4>SILC HTTP Server Interface</h4>
622
623 The SILC HTTP Server API (silchttpservder.h) provides a simple HTTP
624 server implementation for applications that want to integrate a small
625 HTTP server.
626
627 <h4>SILC HTTP PHP Translator Interface</h4>
628
629 The SILC HTTP PHP Translator API (silchttpphp.h) provides PHP translates
630 PHP code into HTML.  It can be used to serve PHP pages in HTTP server.
631
632 <br />&nbsp;<br />
633 <h3><a name="asn1"></a>SILC ASN.1 library, lib/silcasn1/</h3>
634
635 A new Abstract Syntax Notation One (ASN.1) library has been added.  The
636 library provides SILC ASN.1 encoder and decoder interface and SILC BER
637 encoder and decoder interface.
638
639 <h4>SILC ASN.1 Interface</h4>
640
641 The SILC ASN.1 API (silcasn1.h) provides ASN.1 encoder and decoder.  The
642 interface provides efficient encoder and decoder and is support SilcStack
643 as memory source.  The interface is simple and it supports almost all ASN.1
644 features.
645
646 <h4>SILC BER Interface</h4>
647
648 The SILC BER API (silcber.h) provides BER/DER encoder and decoder.  It is
649 integral part of the ASN.1 library and the ASN.1 encoder and decoder.