From 60ae9cc7a12541f01b596e9aa941144bdcbdce16 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Thu, 22 Feb 2007 14:35:50 +0000 Subject: [PATCH] Makefile fixes for Toolkit. --- CHANGES | 9 ++++ Makefile.ad | 3 ++ TODO | 11 ++-- apps/irssi/docs/help/in/cmode.in | 4 +- apps/irssi/silc.conf | 12 ++--- .../irssi/src/fe-common/silc/module-formats.c | 2 +- configure.ad | 50 ++++--------------- distdir/common | 1 + distdir/toolkit | 7 +-- includes/Makefile.ad | 4 -- lib/Makefile.ad | 40 ++++++++++----- lib/configure.ad | 3 ++ lib/contrib/Makefile.ad | 14 ------ lib/silc.pc.in | 1 - lib/silcapputil/Makefile.ad | 2 +- lib/silcclient.pc.in | 1 - lib/silccore/Makefile.ad | 1 + lib/silcske/Makefile.ad | 1 + lib/silcskr/silcskr.h | 12 +++++ lib/silcutil/Makefile.ad | 5 ++ lib/silcutil/symbian/Makefile.am | 21 ++++++++ 21 files changed, 110 insertions(+), 94 deletions(-) create mode 100644 lib/silcutil/symbian/Makefile.am diff --git a/CHANGES b/CHANGES index 2cdffa99..0eebc59d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +Wed Feb 21 17:01:01 EET 2007 Pekka Riikonen + + * Fixed WHOIS command and requested attributes handling in + client library. Affected files are lib/silcclient/command.c + and lib/silcclient/client_attrs.c. + + * Fixed silc_time_value to actually work. Added new function + silc_timezone. Affected files are lib/silcutil/silctime.[ch]. + Tue Feb 20 08:31:28 EET 2007 Pekka Riikonen * SILC Client 1.1 beta2. diff --git a/Makefile.ad b/Makefile.ad index e2a6a2c6..f9cacd91 100644 --- a/Makefile.ad +++ b/Makefile.ad @@ -36,6 +36,9 @@ SUBDIRS = \ EXTRA_DIST = \ silcdefs.h.in \ +#ifdef SILC_DIST_TOOLKIT + symbian \ +#endif SILC_DIST_TOOLKIT #ifdef SILC_DIST_SILC libtoolfix \ CHANGES CREDITS diff --git a/TODO b/TODO index 7b4de93e..6a1de9c1 100644 --- a/TODO +++ b/TODO @@ -27,14 +27,13 @@ lib/silcclient, The Client Library ***PARTLY DONE**** o Rewrite silc_client_get_clients_by_channel. - o Rewrite client side WHOIS command (for whois -details). + o Rewrite client side WHOIS command (for whois -details). (***DONE) o Finish all the missing SILC packet processings, rewrites. (***DONE) o The client_notify.c rewrite. (***DONE) - o Resuming to client_register.c (remove client_resume.c) - (***TESTING NEEDED) + o Resuming to client_register.c (remove client_resume.c) (***DONE) o Rekey rewrite. (***DONE) @@ -55,7 +54,7 @@ lib/silcclient, The Client Library ***PARTLY DONE**** o For many APIs leave the hash context allocations to the caller instead of using client->sha1hash and client->md5hash, or some kind of thread - safe (no locking) concept. + safe (no locking) concept. (***DONE) o Key agreement rewrite. (***TESTING NEEDED) @@ -63,7 +62,7 @@ lib/silcclient, The Client Library ***PARTLY DONE**** o peer-to-peer private messages - o Private message waiting API (in threads) + o Private message waiting API (in threads) (***TESING NEEDED) o client_attrs.c, attributes rewrite. (***TESTING NEEDED) @@ -136,6 +135,8 @@ lib/silcskr o Removing key from the repository is not possible currently. It should be. + o Add fingerprint as search constraint. + lib/silcske/silcske.[ch] ****DONE**** ======================== diff --git a/apps/irssi/docs/help/in/cmode.in b/apps/irssi/docs/help/in/cmode.in index ccf77840..7d8f0763 100644 --- a/apps/irssi/docs/help/in/cmode.in +++ b/apps/irssi/docs/help/in/cmode.in @@ -11,7 +11,9 @@ that mode. Other modes both channel operator and founder may manage. The following modes are available: p Set/unset channel as private channel - s Set/unset channel as secret channel + s Set/unset channel as secret channel. Secret + channel are not shown in user's channel list + or with /LIST command. k Enable/disable channel private key usage (*) i Set/unset channel as invite only channel t Set/unset that only channel operator or diff --git a/apps/irssi/silc.conf b/apps/irssi/silc.conf index 30cc7c5f..ed2655a0 100644 --- a/apps/irssi/silc.conf +++ b/apps/irssi/silc.conf @@ -192,26 +192,26 @@ statusbar = { # You can set the default cipher, hash function and HMAC to be used # as setting as well. You can set it here or use the /SET command. # +# /set crypto_default_cipher +# /set crypto_default_hash +# /set crypto_default_hmac +# # Available ciphers are (default: aes-256-cbc): # +# aes-256-ctr, aes-192-ctr, aes-128-ctr, # aes-256-cbc, aes-192-cbc, aes-128-cbc, # twofish-256-cbc, twofish-192-cbc, twofish-128-cbc, # cast-256-cbc, cast-192-cbc and cast-128-cbc # # Available hash functions are (default: sha1): # -# sha1 and md5 +# sha256, sha1 and md5 # # Available HMAC's are (default: hmac-sha1-96): # # hmac-sha1-96, hmac-md5-96, hmac-sha1 and hmac-md5 # settings = { - "server" = { - crypto_default_cipher = "aes-256-ctr"; - crypto_default_hash = "sha1"; - crypto_default_hmac = "hmac-sha1-96"; - }; "fe-common/core" = { autocreate_own_query = "yes"; use_status_window = "no"; diff --git a/apps/irssi/src/fe-common/silc/module-formats.c b/apps/irssi/src/fe-common/silc/module-formats.c index 291f001b..422e7c29 100644 --- a/apps/irssi/src/fe-common/silc/module-formats.c +++ b/apps/irssi/src/fe-common/silc/module-formats.c @@ -234,7 +234,7 @@ FORMAT_REC fecommon_silc_formats[] = { { "attr_geolocation", " Geolocation : $0", 1, { 0 } }, { "attr_device_info", " Device Info : $0", 1, { 0 } }, { "attr_public_keys", " Public keys : $0", 1, { 0 } }, - { "attr_timezone", " Timezone : $0", 1, { 0 } }, + { "attr_timezone", " Timezone (GMT) : $0", 1, { 0 } }, { "attr_timezone_allow", " Sending timezone : $0", 1, { 0 } }, { "attr_user_sign_verified", " User's signature : verified successfully", 0 }, { "attr_user_sign_failed", " User's signature : {hilight signature failed}", 0 }, diff --git a/configure.ad b/configure.ad index 61260822..c8c73e81 100644 --- a/configure.ad +++ b/configure.ad @@ -4,7 +4,7 @@ # Author: Pekka Riikonen # # Copyright (C) 2000 - 2007 Pekka Riikonen -# +s# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. @@ -182,7 +182,7 @@ AC_CHECK_FUNCS(poll select listen bind shutdown close connect setsockopt) AC_CHECK_FUNCS(setrlimit time ctime utime gettimeofday getrusage) AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror) AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid) -AC_CHECK_FUNCS(setgroups initgroups nl_langinfo nanosleep) +AC_CHECK_FUNCS(setgroups initgroups nl_langinfo nanosleep tzset) AC_CHECK_FUNCS(strchr snprintf strstr strcpy strncpy memcpy memset memmove) #ifdef SILC_DIST_SIM @@ -1187,38 +1187,9 @@ AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue) # AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue) -#ifdef SILC_DIST_TOOLKIT -# --with-irssi -# -without_irssi=true -AC_MSG_CHECKING(whether to compile Irssi SILC Client) -AC_ARG_WITH(irssi, - [ --with-irssi compile with Irssi SILC Client], - [ - AC_MSG_RESULT(yes) - without_irssi=false - ], - [ - AC_MSG_RESULT(no) - without_irssi=true - ]) -AM_CONDITIONAL(with_irssi, test xwithout_irssi = xfalse) - -# --with-silcd -# -without_silcd=true -AC_MSG_CHECKING(whether to compile SILC Server) -AC_ARG_WITH(silcd, - [ --with-silcd compile with SILC Server], - [ - AC_MSG_RESULT(yes) - without_silcd=false - ], - [ - AC_MSG_RESULT(no) - without_silcd=true - ]) -#endif SILC_DIST_TOOLKIT +#ifdef SILC_DIST_SERVER +without_silcd=false +#endif SILC_DIST_SERVER #ifdef SILC_DIST_CLIENT AM_CONDITIONAL(with_irssi, true) #endif SILC_DIST_CLIENT @@ -1343,20 +1314,17 @@ echo " include directory .............: $s_includedir" #endif SILC_DIST_INCLUDES echo "" -#ifdef SILC_DIST_TOOLKIT +#ifdef SILC_DIST_CLIENT if test x$without_irssi = xtrue; then irssi="no" fi -if test x$without_silcd = xtrue; then - silcd="no" -fi -#endif SILC_DIST_TOOLKIT - -#ifdef SILC_DIST_CLIENT echo " Compile SILC Client ...........: $irssi" #endif SILC_DIST_CLIENT #ifdef SILC_DIST_SERVER +if test x$without_silcd = xtrue; then + silcd="no" +fi echo " Compile SILC Server ...........: $silcd" #endif SILC_DIST_SERVER diff --git a/distdir/common b/distdir/common index 6c1714d1..37871e6f 100644 --- a/distdir/common +++ b/distdir/common @@ -10,6 +10,7 @@ define SILC_DIST_SFTP define SILC_DIST_COMPILER define SILC_DIST_IDCACHE define SILC_DIST_VCARD +define SILC_DIST_CRYPTO # Math library, define only TMA or TFM, not both. define SILC_DIST_MATH diff --git a/distdir/toolkit b/distdir/toolkit index 3f37196d..5593b895 100644 --- a/distdir/toolkit +++ b/distdir/toolkit @@ -4,8 +4,6 @@ bug-report silc-devel@lists.silcnet.org # Inherits inherit common -#inherit client -#inherit server # License license distdir/TOOLKIT @@ -15,10 +13,7 @@ license-header distdir/GPL-header distdir/TOOLKIT-header # Distdefs define SILC_DIST_TOOLKIT -# SFTP is undefined in server, so force it here -define SILC_DIST_SFTP define SILC_DIST_CLIENTLIB -#XXX remove define SILC_DIST_HTTP # Includes @@ -26,7 +21,6 @@ include README.CVS include README.WIN32 include README.MACOSX include apps/silcer -include apps/silc include tutorial # Noprocess to optimize packaging and avoid re-licensing of certain files @@ -34,6 +28,7 @@ noprocess COPYING GPL BSD noprocess doc/toolkit/ noprocess apps/ noprocess win32/ +noprocess symbian/ pre-hook distdir/pre-run post-process-dist-hook distdir/post-process-dist diff --git a/includes/Makefile.ad b/includes/Makefile.ad index 0a26283c..b682a39c 100644 --- a/includes/Makefile.ad +++ b/includes/Makefile.ad @@ -22,8 +22,6 @@ include_HEADERS = \ silc.h \ silcwin32.h \ silcsymbian.h \ - silcbeos.h \ - silcos2.h \ silcversion.h #endif SILC_DIST_TOOLKIT @@ -31,7 +29,5 @@ EXTRA_DIST = \ silc.h \ silcwin32.h \ silcsymbian.h \ - silcbeos.h \ - silcos2.h \ silcversion.h.in \ silcdistdefs.h diff --git a/lib/Makefile.ad b/lib/Makefile.ad index 96d83d42..47844fa6 100644 --- a/lib/Makefile.ad +++ b/lib/Makefile.ad @@ -23,7 +23,9 @@ SILCLIB_DIRS = \ silccore \ silcutil \ silcapputil \ +#ifdef SILC_DIST_CRYPTO silccrypt \ +#endif SILC_DIST_CRYPTO #ifdef SILC_DIST_SKR silcskr \ #endif SILC_DIST_SKR @@ -63,13 +65,11 @@ SILCSERVERLIB = libsilcserver.a SUBDIRS = $(SILCLIB_DIRS) $(SILCSERVERLIB_DIRS) $(SILCCLIENTLIB_DIRS) -CLEANFILES = libsilc.a libsilcclient.a libsilcserver.a -DISTCLEANFILES = libsilc.a libsilcclient.a libsilcserver.a +CLEANFILES = libsilc.a $(SILCCLIENTLIB) $(SILCSERVERLIB) +DISTCLEANFILES = libsilc.a $(SILCCLIENTLIB) $(SILCSERVERLIB) remove: - -rm -f libsilc.a - -rm -f libsilcclient.a - -rm -f libsilcserver.a + -rm -f $(CLEANFILES) all: $(MAKE) remove $(SILCLIB) $(SILCSERVERLIB) $(SILCCLIENTLIB) @@ -78,11 +78,15 @@ all: install-exec-hook: -mkdir -p $(DESTDIR)$(libdir) -$(LIBTOOL) $(INSTALL) libsilc.la $(DESTDIR)$(libdir)/ +#ifdef SILC_DIST_CLIENTLIB -$(LIBTOOL) $(INSTALL) libsilcclient.la $(DESTDIR)$(libdir)/ +#endif SILC_DIST_CLIENTLIB +#ifdef SILC_DIST_SERVERLIB -$(LIBTOOL) $(INSTALL) libsilcserver.la $(DESTDIR)$(libdir)/ +#endif SILC_DIST_SERVERLIB #else !SILC_DIST_TOOLKIT -#ifdef SILC_DIST_SERVER +#ifdef SILC_DIST_SERVERLIB install-exec-hook: if SILC_ENABLE_SHARED -mkdir -p $(libdir) @@ -91,9 +95,9 @@ if SILC_ENABLE_SHARED -rm -rf $(DESTDIR)$(libdir)/libsilc.a -rm -rf $(DESTDIR)$(libdir)/libsilcserver.a endif -#endif SILC_DIST_SERVER +#endif SILC_DIST_SERVERLIB -#ifdef SILC_DIST_CLIENT +#ifdef SILC_DIST_CLIENTLIB install-exec-hook: if SILC_ENABLE_SHARED -mkdir -p $(libdir) @@ -102,7 +106,7 @@ if SILC_ENABLE_SHARED -rm -rf $(DESTDIR)$(libdir)/libsilc.a -rm -rf $(DESTDIR)$(libdir)/libsilcclient.a endif -#endif SILC_DIST_CLIENT +#endif SILC_DIST_CLIENTLIB #endif SILC_DIST_TOOLKIT LIB_BASE_VERSION=@LIB_BASE_VERSION@ @@ -142,12 +146,22 @@ libsilcserver.a: #ifdef SILC_DIST_TOOLKIT pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = silc.pc silcclient.pc silcserver.pc +pkgconfig_DATA = silc.pc \ +#ifdef SILC_DIST_CLIENTLIB + silcclient.pc \ +#endif SILC_DIST_CLIENTLIB +#ifdef SILC_DIST_SERVERLIB + silcserver.pc +#endif SILC_DIST_SERVERLIB -EXTRA_DIST = silc.pc.in silcclient.pc.in silcserver.pc.in -#endif SILC_DIST_TOOLKIT +EXTRA_DIST = silc.pc.in \ +#ifdef SILC_DIST_CLIENTLIB + silcclient.pc.in \ +#endif SILC_DIST_CLIENTLIB +#ifdef SILC_DIST_SERVERLIB + silcserver.pc.in +#endif SILC_DIST_SERVERLIB -#ifdef SILC_DIST_TOOLKIT toolkit-install: -mkdir -p $(docdir)/toolkit/ -$(INSTALL_DATA) $(top_srcdir)/doc/toolkit/* $(docdir)/toolkit diff --git a/lib/configure.ad b/lib/configure.ad index 6da5e7c5..cce9aea8 100644 --- a/lib/configure.ad +++ b/lib/configure.ad @@ -26,7 +26,9 @@ AC_MSG_NOTICE([Configuring SILC libraries]) # SILC Library directories SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/contrib" SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccore" +#ifdef SILC_DIST_CRYPTO SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silccrypt" +#endif SILC_DIST_CRYPTO #ifdef SILC_DIST_MATH SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcmath" #endif SILC_DIST_MATH @@ -228,6 +230,7 @@ lib/silcske/Makefile lib/silcutil/Makefile lib/silcutil/unix/Makefile lib/silcutil/win32/Makefile +lib/silcutil/symbian/Makefile lib/silcapputil/Makefile #ifdef SILC_DIST_SFTP lib/silcsftp/Makefile diff --git a/lib/contrib/Makefile.ad b/lib/contrib/Makefile.ad index 60055fd1..1fab5f70 100644 --- a/lib/contrib/Makefile.ad +++ b/lib/contrib/Makefile.ad @@ -33,20 +33,6 @@ else libcontrib_la_SOURCES = getopti.c $(STRINGPREP) $(REGEX) endif -#ifdef SILC_DIST_TOOLKIT -if HAVE_REGEX -REGEXH = -else -REGEXH = regexpr.h -endif -include_HEADERS = \ - $(REGEXH) \ - getopti.h \ - gunicomp.h \ - gunidecomp.h \ - stringprep.h -#endif SILC_DIST_TOOLKIT - EXTRA_DIST = *.c *.h include $(top_srcdir)/Makefile.defines.in diff --git a/lib/silc.pc.in b/lib/silc.pc.in index 947bcbc0..695eceec 100644 --- a/lib/silc.pc.in +++ b/lib/silc.pc.in @@ -6,7 +6,6 @@ includedir=@includedir@ Name: @PACKAGE@ Description: SILC Library Version: @VERSION@ -Conflicts: libsilc <= 0.9.12 Libs: -L${libdir} -lsilc @LIBS@ Cflags: -I${includedir} diff --git a/lib/silcapputil/Makefile.ad b/lib/silcapputil/Makefile.ad index 5bd58063..b33be032 100644 --- a/lib/silcapputil/Makefile.ad +++ b/lib/silcapputil/Makefile.ad @@ -32,7 +32,7 @@ include_HEADERS = \ silcidcache.h #endif SILC_DIST_IDCACHE -SILC_EXTRA_DIST = tests +SILC_EXTRA_DIST = #endif SILC_DIST_TOOLKIT EXTRA_DIST = *.h $(SILC_EXTRA_DIST) diff --git a/lib/silcclient.pc.in b/lib/silcclient.pc.in index d0437b05..94b5ab37 100644 --- a/lib/silcclient.pc.in +++ b/lib/silcclient.pc.in @@ -6,7 +6,6 @@ includedir=@includedir@ Name: @PACKAGE@ (client library) Description: SILC Client Library Version: @VERSION@ -Conflicts: libsilc <= 0.9.12 Requires: silc = @VERSION@ Libs: -L${libdir} -lsilcclient @LIBS@ Cflags: -I${includedir} diff --git a/lib/silccore/Makefile.ad b/lib/silccore/Makefile.ad index db653271..5adef653 100644 --- a/lib/silccore/Makefile.ad +++ b/lib/silccore/Makefile.ad @@ -37,6 +37,7 @@ include_HEADERS = \ silcauth.h \ silcchannel.h \ silcmessage.h \ + silcmessage_i.h \ silccommand.h \ silcid.h \ silcmode.h \ diff --git a/lib/silcske/Makefile.ad b/lib/silcske/Makefile.ad index 0c54eb5f..98b8803d 100644 --- a/lib/silcske/Makefile.ad +++ b/lib/silcske/Makefile.ad @@ -30,6 +30,7 @@ include_HEADERS = \ silcske_groups.h \ silcske_payload.h \ silcske.h \ + silcske_i.h \ silcconnauth.h #endif SILC_DIST_TOOLKIT diff --git a/lib/silcskr/silcskr.h b/lib/silcskr/silcskr.h index 8fe975bd..63293ea9 100644 --- a/lib/silcskr/silcskr.h +++ b/lib/silcskr/silcskr.h @@ -491,6 +491,18 @@ SilcBool silc_skr_find_set_usage(SilcSKRFind find, SilcSKRKeyUsage usage); * to return found keys. If this returns NULL the finding was not * asynchronous, and the `callback' has been called already. * + * EXAMPLE + * + * SilcSKRFind find; + * + * // Find all SILC public keys originating from Finland + * find = silc_skr_find_alloc(); + * silc_skr_find_set_pkcs_type(find, SILC_PKCS_SILC); + * silc_skr_find_set_country(find, "FI"); + * + * // Find + * silc_skr_find(skr, find, find_callback, cb_context); + * ***/ SilcAsyncOperation silc_skr_find(SilcSKR skr, SilcSKRFind find, SilcSKRFindCallback callback, diff --git a/lib/silcutil/Makefile.ad b/lib/silcutil/Makefile.ad index 0c92bc3b..b685a75f 100644 --- a/lib/silcutil/Makefile.ad +++ b/lib/silcutil/Makefile.ad @@ -81,7 +81,10 @@ include_HEADERS = \ silclog_i.h \ silcmemory.h \ silcmutex.h \ + silcatomic.h \ + silccond.h \ silcnet.h \ + silcnet_i.h \ silcschedule.h \ silcschedule_i.h \ silcthread.h \ @@ -96,10 +99,12 @@ include_HEADERS = \ silcstream.h \ silcfdstream.h \ silcsocketstream.h \ + silcsocketstream_i.h \ silcfsm.h \ silcfsm_i.h \ silctime.h \ silcmime.h \ + silcmime_i.h \ silcasync.h \ silcasync_i.h \ silcstack.h \ diff --git a/lib/silcutil/symbian/Makefile.am b/lib/silcutil/symbian/Makefile.am new file mode 100644 index 00000000..f1ad0c4c --- /dev/null +++ b/lib/silcutil/symbian/Makefile.am @@ -0,0 +1,21 @@ +# +# Makefile.am +# +# Author: Pekka Riikonen +# +# Copyright (C) 2007 Pekka Riikonen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign + +include $(top_srcdir)/Makefile.defines.in -- 2.24.0