[Fedora-directory-commits] mod_nss mod_nss.h, 1.15, 1.16 nss_engine_config.c, 1.12, 1.13 nss_engine_pphrase.c, 1.6, 1.7
by Doctor Conrad
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23125
Modified Files:
mod_nss.h nss_engine_config.c nss_engine_pphrase.c
Log Message:
204138
Add new NSSPassPhraseDialog method, defer, where only the tokens that
are found in the file pointed to by this directive are initialized.
Otherwise every token that NSS finds it attempts to authenticate.
Syntax is: NSSPassPhraseDialog defer:/path/to/password.conf
Index: mod_nss.h
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mod_nss.h 9 Aug 2006 20:11:45 -0000 1.15
+++ mod_nss.h 25 Aug 2006 20:19:48 -0000 1.16
@@ -200,6 +200,7 @@
SSL_PPTYPE_UNSET = UNSET,
SSL_PPTYPE_BUILTIN = 0,
SSL_PPTYPE_FILE = 1,
+ SSL_PPTYPE_DEFER = 2,
} nss_pphrase_t;
/*
Index: nss_engine_config.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_config.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- nss_engine_config.c 5 Jul 2006 15:20:00 -0000 1.12
+++ nss_engine_config.c 25 Aug 2006 20:19:48 -0000 1.13
@@ -546,12 +546,18 @@
mc->pphrase_dialog_type = SSL_PPTYPE_BUILTIN;
mc->pphrase_dialog_path = NULL;
}
- else if ((arglen > 5) && strEQn(arg, "file:", 5)) {
+ else if (((arglen > 5) && strEQn(arg, "file:", 5)) ||
+ ((arglen > 6) && strEQn(arg, "defer:", 6))) {
apr_finfo_t finfo;
apr_status_t rc;
- mc->pphrase_dialog_type = SSL_PPTYPE_FILE;
- mc->pphrase_dialog_path = ap_server_root_relative(cmd->pool, arg+5);
+ if (strEQn(arg, "file:", 5)) {
+ mc->pphrase_dialog_type = SSL_PPTYPE_FILE;
+ mc->pphrase_dialog_path = ap_server_root_relative(cmd->pool, arg+5);
+ } else {
+ mc->pphrase_dialog_type = SSL_PPTYPE_DEFER;
+ mc->pphrase_dialog_path = ap_server_root_relative(cmd->pool, arg+6);
+ }
if (!mc->pphrase_dialog_path)
return apr_pstrcat(cmd->pool,
"Invalid NSSPassPhraseDialog file: path ",
@@ -631,6 +637,10 @@
seed->nSrc = SSL_RSSRC_EXEC;
seed->cpPath = ap_server_root_relative(mc->pPool, arg2+5);
}
+ else if ((arg2len > 6) && strEQn(arg2, "defer:", 6)) {
+ seed->nSrc = SSL_RSSRC_FILE;
+ seed->cpPath = ap_server_root_relative(mc->pPool, arg2+5);
+ }
else if (strcEQ(arg2, "builtin")) {
seed->nSrc = SSL_RSSRC_BUILTIN;
seed->cpPath = NULL;
Index: nss_engine_pphrase.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_pphrase.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- nss_engine_pphrase.c 20 Jun 2006 20:25:20 -0000 1.6
+++ nss_engine_pphrase.c 25 Aug 2006 20:19:48 -0000 1.7
@@ -74,6 +74,15 @@
continue;
}
+ if (parg->mc->pphrase_dialog_type == SSL_PPTYPE_DEFER) {
+ char * passwd = nss_get_password(stdin, stdout, slot, nss_check_password, parg);
+ if (passwd == NULL) {
+ PK11_FreeSlot(slot);
+ continue;
+ }
+ free(passwd);
+ }
+
ret = PK11_Authenticate(slot, PR_TRUE, parg);
if (SECSuccess != ret) {
status = SECFailure;
@@ -209,7 +218,8 @@
token_name = PK11_GetTokenName(slot);
- if (parg->mc->pphrase_dialog_type == SSL_PPTYPE_FILE) {
+ if (parg->mc->pphrase_dialog_type == SSL_PPTYPE_FILE ||
+ parg->mc->pphrase_dialog_type == SSL_PPTYPE_DEFER) {
/* Try to get the passwords from the password file if it exists.
* THIS IS UNSAFE and is provided for convenience only. Without this
* capability the server would have to be started in foreground mode.
@@ -235,6 +245,14 @@
}
}
+ /* For SSL_PPTYPE_DEFER we only want to authenticate passwords found
+ * in the password file.
+ */
+ if ((parg->mc->pphrase_dialog_type == SSL_PPTYPE_DEFER) &&
+ (pwdstr == NULL)) {
+ return NULL;
+ }
+
/* This purposely comes after the file check because that is more
* authoritative.
*/
16 years, 9 months
[Fedora-directory-commits] coolkey configure,1.4,1.5
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26763
Modified Files:
configure
Log Message:
Keep the Linux version as the checked in version of configure
Index: configure
===================================================================
RCS file: /cvs/dirsec/coolkey/configure,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configure 25 Aug 2006 00:31:39 -0000 1.4
+++ configure 25 Aug 2006 00:55:29 -0000 1.5
@@ -20861,10 +20861,9 @@
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
16 years, 9 months
[Fedora-directory-commits] coolkey/src/coolkey Makefile.am, 1.3, 1.4 Makefile.in, 1.4, 1.5
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey/src/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26618/src/coolkey
Modified Files:
Makefile.am Makefile.in
Log Message:
Complete the windows build.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/coolkey/src/coolkey/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.am 18 Aug 2006 00:41:42 -0000 1.3
+++ Makefile.am 25 Aug 2006 00:31:40 -0000 1.4
@@ -51,7 +51,7 @@
libcoolkeypk11_la_LDFLAGS = -module -avoid-version -export-symbols coolkeypk11.sym -no-undefined
libcoolkeypk11_la_CPPFLAGS = $(CPPFLAGS) -DNSS_HIDE_NONSTANDARD_OBJECTS=1 -I$(top_srcdir)/src/libckyapplet $(PCSC_CFLAGS) $(ZLIB_CFLAGS)
libcoolkeypk11_la_DEPENDENCIES = coolkeypk11.sym
-libcoolkeypk11_la_LIBADD = @LIBCKYAPPLET@ $(ZLIB_LIBRARY)
+libcoolkeypk11_la_LIBADD = @LIBCKYAPPLET@ $(ZLIB_LIBS)
#
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/coolkey/src/coolkey/Makefile.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile.in 18 Aug 2006 16:04:43 -0000 1.4
+++ Makefile.in 25 Aug 2006 00:31:40 -0000 1.5
@@ -258,7 +258,7 @@
libcoolkeypk11_la_LDFLAGS = -module -avoid-version -export-symbols coolkeypk11.sym -no-undefined
libcoolkeypk11_la_CPPFLAGS = $(CPPFLAGS) -DNSS_HIDE_NONSTANDARD_OBJECTS=1 -I$(top_srcdir)/src/libckyapplet $(PCSC_CFLAGS) $(ZLIB_CFLAGS)
libcoolkeypk11_la_DEPENDENCIES = coolkeypk11.sym
-libcoolkeypk11_la_LIBADD = @LIBCKYAPPLET@ $(ZLIB_LIBRARY)
+libcoolkeypk11_la_LIBADD = @LIBCKYAPPLET@ $(ZLIB_LIBS)
all: all-recursive
.SUFFIXES:
16 years, 9 months
[Fedora-directory-commits] coolkey README, NONE, 1.1 aclocal.m4, 1.1.1.1, 1.2 config.h, 1.1.1.1, 1.2 config.status, 1.4, 1.5 configure, 1.3, 1.4 configure.in, 1.4, 1.5 libtool, 1.2, 1.3 ltmain.sh, 1.1.1.1, 1.2
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26618
Modified Files:
aclocal.m4 config.h config.status configure configure.in
libtool ltmain.sh
Added Files:
README
Log Message:
Complete the windows build.
--- NEW FILE README ---
Building:
Linux/Unix:
autoconf
./configure
If you need to modify the Makefiles, automake 1.9.6 was used. Makefile.am is
included in the source.
------------------------------------------------------------------------------
Mac OS X:
------------------------------------------------------------------------------
Windows:
Prereqs -
Microsoft Visual C++ and Platform SDK.
Install as normal. Make sure INCLUDE and LIB are set appropriately.
These are available at (http://msdn.microsoft.com/visualc/)
Cygwin
Install as normal. You'll need base, the shell, autoconf-2.5x, cvs*...
This can be downloaded at (http://www.cygwin.com)
ZLib
Download ZLib source an binaries from here (http://www.zlib.org)
Unzip into a known directory (like c:/zlib)
Set ZLIB_INCLUDE to the location of the include files (e.g. c:/zlib/include)
and ZLIB_LIB to the location of the export libraries (e.g. c:/zlib/lib)
Once everything is installed, start a cygwin shell.
1. checkout the coolkey source
2. Make sure the environment variables INCLUDE, LIB, ZLIB_INCLUDE, and ZLIB_LIB
are defined.
3. Make sure the Visual C++ tools are in your path.
In the root directory type:
autoconf-2.5x
./configure
make
NOTE: Make install does not work on windows. You'll need to fetch
src/libckyapplet/.lib/libckyapplet-1.dll
src/coolkeypk11/.lib/libcookeypk11.dll
and
zlib1.dll from your zlibdirectory and install it in your windows system32
directory.
* This may not be a full list. If you discover additional packages which are
needed please let us know.
Index: aclocal.m4
===================================================================
RCS file: /cvs/dirsec/coolkey/aclocal.m4,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- aclocal.m4 9 Jun 2006 18:31:31 -0000 1.1.1.1
+++ aclocal.m4 25 Aug 2006 00:31:39 -0000 1.2
@@ -3032,7 +3032,7 @@
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -LD -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -3041,7 +3041,11 @@
echo EXPORTS > $output_objdir/$soname.def;
cat $export_symbols >> $output_objdir/$soname.def;
fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ #
+ # Hack... gcc and lc are quite different, we can use either for cygwin
+ # try to get a line that both are happy with...
+ #
+ $CC -LD -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker '
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
Index: config.h
===================================================================
RCS file: /cvs/dirsec/coolkey/config.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- config.h 9 Jun 2006 18:31:38 -0000 1.1.1.1
+++ config.h 25 Aug 2006 00:31:39 -0000 1.2
@@ -5,7 +5,7 @@
#define DEBUG 1
/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
+/* #undef HAVE_DLFCN_H */
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
@@ -14,7 +14,7 @@
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
+/* #undef HAVE_INTTYPES_H */
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
@@ -27,7 +27,7 @@
#define HAVE_MEMSET 1
/* Have PC/SC implementation */
-#define HAVE_PCSC 1
+/* #undef HAVE_PCSC */
/* old version of pc/sc-lite */
/* #undef HAVE_PCSC_OLD */
@@ -41,7 +41,7 @@
/* #undef HAVE_STAT_EMPTY_STRING_BUG */
/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
+/* #undef HAVE_STDINT_H */
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -53,13 +53,13 @@
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
+/* #undef HAVE_STRINGS_H */
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <syslog.h> header file. */
-#define HAVE_SYSLOG_H 1
+/* #undef HAVE_SYSLOG_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
@@ -68,14 +68,14 @@
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
+/* #undef HAVE_UNISTD_H */
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
/* Name of package */
#define PACKAGE "coolkey"
Index: config.status
===================================================================
RCS file: /cvs/dirsec/coolkey/config.status,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- config.status 18 Aug 2006 16:04:42 -0000 1.4
+++ config.status 25 Aug 2006 00:31:39 -0000 1.5
@@ -484,31 +484,31 @@
s,@ECHO_C@,,;t t
s,@ECHO_N@,-n,;t t
s,@ECHO_T@,,;t t
-s,@LIBS@,-ldl -lz ,;t t
-s,@build@,i686-redhat-linux-gnu,;t t
+s,@LIBS@,,;t t
+s,@build@,i686-pc-cygwin,;t t
s,@build_cpu@,i686,;t t
-s,@build_vendor@,redhat,;t t
-s,@build_os@,linux-gnu,;t t
-s,@host@,i686-redhat-linux-gnu,;t t
+s,@build_vendor@,pc,;t t
+s,@build_os@,cygwin,;t t
+s,@host@,i686-pc-cygwin,;t t
s,@host_cpu@,i686,;t t
-s,@host_vendor@,redhat,;t t
-s,@host_os@,linux-gnu,;t t
-s,@target@,i686-redhat-linux-gnu,;t t
+s,@host_vendor@,pc,;t t
+s,@host_os@,cygwin,;t t
+s,@target@,i686-pc-cygwin,;t t
s,@target_cpu@,i686,;t t
-s,@target_vendor@,redhat,;t t
-s,@target_os@,linux-gnu,;t t
+s,@target_vendor@,pc,;t t
+s,@target_os@,cygwin,;t t
s,@INSTALL_PROGRAM@,${INSTALL},;t t
s,@INSTALL_SCRIPT@,${INSTALL},;t t
s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
-s,@CYGPATH_W@,echo,;t t
+s,@CYGPATH_W@,cygpath -w,;t t
s,@PACKAGE@,coolkey,;t t
s,@VERSION(a),1.1.0,;t t
-s,@ACLOCAL@,${SHELL} /builds/fedora/coolkey/missing --run aclocal-1.9,;t t
-s,@AUTOCONF@,${SHELL} /builds/fedora/coolkey/missing --run autoconf,;t t
-s,@AUTOMAKE@,${SHELL} /builds/fedora/coolkey/missing --run automake-1.9,;t t
-s,@AUTOHEADER@,${SHELL} /builds/fedora/coolkey/missing --run autoheader,;t t
-s,@MAKEINFO@,${SHELL} /builds/fedora/coolkey/missing --run makeinfo,;t t
-s,@install_sh@,/builds/fedora/coolkey/install-sh,;t t
+s,@ACLOCAL@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run aclocal-1.9,;t t
+s,@AUTOCONF@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run autoconf,;t t
+s,@AUTOMAKE@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run automake-1.9,;t t
+s,@AUTOHEADER@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run autoheader,;t t
+s,@MAKEINFO@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run makeinfo,;t t
+s,@install_sh@,/cygdrive/c/builds/fedora/coolkey/install-sh,;t t
s,@STRIP@,strip,;t t
s,@ac_ct_STRIP@,strip,;t t
s,@INSTALL_STRIP_PROGRAM@,${SHELL} $(install_sh) -c -s,;t t
@@ -516,34 +516,34 @@
s,@AWK@,gawk,;t t
s,@SET_MAKE@,,;t t
s,@am__leading_dot(a),.,;t t
-s,@AMTAR@,${SHELL} /builds/fedora/coolkey/missing --run tar,;t t
+s,@AMTAR@,${SHELL} /cygdrive/c/builds/fedora/coolkey/missing --run tar,;t t
s,@am__tar@,${AMTAR} chof - "$$tardir",;t t
s,@am__untar@,${AMTAR} xf -,;t t
s,@MAINTAINER_MODE_TRUE@,#,;t t
s,@MAINTAINER_MODE_FALSE@,,;t t
s,@MAINT@,#,;t t
-s,@CC@,gcc,;t t
-s,@CFLAGS@,-g -O2,;t t
+s,@CC@,cl,;t t
+s,@CFLAGS@,-g,;t t
s,@LDFLAGS@,,;t t
-s,@CPPFLAGS@,,;t t
-s,@ac_ct_CC@,gcc,;t t
-s,@EXEEXT@,,;t t
-s,@OBJEXT@,o,;t t
+s,@CPPFLAGS@, -DWIN32,;t t
+s,@ac_ct_CC@,cl,;t t
+s,@EXEEXT(a),.exe,;t t
+s,@OBJEXT@,obj,;t t
s,@DEPDIR(a),.deps,;t t
s,@am__include@,include,;t t
s,@am__quote@,,;t t
s,@AMDEP_TRUE@,,;t t
s,@AMDEP_FALSE@,#,;t t
s,@AMDEPBACKSLASH@,\,;t t
-s,@CCDEPMODE@,depmode=gcc3,;t t
-s,@am__fastdepCC_TRUE@,,;t t
-s,@am__fastdepCC_FALSE@,#,;t t
-s,@CXX@,g++,;t t
-s,@CXXFLAGS@,-g -O2,;t t
-s,@ac_ct_CXX@,g++,;t t
-s,@CXXDEPMODE@,depmode=gcc3,;t t
-s,@am__fastdepCXX_TRUE@,,;t t
-s,@am__fastdepCXX_FALSE@,#,;t t
+s,@CCDEPMODE@,depmode=none,;t t
+s,@am__fastdepCC_TRUE@,#,;t t
+s,@am__fastdepCC_FALSE@,,;t t
+s,@CXX@,cl,;t t
+s,@CXXFLAGS@, /EHsc,;t t
+s,@ac_ct_CXX@,,;t t
+s,@CXXDEPMODE@,depmode=none,;t t
+s,@am__fastdepCXX_TRUE@,#,;t t
+s,@am__fastdepCXX_FALSE@,,;t t
s,@EGREP@,grep -E,;t t
s,@LN_S@,ln -s,;t t
s,@ECHO@,echo,;t t
@@ -551,22 +551,24 @@
s,@ac_ct_AR@,ar,;t t
s,@RANLIB@,ranlib,;t t
s,@ac_ct_RANLIB@,ranlib,;t t
-s,@CPP@,gcc -E,;t t
-s,@CXXCPP@,g++ -E,;t t
+s,@CPP@,cl -E,;t t
+s,@CXXCPP@,cl -E,;t t
s,@F77@,,;t t
s,@FFLAGS@,,;t t
s,@ac_ct_F77@,,;t t
s,@LIBTOOL@,$(SHELL) $(top_builddir)/libtool,;t t
s,@LIBCKYAPPLET(a),${top_builddir}/src/libckyapplet/libckyapplet.la,;t t
-s,@PCSC_CFLAGS@,-pthread -I/usr/include/PCSC ,;t t
-s,@PCSC_LIBS@,-lpcsclite ,;t t
-s,@SCARD_LIB_NAME(a),libpcsclite.so.1,;t t
s,@PKG_CONFIG@,/usr/bin/pkg-config,;t t
s,@ac_pt_PKG_CONFIG@,/usr/bin/pkg-config,;t t
-s,@HAVE_PCSC_TRUE@,,;t t
-s,@HAVE_PCSC_FALSE@,#,;t t
-s,@LIBOBJS@,,;t t
-s,@LTLIBOBJS@,,;t t
+s,@PCSC_CFLAGS@,,;t t
+s,@PCSC_LIBS@,,;t t
+s,@ZLIB_CFLAGS@,-Ic:/zlib,;t t
+s,@ZLIB_LIBS@,c:/zlib/zlib.dll,;t t
+s,@SCARD_LIB_NAME(a),winscard.dll,;t t
+s,@HAVE_PCSC_TRUE@,#,;t t
+s,@HAVE_PCSC_FALSE@,,;t t
+s,@LIBOBJS@, ${LIBOBJDIR}lstat$U.obj,;t t
+s,@LTLIBOBJS@, ${LIBOBJDIR}lstat$U.lo,;t t
CEOF
# Split the substitutions into bite-sized pieces for seds with
@@ -889,26 +891,14 @@
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_STDINT_H${ac_dB}HAVE_STDINT_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_DLFCN_H${ac_dB}HAVE_DLFCN_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_LIBZ${ac_dB}HAVE_LIBZ${ac_dC}1${ac_dD}
-${ac_dA}HAVE_LIBDL${ac_dB}HAVE_LIBDL${ac_dC}1${ac_dD}
-${ac_dA}HAVE_PCSC${ac_dB}HAVE_PCSC${ac_dC}1${ac_dD}
${ac_dA}DEBUG${ac_dB}DEBUG${ac_dC}1${ac_dD}
${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_SYSLOG_H${ac_dB}HAVE_SYSLOG_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_FCNTL_H${ac_dB}HAVE_FCNTL_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
-${ac_dA}HAVE_ZLIB_H${ac_dB}HAVE_ZLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_MALLOC${ac_dB}HAVE_MALLOC${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_REALLOC${ac_dB}HAVE_REALLOC${ac_dC}1${ac_dD}
-${ac_dA}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_dB}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_dC}1${ac_dD}
${ac_dA}HAVE_VPRINTF${ac_dB}HAVE_VPRINTF${ac_dC}1${ac_dD}
${ac_dA}HAVE_MEMSET${ac_dB}HAVE_MEMSET${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRDUP${ac_dB}HAVE_STRDUP${ac_dC}1${ac_dD}
@@ -939,39 +929,18 @@
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_STDINT_H${ac_uB}HAVE_STDINT_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_DLFCN_H${ac_uB}HAVE_DLFCN_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_LIBZ${ac_uB}HAVE_LIBZ${ac_uC}1${ac_uD}
-${ac_uA}HAVE_LIBDL${ac_uB}HAVE_LIBDL${ac_uC}1${ac_uD}
-${ac_uA}HAVE_PCSC${ac_uB}HAVE_PCSC${ac_uC}1${ac_uD}
${ac_uA}DEBUG${ac_uB}DEBUG${ac_uC}1${ac_uD}
${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_SYSLOG_H${ac_uB}HAVE_SYSLOG_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_FCNTL_H${ac_uB}HAVE_FCNTL_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
-${ac_uA}HAVE_ZLIB_H${ac_uB}HAVE_ZLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_MALLOC${ac_uB}HAVE_MALLOC${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_REALLOC${ac_uB}HAVE_REALLOC${ac_uC}1${ac_uD}
-${ac_uA}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_uB}LSTAT_FOLLOWS_SLASHED_SYMLINK${ac_uC}1${ac_uD}
${ac_uA}HAVE_VPRINTF${ac_uB}HAVE_VPRINTF${ac_uC}1${ac_uD}
${ac_uA}HAVE_MEMSET${ac_uB}HAVE_MEMSET${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRDUP${ac_uB}HAVE_STRDUP${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRERROR${ac_uB}HAVE_STRERROR${ac_uC}1${ac_uD}
-CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-
- cat >$tmp/undefs.sed <<CEOF
-/^[ ]*#[ ]*undef/!b
-t clr
-: clr
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
CEOF
sed -f $tmp/undefs.sed $tmp/in >$tmp/out
Index: configure
===================================================================
RCS file: /cvs/dirsec/coolkey/configure,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- configure 10 Jun 2006 00:51:08 -0000 1.3
+++ configure 25 Aug 2006 00:31:39 -0000 1.4
@@ -463,7 +463,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE EGREP LN_S E!
CHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBCKYAPPLET PCSC_CFLAGS PCSC_LIBS SCARD_LIB_NAME PKG_CONFIG ac_pt_PKG_CONFIG HAVE_PCSC_TRUE HAVE_PCSC_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE EGREP LN_S E!
CHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBCKYAPPLET PKG_CONFIG ac_pt_PKG_CONFIG PCSC_CFLAGS PCSC_LIBS ZLIB_CFLAGS ZLIB_LIBS SCARD_LIB_NAME HAVE_PCSC_TRUE HAVE_PCSC_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1059,7 +1059,7 @@
both]
--with-tags[=TAGS]
include additional configurations [automatic]
- --with-pcsclite=PATH use PC/SC Lite in PATH
+ --with-pcsclite Use pcsc-lite (default=yes)
Some influential environment variables:
CC C compiler command
@@ -2092,6 +2092,52 @@
fi
+
+#
+# ./config does a poor job of dealing with native OS stuff other than
+# unix, detect Windows and mac and do something a little more OS
+# friendly
+WINDOWS=0
+MAC=0
+UNIX=0
+echo "$as_me:$LINENO: checking platform type: " >&5
+echo $ECHO_N "checking platform type: ... $ECHO_C" >&6
+case "$host" in
+*-*-win*|*-*-cygwin*)
+ echo "$as_me:$LINENO: result: Windows" >&5
+echo "${ECHO_T}Windows" >&6
+ WINDOWS=1
+ ZLIB_CFLAGS=-Ic:/zlib
+ ZLIB_LIBS=c:/zlib/zlib.dll
+ #OS_FLAGS=`echo $INCLUDE | tr '[[:upper:]]' '[[:lower:]]' | sed -e 's;\\\\;/;g' -e 's;.:;/cygdrive/&/;g' -e 's;:;;g' -e 's;//;/;g' -e 's/;/\" -I\"/g' -e 's;^;-I\";' -e 's;$;\";'`
+ CPPFLAGS="$CPPFLAGS $OS_FLAGS -DWIN32"
+ LDFLAGS="$LDFLAGS"
+ { echo "$as_me:$LINENO: WARNING: changing CPPFLAGS = $CPPFLAGS " >&5
+echo "$as_me: WARNING: changing CPPFLAGS = $CPPFLAGS " >&2;};
+ SCARD_LIB_NAME="winscard.dll"
+ # override config defaults for windows
+ CC=cl
+ CXX=cl
+ CXXFLAGS="$CXXFLAGS /EHsc"
+ ;;
+*-*-darwin*)
+ echo "$as_me:$LINENO: result: MAC" >&5
+echo "${ECHO_T}MAC" >&6
+ MAC=1
+ SCARD_LIB_NAME="PCSC.Framework/PCSC"
+ PCSC_MSG=yes
+ PCSC_CFLAGS=""
+ PCSC_LIBS="-Wl,-framework,PCSC"
+ ;;
+*)
+ echo "$as_me:$LINENO: result: UNIX/LINUX" >&5
+echo "${ECHO_T}UNIX/LINUX" >&6
+ UNIX=1
+ # should look it up on the local system
+ SCARD_LIB_NAME="libpcsclite.so.1"
+ ;;
+esac
+
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -4227,7 +4273,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4230 "configure"' > conftest.$ac_ext
+ echo '#line 4276 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5362,7 +5408,7 @@
# Provide some information about the compiler.
-echo "$as_me:5365:" \
+echo "$as_me:5411:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6425,11 +6471,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6428: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6474: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6432: \$? = $ac_status" >&5
+ echo "$as_me:6478: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6693,11 +6739,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6696: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6742: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6700: \$? = $ac_status" >&5
+ echo "$as_me:6746: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6797,11 +6843,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6800: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6846: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6804: \$? = $ac_status" >&5
+ echo "$as_me:6850: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8266,7 +8312,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 8269 "configure"' > conftest.$ac_ext
+ echo '#line 8315 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9163,7 +9209,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9166 "configure"
+#line 9212 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9263,7 +9309,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9266 "configure"
+#line 9312 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10479,7 +10525,7 @@
enable_shared_with_static_runtimes_CXX=yes
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds_CXX='$CC -LD -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
@@ -10488,7 +10534,11 @@
echo EXPORTS > $output_objdir/$soname.def;
cat $export_symbols >> $output_objdir/$soname.def;
fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ #
+ # Hack... gcc and lc are quite different, we can use either for cygwin
+ # try to get a line that both are happy with...
+ #
+ $CC -LD -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker '
else
ld_shlibs_CXX=no
fi
@@ -11603,11 +11653,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11606: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11656: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11610: \$? = $ac_status" >&5
+ echo "$as_me:11660: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11707,11 +11757,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11710: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11760: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11714: \$? = $ac_status" >&5
+ echo "$as_me:11764: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12243,7 +12293,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 12246 "configure"' > conftest.$ac_ext
+ echo '#line 12296 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -13298,11 +13348,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13301: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13351: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13305: \$? = $ac_status" >&5
+ echo "$as_me:13355: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13402,11 +13452,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13405: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13455: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13409: \$? = $ac_status" >&5
+ echo "$as_me:13459: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14851,7 +14901,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 14854 "configure"' > conftest.$ac_ext
+ echo '#line 14904 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -15626,11 +15676,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15629: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15679: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15633: \$? = $ac_status" >&5
+ echo "$as_me:15683: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15894,11 +15944,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15897: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15947: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15901: \$? = $ac_status" >&5
+ echo "$as_me:15951: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15998,11 +16048,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16001: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16051: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16005: \$? = $ac_status" >&5
+ echo "$as_me:16055: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17467,7 +17517,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 17470 "configure"' > conftest.$ac_ext
+ echo '#line 17520 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -18778,6 +18828,7 @@
# Checks for libraries.
+if test $WINDOWS -ne 1; then
echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
echo $ECHO_N "checking for uncompress in -lz... $ECHO_C" >&6
@@ -18934,47 +18985,22 @@
{ (exit 1); exit 1; }; }
fi
+fi
# add our compiled static libraries
LIBCKYAPPLET="\${top_builddir}/src/libckyapplet/libckyapplet.la"
-PCSC_MSG=no
-pcsc_path=/usr
-
-
-
-
-case "$host" in
-*-*-win*)
- SCARD_LIB_NAME="winscard.dll"
- ;;
-*-*-darwin*)
- SCARD_LIB_NAME="PCSC.Framework/PCSC"
- PCSC_MSG=yes
- PCSC_CFLAGS=""
- PCSC_LIBS="-Wl,-framework,PCSC"
- ;;
-*)
- # should look it up on the local system
- SCARD_LIB_NAME="libpcsclite.so.1"
- ;;
-esac
-
-saved_LIBS="$LIBS"
-saved_CFLAGS="$CFLAGS"
-saved_LDFLAGS="$LDFLAGS"
-saved_CPPFLAGS="$CPPFLAGS"
# Check whether --with-pcsclite or --without-pcsclite was given.
if test "${with_pcsclite+set}" = set; then
withval="$with_pcsclite"
- pcsc_path=$withval
+
fi;
-if test "x$pcsc_path" = "xno"; then
- PCSC_MSG="no"
-fi
-if test "x$pcsc_path" != "xno" -a "x$PCSC_MSG" != "xyes"; then
+if test "$with_pcsclite" = "no" -o "$with_pcsclite" = "false"
+then
+ with_pcsclite=no
+else
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
@@ -19139,297 +19165,52 @@
# Put the nasty error message in config.log where it belongs
echo "$PCSC_PKG_ERRORS" >&5
-
- echo "$as_me:$LINENO: checking for PC/SC Lite support (old style)" >&5
-echo $ECHO_N "checking for PC/SC Lite support (old style)... $ECHO_C" >&6
- for pcscdir in "" /PCSC; do
- CPPFLAGS="$saved_CPPFLAGS"
- LDFLAGS="$saved_LDFLAGS"
- LIBS="-lpcsclite $saved_LIBS"
- PCSC_CFLAGS=""
-
- for pcsc_libdir in $pcsc_path/lib$pcscdir \
- $pcsc_path$pcscdir/lib \
- $pcsc_path$pcscdir; do
- if test -d $pcsc_libdir; then
- if test -n "${need_dash_r}"; then
- LDFLAGS="-R${pcsc_libdir}/ ${LDFLAGS}"
- fi
- LDFLAGS="-L${pcsc_libdir} ${LDFLAGS}"
- fi
- done
-
- for pcsc_incdir in $pcsc_path/include$pcscdir \
- $pcsc_path$pcscdir/include \
- $pcsc_path$pcscdir; do
- if test -d $pcsc_incdir; then
- PCSC_CFLAGS="-I${pcsc_incdir}"
- break;
- fi
- done
-
- CPPFLAGS="${PCSC_CFLAGS} ${CPPFLAGS}"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <winscard.h>
-int
-main ()
-{
-SCardEstablishContext(0, NULL, NULL, NULL);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_pcsclite_SCardEstablishContext=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "x$ac_cv_lib_pcsclite_SCardEstablishContext" = "xyes"; then
- PCSC_MSG=yes
- break;
- fi
- CPPFLAGS="$saved_CPPFLAGS"
- LDFLAGS="$saved_LDFLAGS"
- LIBS="$saved_LIBS"
- PCSC_CFLAGS=""
- done
- echo "$as_me:$LINENO: result: $PCSC_MSG" >&5
-echo "${ECHO_T}$PCSC_MSG" >&6
- if test "x$PCSC_MSG" = "xyes" ; then
- PCSC_LIBS="-lpcsclite"
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- fi
+ if test -f /usr/local/lib/pkgconfig/libpcsclite.pc ; then
+ { { echo "$as_me:$LINENO: error: use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure" >&5
+echo "$as_me: error: use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me:$LINENO: WARNING: pcsc-lite not found" >&5
+echo "$as_me: WARNING: pcsc-lite not found" >&2;}
+ with_pcsclite=no
+ fi
elif test $pkg_failed = untried; then
-
- echo "$as_me:$LINENO: checking for PC/SC Lite support (old style)" >&5
-echo $ECHO_N "checking for PC/SC Lite support (old style)... $ECHO_C" >&6
- for pcscdir in "" /PCSC; do
- CPPFLAGS="$saved_CPPFLAGS"
- LDFLAGS="$saved_LDFLAGS"
- LIBS="-lpcsclite $saved_LIBS"
- PCSC_CFLAGS=""
-
- for pcsc_libdir in $pcsc_path/lib$pcscdir \
- $pcsc_path$pcscdir/lib \
- $pcsc_path$pcscdir; do
- if test -d $pcsc_libdir; then
- if test -n "${need_dash_r}"; then
- LDFLAGS="-R${pcsc_libdir}/ ${LDFLAGS}"
- fi
- LDFLAGS="-L${pcsc_libdir} ${LDFLAGS}"
- fi
- done
-
- for pcsc_incdir in $pcsc_path/include$pcscdir \
- $pcsc_path$pcscdir/include \
- $pcsc_path$pcscdir; do
- if test -d $pcsc_incdir; then
- PCSC_CFLAGS="-I${pcsc_incdir}"
- break;
- fi
- done
-
- CPPFLAGS="${PCSC_CFLAGS} ${CPPFLAGS}"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <winscard.h>
-int
-main ()
-{
-SCardEstablishContext(0, NULL, NULL, NULL);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_pcsclite_SCardEstablishContext=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "x$ac_cv_lib_pcsclite_SCardEstablishContext" = "xyes"; then
- PCSC_MSG=yes
- break;
- fi
- CPPFLAGS="$saved_CPPFLAGS"
- LDFLAGS="$saved_LDFLAGS"
- LIBS="$saved_LIBS"
- PCSC_CFLAGS=""
- done
- echo "$as_me:$LINENO: result: $PCSC_MSG" >&5
-echo "${ECHO_T}$PCSC_MSG" >&6
- if test "x$PCSC_MSG" = "xyes" ; then
- PCSC_LIBS="-lpcsclite"
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- fi
+ if test -f /usr/local/lib/pkgconfig/libpcsclite.pc ; then
+ { { echo "$as_me:$LINENO: error: use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure" >&5
+echo "$as_me: error: use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me:$LINENO: WARNING: pcsc-lite not found" >&5
+echo "$as_me: WARNING: pcsc-lite not found" >&2;}
+ with_pcsclite=no
+ fi
else
PCSC_CFLAGS=$pkg_cv_PCSC_CFLAGS
PCSC_LIBS=$pkg_cv_PCSC_LIBS
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-
- PCSC_MSG="yes"
- echo "$as_me:$LINENO: result: $PCSC_MSG" >&5
-echo "${ECHO_T}$PCSC_MSG" >&6
-
+ with_pcsclite=yes
fi
fi
-if test "x$PCSC_MSG" = "xyes"; then
- HAVE_PCSC_TRUE=
- HAVE_PCSC_FALSE='#'
-else
- HAVE_PCSC_TRUE='#'
- HAVE_PCSC_FALSE=
-fi
-
-if test "x$PCSC_MSG" = "xyes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCSC 1
-_ACEOF
-
-else
- PCSC_LIBS=""
- PCSC_CFLAGS=""
-fi
-
-if test "x$PCSC_MSG" = "xyes"; then
- CPPFLAGS="${PCSC_CFLAGS} $saved_CPPFLAGS"
- CFLAGS="$PCSC_CFLAGS $saved_CFLAGS"
- LIBS="$PCSC_LIBS $saved_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdlib.h>
-#ifdef __APPLE__
-#include <PCSC/wintypes.h>
-#include <PCSC/winscard.h>
-#else
-#include <winscard.h>
-#endif
-
-int
-main ()
-{
-
-SCardControl(NULL, NULL, 0, NULL, NULL);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCSC_OLD 1
-_ACEOF
+if test x$with_pcsclite = xyes; then
+ HAVE_PCSC_TRUE=
+ HAVE_PCSC_FALSE='#'
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="$saved_CPPFLAGS"
- CFLAGS="$saved_CFLAGS"
- LIBS="$saved_LIBS"
+ HAVE_PCSC_TRUE='#'
+ HAVE_PCSC_FALSE=
fi
+
cat >>confdefs.h <<\_ACEOF
#define DEBUG 1
_ACEOF
@@ -21080,9 +20861,10 @@
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -21732,11 +21514,13 @@
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@LIBCKYAPPLET@,$LIBCKYAPPLET,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@PCSC_CFLAGS@,$PCSC_CFLAGS,;t t
s,@PCSC_LIBS@,$PCSC_LIBS,;t t
+s,@ZLIB_CFLAGS@,$ZLIB_CFLAGS,;t t
+s,@ZLIB_LIBS@,$ZLIB_LIBS,;t t
s,@SCARD_LIB_NAME@,$SCARD_LIB_NAME,;t t
-s,@PKG_CONFIG@,$PKG_CONFIG,;t t
-s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@HAVE_PCSC_TRUE@,$HAVE_PCSC_TRUE,;t t
s,@HAVE_PCSC_FALSE@,$HAVE_PCSC_FALSE,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
Index: configure.in
===================================================================
RCS file: /cvs/dirsec/coolkey/configure.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configure.in 18 Aug 2006 16:03:31 -0000 1.4
+++ configure.in 25 Aug 2006 00:31:39 -0000 1.5
@@ -55,7 +55,7 @@
AC_MSG_RESULT([Windows])
WINDOWS=1
ZLIB_CFLAGS=-Ic:/zlib
- ZLIB_LIB=c:/zlib/zlib.dll
+ ZLIB_LIBS=c:/zlib/zlib.dll
#OS_FLAGS=`echo $INCLUDE | tr '[[:upper:]]' '[[:lower:]]' | sed -e 's;\\\\;/;g' -e 's;.:;/cygdrive/&/;g' -e 's;:;;g' -e 's;//;/;g' -e 's/;/\" -I\"/g' -e 's;^;-I\";' -e 's;$;\";'`
CPPFLAGS="$CPPFLAGS $OS_FLAGS -DWIN32"
LDFLAGS="$LDFLAGS"
Index: libtool
===================================================================
RCS file: /cvs/dirsec/coolkey/libtool,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- libtool 9 Jun 2006 21:56:34 -0000 1.2
+++ libtool 25 Aug 2006 00:31:39 -0000 1.3
@@ -30,10 +30,10 @@
# the same distribution terms that you use for the rest of that program.
# A sed program that does not truncate output.
-SED="/bin/sed"
+SED="/usr/bin/sed"
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="/bin/sed -e 1s/^X//"
+Xsed="/usr/bin/sed -e 1s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
@@ -44,7 +44,7 @@
# ### BEGIN LIBTOOL CONFIG
-# Libtool was configured on host jordan.sfbay.redhat.com:
+# Libtool was configured on host relyea2:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
@@ -56,23 +56,23 @@
build_old_libs=yes
# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=no
+build_libtool_need_lc=yes
# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=no
+allow_libtool_libs_with_static_runtimes=yes
# Whether or not to optimize for fast installation.
fast_install=yes
# The host system.
host_alias=
-host=i686-redhat-linux-gnu
-host_os=linux-gnu
+host=i686-pc-cygwin
+host_os=cygwin
# The build system.
build_alias=
-build=i686-redhat-linux-gnu
-build_os=linux-gnu
+build=i686-pc-cygwin
+build_os=cygwin
# An echo program that does not interpret backslashes.
echo="echo"
@@ -82,22 +82,22 @@
AR_FLAGS="cru"
# A C compiler.
-LTCC="gcc"
+LTCC="cl"
# LTCC compiler flags.
-LTCFLAGS="-g -O2"
+LTCFLAGS="-g"
# A language-specific compiler.
-CC="gcc"
+CC="cl"
# Is the compiler the GNU C compiler?
-with_gcc=yes
+with_gcc=
# An ERE matcher.
EGREP="grep -E"
# The linker used to build libraries.
-LD="/usr/bin/ld"
+LD="/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
@@ -128,32 +128,32 @@
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
# How to pass a linker flag through the compiler.
-wl="-Wl,"
+wl=""
# Object file suffix (normally "o").
-objext="o"
+objext="obj"
# Old archive suffix (normally "a").
-libext="a"
+libext="lib"
# Shared library suffix (normally ".so").
-shrext='.so'
+shrext='.dll'
# Executable file suffix (normally "").
exeext=""
# Additional compiler flags for building library objects.
-pic_flag=" -fPIC -DPIC"
+pic_flag=" -DPIC"
pic_mode=default
# What is the maximum length of a command?
-max_cmd_len=32768
+max_cmd_len=8192
# Does compiler simultaneously support -c and -o options?
-compiler_c_o="yes"
+compiler_c_o="no"
# Must we lock files when doing compilation?
-need_locks="no"
+need_locks="yes"
# Do we need the lib prefix for modules?
need_lib_prefix=no
@@ -171,36 +171,36 @@
dlopen_self_static=unknown
# Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
+link_static_flag=""
# Compiler flag to turn off builtin functions.
-no_builtin_flag=" -fno-builtin"
+no_builtin_flag=""
# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="\${wl}--export-dynamic"
+export_dynamic_flag_spec=""
# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+whole_archive_flag_spec=""
# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=""
# Library versioning type.
-version_type=linux
+version_type=windows
# Format of library name prefix.
libname_spec="lib\$name"
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
-library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
+library_names_spec="\${libname}\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext} \$libname.lib"
# The coded name of the library, if different from the real name.
-soname_spec="\${libname}\${release}\${shared_ext}\$major"
+soname_spec=""
# Commands used to build and install an old-style archive.
RANLIB="ranlib"
-old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
+old_archive_cmds="lib /OUT:\$oldlib\$oldobjs\$old_deplibs"
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""
@@ -211,11 +211,8 @@
old_archive_from_expsyms_cmds=""
# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
- cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
- \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
- \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
+archive_cmds="\$CC -o \$lib \$libobjs \$compiler_flags \\\`echo \\\"\$deplibs\\\" | \$SED -e 's/ -lc\$//'\\\` -link -dll~linknames="
+archive_expsym_cmds=""
postinstall_cmds=""
postuninstall_cmds=""
@@ -248,25 +245,25 @@
compiler_lib_search_path=""
# Method to check whether dependent libraries are shared objects.
-deplibs_check_method="pass_all"
+deplibs_check_method="file_magic ^x86 archive import|^x86 DLL"
# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd="\$MAGIC_CMD"
+file_magic_cmd="func_win32_libid"
# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=""
+allow_undefined_flag="unsupported"
# Flag that forces no undefined symbols.
no_undefined_flag=""
# Commands used to finish a libtool library installation in a directory.
-finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+finish_cmds=""
# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=""
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
+global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*_\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 _\\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
@@ -275,23 +272,23 @@
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
# This is the shared library runtime path variable.
-runpath_var=LD_RUN_PATH
+runpath_var=
# This is the shared library path variable.
-shlibpath_var=LD_LIBRARY_PATH
+shlibpath_var=PATH
# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=no
+shlibpath_overrides_runpath=unknown
# How to hardcode a shared library path into an executable.
hardcode_action=immediate
# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=yes
+hardcode_into_libs=no
# Flag to hardcode $libdir into a binary during linking.
# This must work even if $libdir does not exist.
-hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
+hardcode_libdir_flag_spec=" "
# If ld is used when linking, flag to hardcode $libdir into
# a binary during linking. This must work even if $libdir does
@@ -319,19 +316,19 @@
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
-variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+variables_saved_for_relink="PATH PATH "
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=unknown
# Compile-time system search path for libraries
-sys_lib_search_path_spec=" /usr/lib/gcc/i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../ /lib/i386-redhat-linux/4.1.0/ /lib/ /usr/lib/i386-redhat-linux/4.1.0/ /usr/lib/"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mysql /usr/lib/mysql /usr/lib/qt-3.3/lib /usr/X11R6/lib /usr/lib/mysql /usr/lib/wine "
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
# Fix the shell variable $srcfile for the compiler.
-fix_srcfile_path=""
+fix_srcfile_path="`cygpath -w "$srcfile"`"
# Set to yes if exported symbols are required.
always_export_symbols=no
@@ -1931,6 +1928,12 @@
continue
;;
+ *$shrext)
+ # A shared library
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
*.la)
# A libtool-controlled library.
@@ -2263,6 +2266,12 @@
continue
;;
*.la) lib="$deplib" ;;
+ *$shrext)
+ if test "$pass" = link -a "$shrext" = ".dll"; then
+ deplib=`echo $deplib | sed -e 's;'$shrext'\$;.'$libext';'`
+ fi
+ deplibs="$deplib $deplibs"
+ continue;;
*.$libext)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
@@ -6651,7 +6660,7 @@
# End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX
-# Libtool was configured on host jordan.sfbay.redhat.com:
+# Libtool was configured on host relyea2:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
@@ -6666,20 +6675,20 @@
build_libtool_need_lc=no
# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=no
+allow_libtool_libs_with_static_runtimes=yes
# Whether or not to optimize for fast installation.
fast_install=yes
# The host system.
host_alias=
-host=i686-redhat-linux-gnu
-host_os=linux-gnu
+host=i686-pc-cygwin
+host_os=cygwin
# The build system.
build_alias=
-build=i686-redhat-linux-gnu
-build_os=linux-gnu
+build=i686-pc-cygwin
+build_os=cygwin
# An echo program that does not interpret backslashes.
echo="echo"
@@ -6689,22 +6698,22 @@
AR_FLAGS="cru"
# A C compiler.
-LTCC="gcc"
+LTCC="cl"
# LTCC compiler flags.
-LTCFLAGS="-g -O2"
+LTCFLAGS="-g"
# A language-specific compiler.
-CC="g++"
+CC="cl"
# Is the compiler the GNU C compiler?
-with_gcc=yes
+with_gcc=no
# An ERE matcher.
EGREP="grep -E"
# The linker used to build libraries.
-LD="/usr/bin/ld"
+LD="/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
@@ -6735,32 +6744,32 @@
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
# How to pass a linker flag through the compiler.
-wl="-Wl,"
+wl=""
# Object file suffix (normally "o").
-objext="o"
+objext="obj"
# Old archive suffix (normally "a").
-libext="a"
+libext="lib"
# Shared library suffix (normally ".so").
-shrext='.so'
+shrext='.dll'
# Executable file suffix (normally "").
exeext=""
# Additional compiler flags for building library objects.
-pic_flag=" -fPIC -DPIC"
+pic_flag=" -DPIC"
pic_mode=default
# What is the maximum length of a command?
-max_cmd_len=32768
+max_cmd_len=8192
# Does compiler simultaneously support -c and -o options?
-compiler_c_o="yes"
+compiler_c_o="no"
# Must we lock files when doing compilation?
-need_locks="no"
+need_locks="yes"
# Do we need the lib prefix for modules?
need_lib_prefix=no
@@ -6778,36 +6787,36 @@
dlopen_self_static=unknown
# Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
+link_static_flag=""
# Compiler flag to turn off builtin functions.
-no_builtin_flag=" -fno-builtin"
+no_builtin_flag=""
# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="\${wl}--export-dynamic"
+export_dynamic_flag_spec=""
# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+whole_archive_flag_spec=""
# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=""
# Library versioning type.
-version_type=linux
+version_type=windows
# Format of library name prefix.
libname_spec="lib\$name"
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
-library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
+library_names_spec="\${libname}\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext} \$libname.lib"
# The coded name of the library, if different from the real name.
-soname_spec="\${libname}\${release}\${shared_ext}\$major"
+soname_spec=""
# Commands used to build and install an old-style archive.
RANLIB="ranlib"
-old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
+old_archive_cmds="lib /OUT:\$oldlib\$oldobjs\$old_deplibs"
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""
@@ -6818,8 +6827,18 @@
old_archive_from_expsyms_cmds=""
# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
+archive_cmds="\$CC -LD -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker"
+archive_expsym_cmds="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
+ cp \$export_symbols \$output_objdir/\$soname.def;
+ else
+ echo EXPORTS > \$output_objdir/\$soname.def;
+ cat \$export_symbols >> \$output_objdir/\$soname.def;
+ fi~
+ #
+ # Hack... gcc and lc are quite different, we can use either for cygwin
+ # try to get a line that both are happy with...
+ #
+ \$CC -LD -shared -nostdlib \$output_objdir/\$soname.def \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker "
postinstall_cmds=""
postuninstall_cmds=""
@@ -6833,11 +6852,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects="/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.0/crtbeginS.o"
+predep_objects=""
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects="/usr/lib/gcc/i386-redhat-linux/4.1.0/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../crtn.o"
+postdep_objects=""
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -6845,32 +6864,32 @@
# Dependencies to place after the objects being linked to create a
# shared library.
-postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
+postdeps=""
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path="-L/usr/lib/gcc/i386-redhat-linux/4.1.0 -L/usr/lib/gcc/i386-redhat-linux/4.1.0 -L/usr/lib/gcc/i386-redhat-linux/4.1.0/../../.."
+compiler_lib_search_path=""
# Method to check whether dependent libraries are shared objects.
-deplibs_check_method="pass_all"
+deplibs_check_method="file_magic ^x86 archive import|^x86 DLL"
# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd="\$MAGIC_CMD"
+file_magic_cmd="func_win32_libid"
# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=""
+allow_undefined_flag="unsupported"
# Flag that forces no undefined symbols.
no_undefined_flag=""
# Commands used to finish a libtool library installation in a directory.
-finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+finish_cmds=""
# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=""
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
+global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*_\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 _\\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
@@ -6879,23 +6898,23 @@
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
# This is the shared library runtime path variable.
-runpath_var=LD_RUN_PATH
+runpath_var=
# This is the shared library path variable.
-shlibpath_var=LD_LIBRARY_PATH
+shlibpath_var=PATH
# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=no
+shlibpath_overrides_runpath=unknown
# How to hardcode a shared library path into an executable.
hardcode_action=immediate
# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=yes
+hardcode_into_libs=no
# Flag to hardcode $libdir into a binary during linking.
# This must work even if $libdir does not exist.
-hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
+hardcode_libdir_flag_spec="-L\$libdir"
# If ld is used when linking, flag to hardcode $libdir into
# a binary during linking. This must work even if $libdir does
@@ -6923,16 +6942,16 @@
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
-variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+variables_saved_for_relink="PATH PATH "
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=unknown
# Compile-time system search path for libraries
-sys_lib_search_path_spec=" /usr/lib/gcc/i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../i386-redhat-linux/4.1.0/ /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../ /lib/i386-redhat-linux/4.1.0/ /lib/ /usr/lib/i386-redhat-linux/4.1.0/ /usr/lib/"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mysql /usr/lib/mysql /usr/lib/qt-3.3/lib /usr/X11R6/lib /usr/lib/mysql /usr/lib/wine "
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@@ -6941,7 +6960,7 @@
always_export_symbols=no
# The commands to list exported symbols.
-export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGRS] /s/.* \\\\([^ ]*\\\\)/\\\\1 DATA/;/^.* __nm__/s/^.* __nm__\\\\([^ ]*\\\\) [^ ]*/\\\\1 DATA/;/^I /d;/^[AITW] /s/.* //' | sort | uniq > \$export_symbols"
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=""
Index: ltmain.sh
===================================================================
RCS file: /cvs/dirsec/coolkey/ltmain.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ltmain.sh 9 Jun 2006 18:31:33 -0000 1.1.1.1
+++ ltmain.sh 25 Aug 2006 00:31:39 -0000 1.2
@@ -1579,6 +1579,12 @@
continue
;;
+ *$shrext)
+ # A shared library
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
*.la)
# A libtool-controlled library.
@@ -1911,6 +1917,12 @@
continue
;;
*.la) lib="$deplib" ;;
+ *$shrext)
+ if test "$pass" = link -a "$shrext" = ".dll"; then
+ deplib=`echo $deplib | sed -e 's;'$shrext'\$;.'$libext';'`
+ fi
+ deplibs="$deplib $deplibs"
+ continue;;
*.$libext)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
16 years, 9 months
[Fedora-directory-commits] adminutil/lib/libadminutil Makefile, 1.8, 1.9
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil/lib/libadminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14482
Modified Files:
Makefile
Log Message:
Removed the link arg to link with libCrun.so.1 since there is no C++ code
in AdminUtil.
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadminutil/Makefile,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Makefile 11 May 2006 23:30:31 -0000 1.8
+++ Makefile 24 Aug 2006 21:03:44 -0000 1.9
@@ -58,16 +58,6 @@
LDAPLINK=-L$(LDAP_LIBPATH) $(addprefix -l, $(LDAP_SOLIB_NAMES)) $(addprefix -l, $(LDAP_SSLLIB_NAMES))
endif
-ifeq ($(ARCH), SOLARIS)
-ifeq ($(NS_USE_NATIVE), 1)
-ifeq ($(USE_64), 1)
-DEPLIBS += -L/opt/SUNWspro/lib/v9 -lCrun
-else
-DEPLIBS += -L/opt/SUNWspro/lib -lCrun
-endif
-endif
-endif
-
OBJS=$(addprefix $(OBJDEST)/, psetc.o admutil.o distadm.o srvutil.o \
errRpt.o form_post.o strlist.o \
resource.o uginfo.o $(OSOBJS))
16 years, 9 months
[Fedora-directory-commits] mod_nss nss_engine_init.c,1.22,1.23
by Doctor Conrad
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31338
Modified Files:
nss_engine_init.c
Log Message:
Initialize the NSS cache before NSS_Init is called. A race condition
was being triggered during the first module unload when calling
NSS_Shutdown because the cache wasn't finished setting itself up
in MP mode.
Index: nss_engine_init.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_init.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- nss_engine_init.c 2 Aug 2006 18:59:12 -0000 1.22
+++ nss_engine_init.c 24 Aug 2006 15:50:20 -0000 1.23
@@ -205,6 +205,14 @@
/* Set the PKCS #11 strings for the internal token. */
PK11_ConfigurePKCS11(NULL,NULL,NULL, INTERNAL_TOKEN_NAME, NULL, NULL,NULL,NULL,8,1);
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
+ "Initializing SSL Session Cache of size %d. SSL2 timeout = %d, SSL3/TLS timeout = %d.", mc->session_cache_size, mc->session_cache_timeout, mc->ssl3_session_cache_timeout);
+ ap_mpm_query(AP_MPMQ_IS_FORKED, &forked);
+ if (forked)
+ SSL_ConfigMPServerSIDCache(mc->session_cache_size, (PRUint32) mc->session_cache_timeout, (PRUint32) mc->ssl3_session_cache_timeout, NULL);
+ else
+ SSL_ConfigServerSessionIDCache(mc->session_cache_size, (PRUint32) mc->session_cache_timeout, (PRUint32) mc->ssl3_session_cache_timeout, NULL);
+
/* We need to be in the same directory as libnssckbi.so to load the
* root certificates properly.
*/
@@ -268,14 +276,6 @@
nss_die();
}
- ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
- "Initializing SSL Session Cache of size %d. SSL2 timeout = %d, SSL3/TLS timeout = %d.", mc->session_cache_size, mc->session_cache_timeout, mc->ssl3_session_cache_timeout);
- ap_mpm_query(AP_MPMQ_IS_FORKED, &forked);
- if (forked)
- SSL_ConfigMPServerSIDCache(mc->session_cache_size, (PRUint32) mc->session_cache_timeout, (PRUint32) mc->ssl3_session_cache_timeout, NULL);
- else
- SSL_ConfigServerSessionIDCache(mc->session_cache_size, (PRUint32) mc->session_cache_timeout, (PRUint32) mc->ssl3_session_cache_timeout, NULL);
-
if (ocspenabled) {
CERT_EnableOCSPChecking(CERT_GetDefaultCertDB());
ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
16 years, 9 months
[Fedora-directory-commits] coolkey/applet/src/com/redhat/ckey/applet ASN1.java, NONE, 1.1 CardEdge.java, NONE, 1.1 MemoryManager.java, NONE, 1.1 ObjectManager.java, NONE, 1.1
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey/applet/src/com/redhat/ckey/applet
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14460/src/com/redhat/ckey/applet
Added Files:
ASN1.java CardEdge.java MemoryManager.java ObjectManager.java
Log Message:
Coolkey applet
--- NEW FILE ASN1.java ---
// SmartCard Applet
// Authors: Robert Relyea <rrelyea(a)redhat.com>
// Package: CardEdgeApplet
// Description: CardEdge implementation with JavaCard
//
// BEGIN LICENSE BLOCK
// Copyright (C) 2006 Red Hat, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// Changes to this license can be made only by the copyright author with
// explicit written consent.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Alternatively, the contents of this file may be used under the terms of
// the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
// case the provisions of the LGPL are applicable instead of those above. If
// you wish to allow use of your version of this file only under the terms
// of the LGPL, and not to allow others to use your version of this file
// under the terms of the BSD license, indicate your decision by deleting
// the provisions above and replace them with the notice and other
// provisions required by the LGPL. If you do not delete the provisions
// above, a recipient may use your version of this file under the terms of
// either the BSD license or the LGPL.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// END LICENSE_BLOCK
package com.redhat.nkey.applet;
import javacard.framework.ISOException;
import javacard.framework.JCSystem;
import javacard.framework.Util;
/**
* ASN1 parser Class
*
* <p>This Simplistic ASN.1 parser does not interpret tags, it simply finds
* elements based on where their fields are supposed to wind up at. </p>
*
*
* Object fields:
* <pre>
* short[] newSize; // way to get around java's restrictions on pass by ref.
* byte[] data
* </pre>
*
* @author Robert Relyea
* @version 0.0.1
*
*/
public class ASN1
{
public static final short SW_BAD_DER_DATA = (short)0x9cd0;
private final short NEXT = 0;
private final short SIZE = 1;
private final short END = 2;
private short[] params;
public ASN1()
{
params=JCSystem.makeTransientShortArray((short)3,
JCSystem.CLEAR_ON_DESELECT);
}
public short GetEnd()
{
return params[END];
}
public short GetSize()
{
return params[SIZE];
}
public short GetNext()
{
return params[NEXT];
}
public byte GetTag(byte buf[], short offset, short end)
{
if (end <= offset) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
return buf[offset];
}
public short Unwrap(byte buf[], short offset, short end, short dbg)
{
byte tag;
byte len;
short length = 0;
if (end < (short)(offset+2)) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
tag = buf[offset++];
if (tag == 0) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
len = buf[offset++];
length = Util.makeShort((byte)0,len);
if ((len & 0x80) != 0) {
short count = Util.makeShort((byte)0,(byte)(len & 0x7f));
if (end < (short)(offset+count)) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
if (count > 2) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
length = 0;
while (count-- > 0) {
length = (short)((length << 8)
| Util.makeShort((byte)0,buf[offset++]));
}
}
params[SIZE] = length;
params[NEXT] = ((short)(offset+length));
params[END] = ((short)(offset+length));
return offset;
}
public short Skip(byte buf[], short offset, short end, short dbg)
{
Unwrap(buf,offset,end,dbg);
return params[NEXT];
}
public short UnwrapBitString(byte buf[], short offset, short end, short dbg)
{
if (buf[offset] != 0) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
if (end < (short)(offset+1)) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
params[SIZE]--;
return (short)(offset+1);
}
public short Signed2Unsigned(byte buf[], short offset, short end, short dbg)
{
short startOffset = offset;
short startSize=params[SIZE];
for (; offset < end && buf[offset] == 0 ; offset++){
params[SIZE]--;
}
if (offset >= end) {
ISOException.throwIt(SW_BAD_DER_DATA);
}
return offset;
}
}
--- NEW FILE CardEdge.java ---
// MUSCLE SmartCard Development
// Authors: Tommaso Cucinotta <cucinotta(a)sssup.it>
// David Corcoran <corcoran(a)linuxnet.com>
// Ludovic Rousseau <ludovic.rousseau(a)free.fr>
// Jamie Nicolson <nicolson(a)netscape.com>
// Robert Relyea <rrelyea(a)redhat.com>
// Nelson Bolyard <nelsonb(a)netscape.com>
// Package: CardEdgeApplet
// Description: CardEdge implementation with JavaCard
// Protocol Authors: Tommaso Cucinotta <cucinotta(a)sssup.it>
// David Corcoran <corcoran(a)linuxnet.com>
// Modified:
// Eirik Herskedal <ehersked(a)cs.purdue.edu>
//
// BEGIN LICENSE BLOCK
// Copyright (C) 1999-2002 David Corcoran <corcoran(a)linuxnet.com>
// Copyright (C) 2006 Red Hat, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// Changes to this license can be made only by the copyright author with
// explicit written consent.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Alternatively, the contents of this file may be used under the terms of
// the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
// case the provisions of the LGPL are applicable instead of those above. If
// you wish to allow use of your version of this file only under the terms
// of the LGPL, and not to allow others to use your version of this file
// under the terms of the BSD license, indicate your decision by deleting
// the provisions above and replace them with the notice and other
// provisions required by the LGPL. If you do not delete the provisions
// above, a recipient may use your version of this file under the terms of
// either the BSD license or the LGPL.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// END LICENSE_BLOCK
package com.redhat.nkey.applet;
import javacard.framework.*;
import javacard.security.*;
import javacardx.crypto.Cipher;
import visa.openplatform.ProviderSecurityDomain;
import visa.openplatform.OPSystem;
// Referenced classes of package com.redhat.nkey.applet:
// MemoryManager, ObjectManager, ASN1
/**
* Implements MUSCLE's Card Edge Specification.
*
* <p>TODO:
*
* <ul>
* <li>Allows maximum number of keys and PINs and total mem to be specified at the instantiation moment.</li>
*
* <li>How do transactions fit in the methods?</li>
* <li>Where should we issue begin/end transaction?</li>
* <li>Should we ever abort transaction? Where?</li>
* <li>Everytime there is an <tt>"if (avail < )"</tt> check, call <tt>ThrowDeleteObjects()</tt>.</li>
* </ul>
* </p>
*
* <p>NOTES:
*
* <ul>
* <li>C preprocessor flags:
* <ul>
* <li>Encryption algorithms: WITH_RSA, WITH_DSA, WITH_DES, WITH_3DES</li>
* <li>ComputeCrypt directions: WITH_ENCRYPT, WITH_DECRYPT, WITH_SIGN</li>
* <li>Enable/Disable External Authenticate: WITH_EXT_AUTH</li>
* <li>Enable/Disable PIN Policy enforcement: WITH_PIN_POLICY</li>
* </ul>
* </li>
* <li>C preprocessor defines:
* <ul>
* <li>JAVA_PACKAGE: The name of Java package for this Applet</li>
* <li>CardEdge: The name of Java class for the Applet</li>
* </ul>
* </li>
* </ul>
* </p>
*
* @author Tommaso Cucinotta
* @author David Corcoran
* @author Ludovic Rousseau
* @version 0.9.10
*/
public class CardEdge extends Applet
{
private static final byte ZEROB = 0;
private static final byte MAX_NUM_KEYS = 8;
private static final byte MAX_NUM_PINS = 8;
private static final byte VERSION_PROTOCOL_MAJOR = 1;
private static final byte VERSION_PROTOCOL_MINOR = 1;
private static final byte VERSION_APPLET_MAJOR = 1;
private static final byte VERSION_APPLET_MINOR = 3;
private static final short BUILDID_MAJOR = (short) 0x4472;
private static final short BUILDID_MINOR = (short) 0x4aa7;
private static final short ZEROS = 0;
// * Enable pin size check
private static final byte PIN_POLICY_SIZE = 1;
// * Enable pin charset check
private static final byte PIN_POLICY_CHARSET = 2;
// * Enable charset mixing check
private static final byte PIN_POLICY_MIXED = 4;
// * Numbers are allowed
private static final byte PIN_CHARSET_NUMBERS = 1;
// * Upper case letters
private static final byte PIN_CHARSET_UC_LETTERS = 2;
// * Lower case letters
private static final byte PIN_CHARSET_LC_LETTERS = 4;
// * Punctuation symbols: , .
private static final byte PIN_CHARSET_PUNCT = 8;
// * Other binary codes (NUMBERS | OTHERS excludes LETTERS and PUNCT)
private static final byte PIN_CHARSET_OTHERS = (byte)0x80;
// * PIN must contain chars from at least 2 different char sets
private static final byte PIN_MIXED_TWO = 1;
// * PIN must at least contain chars from both upper and lower case
private static final byte PIN_MIXED_CASE = 2;
// * PIN must at least contain 1 char from each char set
private static final byte PIN_MIXED_ALL = 4;
/**
* The User's PIN is pin 0. There is no SO pin.
*/
private static final byte USER_IDENTITY = 0;
private static final byte DEFAULT_IDENTITY = 15; // MUSCLE reserved ID
private static final byte RA_IDENTITY = 14; // MUSCLE reserved ID
private static final short NONCE_SIZE = (short)8;
private static final short ISSUER_INFO_SIZE = (short)0xe0;
private static final short USER_ACL = (short)(1 << USER_IDENTITY);
private static final short DEFAULT_ACL = (short)(1 << DEFAULT_IDENTITY);
private static final short RA_ACL = (short)(1 << RA_IDENTITY);
private static final short ANY_ONE_ACL = (short)0xffff;
private static final short NO_ONE_ACL = (short)0;
private static final byte pinPolicies = 7;
private static final byte pinMinSize = 4;
private static final byte pinMaxSize = 16;
private static final byte MAX_KEY_TRIES = 5;
private static final short IN_OBJECT_CLA = -1;
private static final short IN_OBJECT_ID = -2;
private static final short OUT_OBJECT_CLA = -1;
private static final short OUT_OBJECT_ID = -1;
private static final byte KEY_ACL_SIZE = 6;
private static final byte CardEdge_CLA = (byte)0xB0;
private static final byte CardManager_CLA = (byte)0x80;
private static final byte SECURE_CLA = (byte)0x84;
/**
* Instruction codes
*/
/* Deprecated */
private static final byte INS_SETUP = (byte)0x2A;
private static final byte INS_GEN_KEYPAIR = (byte)0x30;
private static final byte INS_EXPORT_KEY = (byte)0x34;
[...2435 lines suppressed...]
case INS_CHANGE_PIN:
ChangePIN(apdu, buffer);
break;
case INS_CREATE_OBJ:
CreateObject(apdu, buffer);
break;
case INS_DELETE_OBJ:
DeleteObject(apdu, buffer);
break;
case INS_READ_OBJ:
ReadObject(apdu, buffer);
break;
case INS_WRITE_OBJ:
WriteObject(apdu, buffer);
break;
case INS_LOGOUT:
Logout(apdu,buffer);
break;
case INS_LIST_PINS:
ListPINs(apdu, buffer);
break;
case INS_LIST_OBJECTS:
ListObjects(apdu, buffer);
break;
case INS_LIST_KEYS:
ListKeys(apdu, buffer);
break;
case INS_GET_STATUS:
GetStatus(apdu, buffer);
break;
case INS_GET_ISSUER_INFO:
getIssuerInfo(apdu, buffer);
break;
case INS_GET_RANDOM:
getRandom(apdu, buffer);
break;
case INS_SEED_RANDOM:
seedRandom(apdu, buffer);
break;
case INS_GET_LIFECYCLE:
getLifeCycle(apdu, buffer);
break;
case INS_GET_BUILDID:
getBuildID(apdu, buffer);
break;
case INS_GET_BUILTIN_ACL:
getBuiltInACL(apdu, buffer);
break;
case INS_NOP:
break;
// case INS_SETUP:
// case INS_GEN_KEYPAIR:
// case INS_EXPORT_KEY:
// case INS_LOGOUT_ALL:
// case INS_GET_CHALLENGE:
// case INS_CAC_EXT_AUTH:
// case INS_UNBLOCK_PIN:
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
break;
}
}
//
// handle non-secure standard commands. Called from process.
//
private void processSecureAPDU(APDU apdu, byte buffer[])
{
byte ins = buffer[ISO7816.OFFSET_INS];
if (ins != INS_SEC_EXT_AUTH) {
verifySecureChannel(apdu, buffer);
}
switch (ins) {
case INS_SEC_EXT_AUTH:
externalAuthenticate(apdu, buffer);
break;
case INS_SEC_SET_PIN:
resetPIN(apdu, buffer);
break;
case INS_SEC_START_ENROLLMENT:
startEnrollment(apdu, buffer);
break;
case INS_SEC_IMPORT_KEY_ENCRYPTED:
importKeyEncrypted(apdu, buffer);
break;
case INS_SEC_READ_IOBUF:
readIOBuf(apdu, buffer);
break;
case INS_SEC_SET_LIFECYCLE:
setLifeCycle(apdu, buffer);
break;
case INS_SEC_SET_ISSUER_INFO:
setIssuerInfo(apdu, buffer);
break;
case INS_CREATE_OBJ:
CreateObject(apdu, buffer);
break;
case INS_WRITE_OBJ:
WriteObject(apdu, buffer);
break;
case INS_IMPORT_KEY:
ImportKey(apdu, buffer);
break;
case INS_COMPUTE_CRYPT:
ComputeCrypt(apdu, buffer);
break;
case INS_CREATE_PIN:
CreatePIN(apdu, buffer);
break;
case INS_DELETE_OBJ:
DeleteObject(apdu, buffer);
break;
case INS_READ_OBJ:
ReadObject(apdu, buffer);
break;
case INS_SEC_SET_BUILTIN_ACL:
setBuiltInACL(apdu, buffer);
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
}
//
// **** Most processing starts here!!
//
public void process(APDU apdu)
{
if (selectingApplet())
ISOException.throwIt(ISO7816.SW_NO_ERROR);
if (!transientInit) {
initTransient();
}
if ( !cardResetProcessed[0] ) {
processCardReset();
}
authenticated_id = 0;
byte buffer[] = apdu.getBuffer();
byte cla = buffer[ISO7816.OFFSET_CLA];
switch (cla) {
case ISO7816.CLA_ISO7816:
case ISO7816.INS_SELECT: // right value, but right define?
return;
case CardEdge_CLA:
processCardEdgeAPDU(apdu,buffer);
break;
case CardManager_CLA:
initializeUpdate(apdu, buffer);
break;
case SECURE_CLA:
processSecureAPDU(apdu,buffer);
break;
default:
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
}
}
}
--- NEW FILE MemoryManager.java ---
// MUSCLE SmartCard Development
// Authors: Tommaso Cucinotta <cucinotta(a)sssup.it>
// David Corcoran <corcoran(a)linuxnet.com>
// Ludovic Rousseau <ludovic.rousseau(a)free.fr>
// Jamie Nicolson <nicolson(a)netscape.com>
// Package: CardEdgeApplet
// Description: CardEdge implementation with JavaCard
// Protocol Authors: Tommaso Cucinotta <cucinotta(a)sssup.it>
// David Corcoran <corcoran(a)linuxnet.com>
// Modified:
// Eirik Herskedal <ehersked(a)cs.purdue.edu>
//
// BEGIN LICENSE BLOCK
// Copyright (c) 1999-2002 David Corcoran <corcoran(a)linuxnet.com>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// Changes to this license can be made only by the copyright author with
// explicit written consent.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Alternatively, the contents of this file may be used under the terms of
// the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
// case the provisions of the LGPL are applicable instead of those above. If
// you wish to allow use of your version of this file only under the terms
// of the LGPL, and not to allow others to use your version of this file
// under the terms of the BSD license, indicate your decision by deleting
// the provisions above and replace them with the notice and other
// provisions required by the LGPL. If you do not delete the provisions
// above, a recipient may use your version of this file under the terms of
// either the BSD license or the LGPL.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// END LICENSE_BLOCK
package com.redhat.nkey.applet;
import javacard.framework.Util;
/**
* Memory Manager class.
*
* <p>An instance of this class is capable of handling allocation and
* deallocation of chunks in a large Java byte array that is allocated
* once during the object instantiation.</p>
*
* <p>The Memory Manager allocates or frees memory chunks in the
* preallocated byte array on demand.</p>
*
* <p>No defragmentation is done, actually.</p>
*
* <p>Consecutive freed memory chunks are recompacted.</p>
*
* <p>Every allocation takes 2 more bytes to store the allocated block
* size, just before the allocated offset.</p>
*
* <p>A free memory block starts with a node (NODE_SIZE bytes):</p>
*
* <pre>
* short size;
* short next;
* </pre>
*
* @author Tommaso Cucinotta
* @author David Corcoran
* @author Ludovic Rousseau
* @version 0.9.9
*/
public class MemoryManager
{
/**
* Special offset value used as invalid offset
*/
public static final short NULL_OFFSET = -1;
private static final byte NODE_SIZE = 4;
private byte ptr[];
private short free_head;
/**
* Constructor for the MemoryManager class
*
* @param mem_size Size of the memory are to be allocated
*/
public MemoryManager(short mem_size)
{
ptr = null;
free_head = NULL_OFFSET;
Init(mem_size);
}
private void Init(short mem_size)
{
if(ptr != null)
{
return;
} else
{
ptr = new byte[mem_size];
Util.setShort(ptr, (short)0, mem_size);
Util.setShort(ptr, (short)2, (short)NULL_OFFSET);
free_head = 0;
return;
}
}
/**
* Allocate memory
*
* Each allocation takes actually a 2 bytes overhead.
*
* @param size Size of the memory block
* @return The offset at which allocated memory starts or
* NULL_OFFSET if an error occurred.
* @see #alloc(short)
* @see #freemem()
*/
public short alloc(short size)
{
short offset = free_head;
short prev = NULL_OFFSET;
size += 2;
if(size < NODE_SIZE)
size = NODE_SIZE;
short next_offset;
for(; offset != NULL_OFFSET; offset = next_offset)
{
short free_size = Util.getShort(ptr, offset);
next_offset = Util.getShort(ptr, (short)(offset + 2));
if(free_size >= size)
{
short remain = (short)(free_size - size);
if(remain >= NODE_SIZE)
{
Util.setShort(ptr, offset, remain);
} else
{
size = free_size;
remain = 0;
if(prev == NULL_OFFSET)
free_head = next_offset;
else
Util.setShort(ptr, (short)(prev + 2), next_offset);
}
Util.setShort(ptr, (short)(offset + remain), size);
return (short)(offset + remain + 2);
}
prev = offset;
}
return NULL_OFFSET;
}
/**
* Free a memory block
*
* <p>Consecutive free blocks are recompacted. Recompaction happens on
* free(). 4 cases are considered: don't recompact, recompact with
* next only, with previous only and with both of them.</p>
*
* @param offset The offset at which the memory block starts; it was
* returned from a previous call to {@link #alloc(short)}
*
* @see #alloc(short)
* @see #freemem()
*/
public void free(short offset)
{
offset -= 2;
short size = Util.getShort(ptr, offset);
short prev = NULL_OFFSET;
short base = free_head;
boolean found = false;
short node_next = 0;
for(; base != NULL_OFFSET; base = node_next)
{
node_next = Util.getShort(ptr, (short)(base + 2));
if(offset < base)
{
found = true;
break;
}
prev = base;
}
if(found && (short)(offset + size) == base)
{
size += Util.getShort(ptr, base);
Util.setShort(ptr, offset, size);
if(prev != NULL_OFFSET)
Util.setShort(ptr, (short)(prev + 2), node_next);
else
free_head = node_next;
base = node_next;
}
if(prev != NULL_OFFSET)
{
short prev_size = Util.getShort(ptr, prev);
if((short)(prev + prev_size) == offset)
{
Util.setShort(ptr, prev, (short)(prev_size + size));
} else
{
Util.setShort(ptr, (short)(offset + 2), base);
Util.setShort(ptr, (short)(prev + 2), offset);
}
} else
{
Util.setShort(ptr, (short)(offset + 2), base);
free_head = offset;
}
}
/**
* Get available free memory
*
* @return The total amount of available free memory, equal to the
* sum of all free fragments' sizes.
*
* @see #free(short)
* @see #alloc(short)
*/
public short freemem()
{
short offset = free_head;
short total = 0;
for(; offset != NULL_OFFSET; offset = Util.getShort(ptr, (short)(offset + 2)))
total = (short)((total + Util.getShort(ptr, offset)) - 2);
return total;
}
/**
* Get the size of a memory block
*
* @param offset The offset at which the memory block starts
*/
public short getBlockSize(short offset)
{
return (short)(Util.getShort(ptr, (short)(offset - 2)) - 2);
}
/**
* Retrieve the Java byte array containing all the memory contents.
*
* <p>To optimize, we don't use external buffers, but we directly
* copy from the memory array.</p>
*
* <p><b>Use this function only if really required.</b></p>
*
* @return The Java byte array containing all memory contents
*/
public byte[] getBuffer()
{
return ptr;
}
/**
* Read a byte value from memory
*
* @param base The complete memory location (offset) of the byte to
* read
* @return The byte value
*/
public byte getByte(short base)
{
return ptr[base];
}
/**
* Read a byte value from memory
*
* @param base The base memory location (offset) of the byte to read
* @param offset The offset of the byte (is added to the base
* parameter)
* @return The byte value
*/
public byte getByte(short base, short offset)
{
return ptr[(short)(base + offset)];
}
/**
* Copy a byte sequence from memory
*
* @param dst_bytes[] The destination byte array
* @param dst_offset The offset at which the sequence will be copied
* in dst_bytes[]
* @param src_base The base memory location (offset) of the source
* byte sequence
* @param src_offset The offset of the source byte sequence (is
* added to the src_base parameter)
* @param size The number of bytes to be copied
*/
public void getBytes(byte dst_bytes[], short dst_offset, short src_base,
short src_offset, short size)
{
Util.arrayCopy(ptr, (short)(src_base + src_offset),
dst_bytes, dst_offset, size);
}
/**
* Gets the size of the greatest chunk of available memory
*
* @return The size of the greatest free memory chunk, or zero if
* there is no free mem left
*/
public short getMaxSize()
{
short max_size = 2;
for(short base = free_head; base != NULL_OFFSET;
base = Util.getShort(ptr, (short)(base + 2)))
{
short size = Util.getShort(ptr, base);
if(size > max_size)
max_size = size;
}
return (short)(max_size - 2);
}
/**
* Read a short value from memory
*
* @param base The base memory location (offset) of the short to
* read
* @return The short value
*/
public short getShort(short base)
{
return Util.getShort(ptr, base);
}
/**
* Read a short value from memory
*
* @param base The base memory location (offset) of the short to
* read
* @param offset The offset of the short (is added to the base
* parameter)
* @return The short value
*/
public short getShort(short base, short offset)
{
return Util.getShort(ptr, (short)(base + offset));
}
/**
* Resize (only clamping is supported) a previously allocated memory
* chunk
*
* @param offset Memory offset as returned by alloc()
* @param new_size ew size of the memory block
* @return True if it was possible to realloc(), False otherwise
*
* @see #alloc(short)
* @see #free(short)
* @see #freemem()
*/
public boolean realloc(short offset, short new_size)
{
short actual_size = Util.getShort(ptr, (short)(offset - 2));
new_size += 2;
if(new_size < 3 || (short)(actual_size - new_size) < NODE_SIZE)
{
return false;
} else
{
Util.setShort(ptr, (short)(offset - 2), new_size);
Util.setShort(ptr, (short)((offset + new_size) - 2), (short)(actual_size - new_size));
free((short)(offset + new_size));
return true;
}
}
/**
* Set a byte value into memory
*
* @param base The complete memory location (offset) of the byte to
* set
* @param b The new byte value
*/
public void setByte(short base, byte b)
{
ptr[base] = b;
}
/**
* Set a byte value into memory
*
* @param base The base memory location (offset) of the byte to set
* @param offset The offset of the byte (is added to the base
* parameter)
* @param b The new byte value
*/
public void setByte(short base, short offset, byte b)
{
ptr[(short)(base + offset)] = b;
}
/**
* Copy a byte sequence into memory
*
* @param dst_base The base memory location (offset) of the
* destination byte sequence
* @param dst_offset The offset of the destination byte sequence (is
* added to the dst_base parameter)
* @param src_bytes[] The source byte array
* @param src_offset The offset at which the source sequence starts
* in src_bytes[]
* @param size The number of bytes to be copied
*/
public void setBytes(short dst_base, short dst_offset, byte src_bytes[], short src_offset, short size)
{
Util.arrayCopy(src_bytes, src_offset, ptr, (short)(dst_base + dst_offset), size);
}
/**
* Set a short value into memory
*
* @param base The complete memory location (offset) of the short to
* set
* @param b The short value
*/
public void setShort(short base, short b)
{
Util.setShort(ptr, base, b);
}
/**
* Set a short value into memory
*/
public void setShort(short base, short offset, short b)
{
Util.setShort(ptr, (short)(base + offset), b);
}
}
--- NEW FILE ObjectManager.java ---
// MUSCLE SmartCard Development
// Authors: Tommaso Cucinotta <cucinotta(a)sssup.it>
// David Corcoran <corcoran(a)linuxnet.com>
// Ludovic Rousseau <ludovic.rousseau(a)free.fr>
// Jamie Nicolson <nicolson(a)netscape.com>
// Package: CardEdgeApplet
// Description: CardEdge implementation with JavaCard
// Protocol Authors: Tommaso Cucinotta <cucinotta(a)sssup.it>
// David Corcoran <corcoran(a)linuxnet.com>
// Modified:
// Eirik Herskedal <ehersked(a)cs.purdue.edu>
//
// BEGIN LICENSE BLOCK
// Copyright (C) 1999-2002 David Corcoran <corcoran(a)linuxnet.com>
// Copyright (C) 2006 Red Hat, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// Changes to this license can be made only by the copyright author with
// explicit written consent.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Alternatively, the contents of this file may be used under the terms of
// the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
// case the provisions of the LGPL are applicable instead of those above. If
// you wish to allow use of your version of this file only under the terms
// of the LGPL, and not to allow others to use your version of this file
// under the terms of the BSD license, indicate your decision by deleting
// the provisions above and replace them with the notice and other
// provisions required by the LGPL. If you do not delete the provisions
// above, a recipient may use your version of this file under the terms of
// either the BSD license or the LGPL.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// END LICENSE_BLOCK
package com.redhat.nkey.applet;
import javacard.framework.ISOException;
import javacard.framework.Util;
// Referenced classes of package com.redhat.nkey.applet:
// MemoryManager
/**
* Object Manager Class
*
* <p>Objects are linked in a list in the dynamic memory. No smart search
* is done at the moment.</p>
*
* <p>TODO - Could we definitively avoid a map enforcing the ID (equal to
* the memory address, i.e.) - security implications ?</p>
*
* Object fields:
* <pre>
* short next
* short obj_class
* short obj_id
* short obj_size
* byte[] data
* </pre>
*
* @author Tommaso Cucinotta
* @author David Corcoran
* @author Ludovic Rousseau
* @version 0.9.9
*
*/
public class ObjectManager
{
public static final byte OBJ_ACL_SIZE = 6;
private static final byte OBJ_HEADER_SIZE = 14;
private static final byte OBJ_H_NEXT = 0;
private static final byte OBJ_H_CLASS = 2;
private static final byte OBJ_H_ID = 4;
private static final byte OBJ_H_ACL = 6;
private static final short OBJ_ACL_READ = 6;
private static final short OBJ_ACL_WRITE = 8;
private static final short OBJ_ACL_DELETE = 10;
private static final byte OBJ_H_SIZE = 12;
private static final byte OBJ_H_DATA = 14;
/**
* There have been memory problems on the card
*/
public static final short SW_NO_MEMORY_LEFT = (short)0x9C01;
public static final short SW_OBJECT_NOT_FOUND = (short)0x9C07;
public static final short SW_OBJECT_EXISTS = (short)0x9C08;
/**
* Size of an Object Record filled by getFirstRecord() or
* getNextRecord(): ID, Size, ACL
*/
public static final short RECORD_SIZE = 14;
/**
* Iterator on objects.
*/
private short it;
/**
* The Memory Manager object
*/
private MemoryManager mem;
/**
* Head of the objects' list
*/
private short obj_list_head;
/**
* Constructor for the ObjectManager class.
*
* @param mem_ref The MemoryManager object to be used to allocate
* objects' memory.
*/
public ObjectManager(MemoryManager mem_ref)
{
mem = null;
obj_list_head = -1;
mem = mem_ref;
obj_list_head = -1;
}
/**
* Check if logged in identities satisfy requirements for an
* operation
*
* @param required_ids The required identities as from an ACL short
* @param logged_ids The current logged in identities as stored in
* CardEdge.logged_ids
*/
private boolean authorizeOp(short base, short logged_ids, short offset)
{
short required_ids = mem.getShort((short)(base - OBJ_H_DATA), offset);
return (required_ids & logged_ids) != 0;
}
/**
* Allow or unallow delete on object given the logged identities
*/
public boolean authorizeDeleteFromAddress(short base, short logged_ids)
{
return authorizeOp(base, logged_ids, OBJ_ACL_DELETE);
}
/**
* Allow or unallow read on object given the logged identities
*
* @param base The object base address as returned from
* getBaseAddress()
* @param logged_ids The current logged in identities as stored in
* CardEdge.logged_ids
*/
public boolean authorizeReadFromAddress(short base, short logged_ids)
{
return authorizeOp(base, logged_ids, OBJ_ACL_READ);
}
/**
* Allow or unallow write on object given the logged identities
*
* @param base The object base address as returned from
* getBaseAddress()
* @param logged_ids The current logged in identities as stored in
* CardEdge.logged_ids
*/
public boolean authorizeWriteFromAddress(short base, short logged_ids)
{
return authorizeOp(base, logged_ids, OBJ_ACL_WRITE);
}
/**
* Clamps an object freeing the unused memory
*
* @throws SW_NO_MEMORY_LEFT exception if cannot allocate the
* memory. Does not check if object exists.
*
* @param type Object Type
* @param id Object ID (Type and ID form a generic 4 bytes
* identifier)
* @param new_size The new object size (must be less than current
* size)
*
* @return True if clamp was possible, false otherwise
*/
public boolean clampObject(short type, short id, short new_size)
{
short base = getEntry(type, id);
if(base == -1)
ISOException.throwIt((short)SW_OBJECT_NOT_FOUND);
if(mem.realloc(base, (short)(new_size + RECORD_SIZE)))
{
mem.setShort(base, (short)OBJ_H_SIZE, new_size);
return true;
} else
{
return false;
}
}
/**
* Compare an object's ACL with the provided ACL.
*
* @param base The object base address, as returned from
* getBaseAddress()
* @param acl The buffer containing the ACL
*
* @return True if the ACLs are equal
*/
public boolean compareACLFromAddress(short base, byte acl[])
{
return Util.arrayCompare(mem.getBuffer(),
(short)((base - OBJ_HEADER_SIZE) + OBJ_H_ACL), acl,
(short)0, (short)OBJ_ACL_SIZE) == 0;
}
/**
* Creates an object with specified parameters.
*
* @throws SW_NO_MEMORY_LEFT exception if cannot allocate the
* memory. Does not check if object exists.
*
* @param type Object Type
* @param id Object ID (Type and ID form a generic 4 bytes
* identifier)
* @param acl_buf Java byte array containing the ACL for the new object
* @param acl_offset Offset at which the ACL starts in acl_buf[]
*
* @return The memory base address for the object. It can be used in
* successive calls to xxxFromAddress() methods.
*
*/
public short createObject(short type, short id, short size,
byte acl_buf[], short acl_offset)
{
if (exists(type, id))
ISOException.throwIt(SW_OBJECT_EXISTS);
short base = mem.alloc((short)(size + OBJ_HEADER_SIZE));
if(base == -1)
ISOException.throwIt((short)SW_NO_MEMORY_LEFT);
mem.setShort(base, (short)OBJ_H_NEXT, obj_list_head);
mem.setShort(base, (short)OBJ_H_CLASS, type);
mem.setShort(base, (short)OBJ_H_ID, id);
mem.setShort(base, (short)OBJ_H_SIZE, size);
mem.setBytes(base, (short)OBJ_H_ACL, acl_buf, acl_offset,
(short)OBJ_ACL_SIZE);
obj_list_head = base;
return (short)(base + OBJ_H_DATA);
}
/**
* Creates an object with the maximum available size
*/
public short createObjectMax(short type, short id,
byte acl_buf[], short acl_offset)
{
short obj_size = mem.getMaxSize();
if(obj_size == 0)
ISOException.throwIt((short)SW_NO_MEMORY_LEFT);
return createObject(type, id, (short)(obj_size - OBJ_H_DATA),
acl_buf, acl_offset);
}
/**
* Destroy the specified object
*
* @param type Object Type
* @param id Object ID (Type and ID form a generic 4 bytes
* identifier)
* @param secure If true, object memory is zeroed before being
* released.
*/
public void destroyObject(short type, short id, boolean secure)
{
boolean found;
do {
short curr = obj_list_head;
short prev = -1;
for (found = false; !found && curr != -1; ) {
if(mem.getShort(curr, (short)OBJ_H_CLASS) == type &&
mem.getShort(curr, (short)OBJ_H_ID) == id) {
found = true;
} else {
prev = curr;
curr = mem.getShort(curr, (short)0);
}
}
if(found) {
if(prev != -1)
mem.setShort(prev, (short)0, mem.getShort(curr, (short)0));
else
obj_list_head = mem.getShort(curr, (short)0);
if(secure) {
Util.arrayFillNonAtomic(mem.getBuffer(),
(short)(curr + OBJ_H_DATA),
mem.getShort(curr, (short)OBJ_H_SIZE),
(byte)0);
}
mem.free(curr);
}
} while (found);
}
/**
* Checks if an object exists
*
* @param type The object type
* @param id The object ID
*
* @return true if object exists
*/
public boolean exists(short type, short id)
{
short base = getEntry(type, id);
return base != -1;
}
/**
* Returns the data base address (offset) for an object.
*
* <p>The base address can be used for further calls to
* xxxFromAddress() methods</p>
*
* <p>This function should only be used if performance issue arise.
* setObjectData() and getObjectData() should be used, instead.</p>
*
* @param type Object Type
* @param id Object ID (Type and ID form a generic 4 bytes
* identifier)
*
* @return The starting offset of the object. At this location
*/
public short getBaseAddress(short type, short id)
{
short base = getEntry(type, id);
if(base == -1)
return -1;
else
return (short)(base + OBJ_H_DATA);
}
/**
* Returns the header base address (offset) for the specified
* object.
*
* <p>Object header is found at the returned offset, while object
* data starts right after the header.</p>
*
* <p>This performs a linear search, so performance issues could
* arise as the number of objects grows If object is not found,
* then returns NULL_OFFSET.</p>
*
* @param type Object Type
* @param id Object ID (Type and ID form a generic 4 bytes
* identifier)
*
* @return The starting offset of the object or NULL_OFFSET if the
* object is not found.
*/
private short getEntry(short type, short id)
{
for(short base = obj_list_head; base != -1;
base = mem.getShort(base, (short)0)) {
if(mem.getShort(base, (short)OBJ_H_CLASS) == type &&
mem.getShort(base, (short)OBJ_H_ID) == id)
return base;
}
return -1;
}
/**
* Resets the objects iterator and retrieves the information record
* of the first object, if any.
*
* @param buffer The byte array into which the record will be copied
* @param offset The offset in buffer[] at which the record will be
* copied
*
* @return True if an object was found. False if there are no
* objects.
*
* @see #getNextRecord(byte[], short)
*/
public boolean getFirstRecord(byte buffer[], short offset)
{
it = obj_list_head;
return getNextRecord(buffer, offset);
}
/**
* Retrieves the information record of the next object, if any.
*
* @param buffer The byte array into which the record will be copied
* @param offset The offset in buffer[] at which the record will be
* copied
*
* @return True if an object was found. False if there are no more
* objects to inspect.
*
* @see #getFirstRecord(byte[], short)
*/
public boolean getNextRecord(byte buffer[], short offset)
{
if(it == -1)
{
return false;
} else
{
Util.setShort(buffer, offset, mem.getShort(it, (short)2));
Util.setShort(buffer, (short)(offset + 2),
mem.getShort(it, (short)OBJ_H_ID));
Util.setShort(buffer, (short)(offset + 4), (short)0);
Util.setShort(buffer, (short)(offset + 6),
mem.getShort(it, (short)OBJ_H_SIZE));
Util.arrayCopyNonAtomic(mem.getBuffer(),
(short)(it + OBJ_H_ACL), buffer,
(short)(offset + 8),
(short)OBJ_ACL_SIZE);
it = mem.getShort(it, (short)0);
return true;
}
}
/**
* Returns object size from the base address
*/
public short getSizeFromAddress(short base)
{
return mem.getShort((short)((base - OBJ_H_DATA) + OBJ_H_SIZE));
}
/**
* Set the object's ACL.
*/
private void setACL(short type, short id, byte acl_buf[], short acl_offset)
{
short base = getEntry(type, id);
mem.setBytes(base, (short)OBJ_H_ACL, acl_buf, acl_offset, (short)OBJ_ACL_SIZE);
}
}
16 years, 9 months
[Fedora-directory-commits] coolkey/applet AUTHORS, NONE, 1.1 COPYING, NONE, 1.1 Makefile, NONE, 1.1 README, NONE, 1.1 applet.pmf, NONE, 1.1
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey/applet
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14460
Added Files:
AUTHORS COPYING Makefile README applet.pmf
Log Message:
Coolkey applet
--- NEW FILE AUTHORS ---
Tommaso Cucinotta
Title: Computer Engineer, PhD student
Real Title: The Body
Org: Scuola Superiore di Studi Universitari
e Perfezionamento S.Anna (Pisa, Italy)
E-mail: cucinotta(a)sssup.it
Home Page: http://gandalf.sssup.it/~cucinotta
David Corcoran
Title: Smartcard technical consultant
Org: M.U.S.C.L.E. Project
E-mail: corcoran(a)linuxnet.com
Home Page: http://www.linuxnet.com
Ludovic Rousseau
E-mail: ludovic.rousseau(a)free.fr
Home page: http://ludovic.rousseau.free.fr
Modified by:
Eirik Herskedal
Title: Computer Science, Masters student
Org: Purdue University
E-mail: ehersked(a)cs.purdue.edu
Jamie Nicolson
Title: Senior Software Engineer
Org: America Online, Inc.
--- NEW FILE COPYING ---
Copyright (c) 1999-2002 David Corcoran <corcoran(a)linuxnet.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
Changes to this license can be made only by the copyright author with
explicit written consent.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Alternatively, the contents of this file may be used under the terms of
the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
case the provisions of the LGPL are applicable instead of those above. If
you wish to allow use of your version of this file only under the terms
of the LGPL, and not to allow others to use your version of this file
under the terms of the BSD license, indicate your decision by deleting
the provisions above and replace them with the notice and other
provisions required by the LGPL. If you do not delete the provisions
above, a recipient may use your version of this file under the terms of
either the BSD license or the LGPL.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--- NEW FILE Makefile ---
# BEGIN LICENSE BLOCK
# Copyright (c) 1999-2002 David Corcoran <corcoran(a)linuxnet.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# Changes to this license can be made only by the copyright author with
# explicit written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Alternatively, the contents of this file may be used under the terms of
# the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
# case the provisions of the LGPL are applicable instead of those above. If
# you wish to allow use of your version of this file only under the terms
# of the LGPL, and not to allow others to use your version of this file
# under the terms of the BSD license, indicate your decision by deleting
# the provisions above and replace them with the notice and other
# provisions required by the LGPL. If you do not delete the provisions
# above, a recipient may use your version of this file under the terms of
# either the BSD license or the LGPL.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# END LICENSE BLOCK
CORE_DEPTH = ..
include ../coreconf/config.mk
#############################################################################
# Locations of toolkits.
#
#
# The Javacard kit, version 2.2. Version 2.1 should also work.
#
# The following need to be set in environment variables or in custom.mk.
# Examples :
#
#JAVACARD_KIT_DIR=c:/hack/java_card_kit-2_2
#
# The JDK. You need to use version 1.3.x; other versions aren't supported
# by the converter classes.
#
#JAVA_HOME=/cygdrive/c/jdk1.3.1_07/
#
# The top-level directory of Schlumberger's Cyberflex SDK.
#
#SLB_DIR=c:\Program Files\Schlumberger
-include custom.mk
#############################################################################
# Build Constants
#
# The Applet Identification Number.
#
AID=0x62:0x76:0x01:0xFF:0x00:0x00:0x00
#
# The Package Identification Number.
#
PID=0x62:0x76:0x01:0xFF:0x00:0x00
#
# The Java package to which the applet belongs.
#
PACKAGE=com.redhat.nkey.applet
#
# The unqualified name of the applet class.
#
APPLET_CLASS_NAME=CardEdge
#
# The directory into which output will be generated.
#
OUTPUT_DIR=output
#############################################################################
# Generated build variables.
PACKAGE_DIR=$(subst .,/,$(PACKAGE))
JAVA_SRC_FILES=$(wildcard src/$(PACKAGE_DIR)/*.java)
APPLET_QUALIFIED_CLASS_NAME=$(PACKAGE).$(APPLET_CLASS_NAME)
CONVERTER_OUTPUT_DIR=$(OUTPUT_DIR)/$(PACKAGE_DIR)/javacard
JAVAC=$(JAVA_HOME)/bin/javac
JAVA=$(JAVA_HOME)/bin/java
JAVA_SRC_FILENAMES=$(notdir $(JAVA_SRC_FILES))
JAVA_CLASS_FILES=$(patsubst %.java,$(OUTPUT_DIR)/$(PACKAGE_DIR)/%.class, $(JAVA_SRC_FILENAMES))
#############################################################################
# The ultimate output of the build is applet.ijc. This file is ready to
# be loaded onto a token.
all: $(CONVERTER_OUTPUT_DIR)/applet.ijc
clobber: clean
clean:
touch $(JAVA_SRC_FILES)
#############################################################################
# The first step in the build is to compile the Java source files (*.java)
# into class files (*.class). These class files are regular Java class files;
# they aren't specially formatted for Javacard yet.
#
# The classpath needed to compile the Java source code.
#
BUILD_CLASSPATH="$(JAVACARD_KIT_DIR)/lib/javacardframework.jar;$(JAVACARD_KIT_DIR)/lib/api.jar;jars/visaop20.jar"
#
# build rule
#
$(JAVA_CLASS_FILES): $(JAVA_SRC_FILES)
mkdir -p $(CONVERTER_OUTPUT_DIR)
perl ./update_buildid.pl $(JAVA_SRC_FILES)
$(JAVAC) -classpath ${BUILD_CLASSPATH} -d $(OUTPUT_DIR) $(JAVA_SRC_FILES)
#############################################################################
# The next step is to convert the regular Java class files into the Javacard
# format, using the converter program included with the Javacard Kit.
# The output from the converter is applet.cap, but the next step expects
# applet.jar, so we rename it.
#
# Classpath for the converter.
#
CONVERT_CLASSPATH="$(JAVACARD_KIT_DIR)/lib/converter.jar;$(JAVACARD_KIT_DIR)/lib/offcardverifier.jar;$(SLB_DIR)/Smart Cards and Terminals/Cyberflex Access Kits/v4/Classlibrary/jc_api_212.jar"
#
# Location of the .exp files, used for "linking" Javacard code.
#
EXPORT_PATH="$(SLB_DIR)\Smart Cards and Terminals\Cyberflex Access Kits\v4\Toolkit\PRGMaker\Export Files"
#
# build rule
#
$(CONVERTER_OUTPUT_DIR)/applet.jar: $(JAVA_CLASS_FILES)
$(JAVA) -classpath ${CONVERT_CLASSPATH} com.sun.javacard.converter.Converter -classdir $(OUTPUT_DIR) -out EXP JCA CAP -exportpath $(EXPORT_PATH) -applet $(AID) $(APPLET_QUALIFIED_CLASS_NAME) -d $(OUTPUT_DIR) $(PACKAGE) $(PID) 1.0
mv $(CONVERTER_OUTPUT_DIR)/applet.cap $@
###############################################################################
# Finally, we must prepare the applet.jar file to be loaded onto a Schlumberger
# token. This means preparing it to be verified by the on-card verifier, using
# TrustedLogic's "CodeShield" technology. The Schlumberger SDK provides
# a 'makeijc' program to do this. The output is applet.ijc, which is ready to
# be loaded onto a token.
#
# Classpath for the IJC converter.
#
IJC_CLASSPATH="$(SLB_DIR)\Smart Cards and Terminals\Cyberflex Access Kits\v4\Toolkit\PRGMaker\makeijc.jar"
#
# build rule
#
$(CONVERTER_OUTPUT_DIR)/applet.ijc: $(CONVERTER_OUTPUT_DIR)/applet.jar
$(JAVA) -classpath $(IJC_CLASSPATH) com.slb.javacard.jctools.ijc.MakeIJC -verbose -expFileDir $(EXPORT_PATH) -type onCardVerifier $(CONVERTER_OUTPUT_DIR)/applet.jar
mkdir -p ../dist/$(OBJDIR)/bin
cp $@ ../dist/$(OBJDIR)/bin/CardEdge.$(shell cat .buildid).ijc
export:
libs: all
--- NEW FILE README ---
/************************************************************
MUSCLE SmartCard Development
Package: CardEdgeApplet
Type: Java precompiled binaries
Description: CardEdge implementation with JavaCard
Authors: Tommaso Cucinotta <cucinotta(a)sssup.it>
David Corcoran <corcoran(a)linuxnet.com>
Ludovic Rousseau <ludovic.rousseau(a)free.fr>
Modified:
Eirik Herskedal <ehersked(a)cs.purdue.edu>
See AUTHORS file for further details
Date: October 2001 - October 2002
License: See COPYING file
************************************************************/
HISTORY
============================================================
0.9.10: 20 Sep 2002
Correct a security bug: When importing a certificate (from
Mozilla) the keys were created with read, write and use set to
ALWAYS.
0.9.9: 8 Sep 2002
Include Java source code
0.9.8: Jul 2002
Include the converted CAP file
0.9.7: Mar 2002
Inclusion of GemXpressoRADIII support
0.9.6: Nov 2001
Split the packages
0.9.5:
First release
REQUIREMENTS
============================================================
In order to use this program, you must have a JavaCard 2.1.1
compliant smart card and a supported smart card reader.
You must also have all the software required to load a Java
Card Applet on your smartcard.
Different smart card vendors provide emulators for their own
smart cards. You can also try loading this program into an
emulated card. In this case you don't need cards nor readers
to be connected to your system.
DESCRIPTION
============================================================
This package contains source code and precompiled binaries for
the Card Edge Applet, a free implementation of the Cryptographic
Card Edge Definition for Java Enabled Smartcards.
http://www.musclecard.com/musclecard/
Note that different versions of this Applet could be released,
with different features disabled, in order to let you save
space on the card if your application does not require those
features at all.
ADDITIONAL FEATURES
============================================================
This Applet actually supports some pin policy enforcement.
Checks are made on the pin size, character set and mix of
characters.
The exact pin policy depends on parameters provided at
instantiation time.
KNOWN LIMITATIONS
============================================================
This Applet has been tested with Schlumberger Cyberflex
Access 32K cards, Gemplus Gxp 211 PK, Gemplus GemXploreXpresso v3
and is known to work with most cryptographic features involving
RSA and DES keys. DSA testing still needs to be done with cards
supporting it.
KNOWN BUGS
============================================================
None at the moment (02-Oct-2002)
SUPPORT
============================================================
If you need any further information, please contact us using
the public mailing list for the M.U.S.C.L.E. project.
--- NEW FILE applet.pmf ---
[PrgMaker]
Package=com.redhat.nkey.applet
PackageAID=627601FF0000
OutputDir=C:\hack\netkey\applet
ExportDir=C:\PROGRA~1\SCHLUM~1\SMARTC~1\CYBERF~1\v4\Toolkit\prgmaker\Export Files
Version=1.0
ClassDir=C:\hack\netkey\applet\src
[Applets]
NumApplets=1
Applet1=CardEdge.class
Applet1AID=627601FF000000
16 years, 9 months