[Fedora-directory-commits] ldapserver Makefile.am, 1.30, 1.31 Makefile.in, 1.35, 1.36 aclocal.m4, 1.23, 1.24 configure, 1.32, 1.33 configure.ac, 1.23, 1.24 ltmain.sh, 1.11, 1.12
by Doctor Conrad
Author: prowley
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16258
Modified Files:
Makefile.am Makefile.in aclocal.m4 configure configure.ac
ltmain.sh
Log Message:
Add LDAPI
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- Makefile.am 22 Feb 2007 23:59:13 -0000 1.30
+++ Makefile.am 27 Feb 2007 02:57:24 -0000 1.31
@@ -880,6 +880,10 @@
#------------------------
# ns-slapd
#------------------------
+if enable_ldapi
+ GETSOCKETPEER=ldap/servers/slapd/getsocketpeer.c
+endif
+
ns_slapd_SOURCES = ldap/servers/slapd/abandon.c \
ldap/servers/slapd/auth.c \
ldap/servers/slapd/bind.c \
@@ -912,7 +916,8 @@
ldap/servers/slapd/strdup.c \
ldap/servers/slapd/stubs.c \
ldap/servers/slapd/tempnam.c \
- ldap/servers/slapd/unbind.c
+ ldap/servers/slapd/unbind.c \
+ $(GETSOCKETPEER)
ns_slapd_CPPFLAGS = $(AM_CPPFLAGS) @sasl_inc@ @ldapsdk_inc@ @nss_inc@ \
@nspr_inc@ @svrcore_inc@
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- Makefile.in 23 Feb 2007 19:40:52 -0000 1.35
+++ Makefile.in 27 Feb 2007 02:57:24 -0000 1.36
@@ -628,6 +628,26 @@
mmldif_bin_DEPENDENCIES = libslapd.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__ns_slapd_SOURCES_DIST = ldap/servers/slapd/abandon.c \
+ ldap/servers/slapd/auth.c ldap/servers/slapd/bind.c \
+ ldap/servers/slapd/compare.c ldap/servers/slapd/config.c \
+ ldap/servers/slapd/configdse.c ldap/servers/slapd/connection.c \
+ ldap/servers/slapd/conntable.c ldap/servers/slapd/daemon.c \
+ ldap/servers/slapd/detach.c ldap/servers/slapd/extendop.c \
+ ldap/servers/slapd/fedse.c ldap/servers/slapd/fileio.c \
+ ldap/servers/slapd/getopt_ext.c ldap/servers/slapd/globals.c \
+ ldap/servers/slapd/house.c ldap/servers/slapd/init.c \
+ ldap/servers/slapd/lite_entries.c ldap/servers/slapd/main.c \
+ ldap/servers/slapd/monitor.c ldap/servers/slapd/passwd_extop.c \
+ ldap/servers/slapd/protect_db.c ldap/servers/slapd/psearch.c \
+ ldap/servers/slapd/pw_mgmt.c ldap/servers/slapd/rootdse.c \
+ ldap/servers/slapd/sasl_io.c ldap/servers/slapd/saslbind.c \
+ ldap/servers/slapd/search.c \
+ ldap/servers/slapd/start_tls_extop.c \
+ ldap/servers/slapd/strdup.c ldap/servers/slapd/stubs.c \
+ ldap/servers/slapd/tempnam.c ldap/servers/slapd/unbind.c \
+ ldap/servers/slapd/getsocketpeer.c
+@enable_ldapi_TRUE@am__objects_4 = ldap/servers/slapd/ns_slapd-getsocketpeer.$(OBJEXT)
am_ns_slapd_OBJECTS = ldap/servers/slapd/ns_slapd-abandon.$(OBJEXT) \
ldap/servers/slapd/ns_slapd-auth.$(OBJEXT) \
ldap/servers/slapd/ns_slapd-bind.$(OBJEXT) \
@@ -660,7 +680,7 @@
ldap/servers/slapd/ns_slapd-strdup.$(OBJEXT) \
ldap/servers/slapd/ns_slapd-stubs.$(OBJEXT) \
ldap/servers/slapd/ns_slapd-tempnam.$(OBJEXT) \
- ldap/servers/slapd/ns_slapd-unbind.$(OBJEXT)
+ ldap/servers/slapd/ns_slapd-unbind.$(OBJEXT) $(am__objects_4)
ns_slapd_OBJECTS = $(am_ns_slapd_OBJECTS)
ns_slapd_DEPENDENCIES = libslapd.la libldaputil.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -752,7 +772,7 @@
$(ldap_agent_bin_SOURCES) $(am__ldclt_bin_SOURCES_DIST) \
$(ldif_bin_SOURCES) $(makstrdb_SOURCES) \
$(migratecred_bin_SOURCES) $(mmldif_bin_SOURCES) \
- $(ns_slapd_SOURCES) $(pwdhash_bin_SOURCES) \
+ $(am__ns_slapd_SOURCES_DIST) $(pwdhash_bin_SOURCES) \
$(rsearch_bin_SOURCES)
configDATA_INSTALL = $(INSTALL_DATA)
nodist_propertyDATA_INSTALL = $(INSTALL_DATA)
@@ -837,7 +857,6 @@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
-SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOLARIS_FALSE = @SOLARIS_FALSE@
@@ -882,6 +901,8 @@
debug_defs = @debug_defs@
enable_dna_FALSE = @enable_dna_FALSE@
enable_dna_TRUE = @enable_dna_TRUE@
+enable_ldapi_FALSE = @enable_ldapi_FALSE@
+enable_ldapi_TRUE = @enable_ldapi_TRUE@
enable_pam_passthru_FALSE = @enable_pam_passthru_FALSE@
enable_pam_passthru_TRUE = @enable_pam_passthru_TRUE@
exec_prefix = @exec_prefix@
@@ -1749,6 +1770,7 @@
#------------------------
# ns-slapd
#------------------------
+@enable_ldapi_TRUE@GETSOCKETPEER = ldap/servers/slapd/getsocketpeer.c
ns_slapd_SOURCES = ldap/servers/slapd/abandon.c \
ldap/servers/slapd/auth.c \
ldap/servers/slapd/bind.c \
@@ -1781,7 +1803,8 @@
ldap/servers/slapd/strdup.c \
ldap/servers/slapd/stubs.c \
ldap/servers/slapd/tempnam.c \
- ldap/servers/slapd/unbind.c
+ ldap/servers/slapd/unbind.c \
+ $(GETSOCKETPEER)
ns_slapd_CPPFLAGS = $(AM_CPPFLAGS) @sasl_inc@ @ldapsdk_inc@ @nss_inc@ \
@nspr_inc@ @svrcore_inc@
@@ -3628,6 +3651,9 @@
ldap/servers/slapd/ns_slapd-unbind.$(OBJEXT): \
ldap/servers/slapd/$(am__dirstamp) \
ldap/servers/slapd/$(DEPDIR)/$(am__dirstamp)
+ldap/servers/slapd/ns_slapd-getsocketpeer.$(OBJEXT): \
+ ldap/servers/slapd/$(am__dirstamp) \
+ ldap/servers/slapd/$(DEPDIR)/$(am__dirstamp)
ns-slapd$(EXEEXT): $(ns_slapd_OBJECTS) $(ns_slapd_DEPENDENCIES)
@rm -f ns-slapd$(EXEEXT)
$(ns_slapd_LINK) $(ns_slapd_LDFLAGS) $(ns_slapd_OBJECTS) $(ns_slapd_LDADD) $(LIBS)
@@ -4342,6 +4368,7 @@
-rm -f ldap/servers/slapd/ns_slapd-fedse.$(OBJEXT)
-rm -f ldap/servers/slapd/ns_slapd-fileio.$(OBJEXT)
-rm -f ldap/servers/slapd/ns_slapd-getopt_ext.$(OBJEXT)
+ -rm -f ldap/servers/slapd/ns_slapd-getsocketpeer.$(OBJEXT)
-rm -f ldap/servers/slapd/ns_slapd-globals.$(OBJEXT)
-rm -f ldap/servers/slapd/ns_slapd-house.$(OBJEXT)
-rm -f ldap/servers/slapd/ns_slapd-init.$(OBJEXT)
@@ -4792,6 +4819,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ns_slapd-fedse.Po(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ns_slapd-fileio.Po(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ns_slapd-getopt_ext.Po(a)am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Po(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ns_slapd-globals.Po(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ns_slapd-house.Po(a)am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@ldap/servers/slapd/$(DEPDIR)/ns_slapd-init.Po(a)am__quote@
@@ -8241,6 +8269,20 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ns_slapd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/slapd/ns_slapd-unbind.obj `if test -f 'ldap/servers/slapd/unbind.c'; then $(CYGPATH_W) 'ldap/servers/slapd/unbind.c'; else $(CYGPATH_W) '$(srcdir)/ldap/servers/slapd/unbind.c'; fi`
+ldap/servers/slapd/ns_slapd-getsocketpeer.o: ldap/servers/slapd/getsocketpeer.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ns_slapd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/slapd/ns_slapd-getsocketpeer.o -MD -MP -MF "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Tpo" -c -o ldap/servers/slapd/ns_slapd-getsocketpeer.o `test -f 'ldap/servers/slapd/getsocketpeer.c' || echo '$(srcdir)/'`ldap/servers/slapd/getsocketpeer.c; \
+@am__fastdepCC_TRUE@ then mv -f "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Tpo" "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Po"; else rm -f "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldap/servers/slapd/getsocketpeer.c' object='ldap/servers/slapd/ns_slapd-getsocketpeer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ns_slapd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/slapd/ns_slapd-getsocketpeer.o `test -f 'ldap/servers/slapd/getsocketpeer.c' || echo '$(srcdir)/'`ldap/servers/slapd/getsocketpeer.c
+
+ldap/servers/slapd/ns_slapd-getsocketpeer.obj: ldap/servers/slapd/getsocketpeer.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ns_slapd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/slapd/ns_slapd-getsocketpeer.obj -MD -MP -MF "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Tpo" -c -o ldap/servers/slapd/ns_slapd-getsocketpeer.obj `if test -f 'ldap/servers/slapd/getsocketpeer.c'; then $(CYGPATH_W) 'ldap/servers/slapd/getsocketpeer.c'; else $(CYGPATH_W) '$(srcdir)/ldap/servers/slapd/getsocketpeer.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Tpo" "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Po"; else rm -f "ldap/servers/slapd/$(DEPDIR)/ns_slapd-getsocketpeer.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldap/servers/slapd/getsocketpeer.c' object='ldap/servers/slapd/ns_slapd-getsocketpeer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ns_slapd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/slapd/ns_slapd-getsocketpeer.obj `if test -f 'ldap/servers/slapd/getsocketpeer.c'; then $(CYGPATH_W) 'ldap/servers/slapd/getsocketpeer.c'; else $(CYGPATH_W) '$(srcdir)/ldap/servers/slapd/getsocketpeer.c'; fi`
+
ldap/servers/slapd/tools/pwdhash_bin-pwenc.o: ldap/servers/slapd/tools/pwenc.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwdhash_bin_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/slapd/tools/pwdhash_bin-pwenc.o -MD -MP -MF "ldap/servers/slapd/tools/$(DEPDIR)/pwdhash_bin-pwenc.Tpo" -c -o ldap/servers/slapd/tools/pwdhash_bin-pwenc.o `test -f 'ldap/servers/slapd/tools/pwenc.c' || echo '$(srcdir)/'`ldap/servers/slapd/tools/pwenc.c; \
@am__fastdepCC_TRUE@ then mv -f "ldap/servers/slapd/tools/$(DEPDIR)/pwdhash_bin-pwenc.Tpo" "ldap/servers/slapd/tools/$(DEPDIR)/pwdhash_bin-pwenc.Po"; else rm -f "ldap/servers/slapd/tools/$(DEPDIR)/pwdhash_bin-pwenc.Tpo"; exit 1; fi
Index: aclocal.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- aclocal.m4 23 Feb 2007 19:40:51 -0000 1.23
+++ aclocal.m4 27 Feb 2007 02:57:24 -0000 1.24
@@ -1597,7 +1597,7 @@
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
@@ -4305,9 +4305,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -4441,11 +4438,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -4457,7 +4454,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -4537,7 +4534,7 @@
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -6373,7 +6370,6 @@
done
done
done
-IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -6406,7 +6402,6 @@
done
])
SED=$lt_cv_path_SED
-AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- configure 23 Feb 2007 19:40:52 -0000 1.32
+++ configure 27 Feb 2007 02:57:24 -0000 1.33
@@ -465,7 +465,7 @@
#endif"
ac_default_prefix=/opt/$PACKAGE_NAME
-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 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link 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 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX!
XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -3832,7 +3832,6 @@
done
done
done
-IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -3867,7 +3866,6 @@
fi
SED=$lt_cv_path_SED
-
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
@@ -4308,7 +4306,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4311 "configure"' > conftest.$ac_ext
+ echo '#line 4309 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5443,7 +5441,7 @@
# Provide some information about the compiler.
-echo "$as_me:5446:" \
+echo "$as_me:5444:" \
"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
@@ -6506,11 +6504,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:6509: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6507: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6513: \$? = $ac_status" >&5
+ echo "$as_me:6511: \$? = $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.
@@ -6774,11 +6772,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:6777: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6775: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6781: \$? = $ac_status" >&5
+ echo "$as_me:6779: \$? = $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.
@@ -6878,11 +6876,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:6881: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6879: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6885: \$? = $ac_status" >&5
+ echo "$as_me:6883: \$? = $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
@@ -8347,7 +8345,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 8350 "configure"' > conftest.$ac_ext
+ echo '#line 8348 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8366,7 +8364,7 @@
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
@@ -9244,7 +9242,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9247 "configure"
+#line 9245 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9344,7 +9342,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9347 "configure"
+#line 9345 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9675,9 +9673,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -9811,11 +9806,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -9827,7 +9822,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -9907,7 +9902,7 @@
link_all_deplibs=$link_all_deplibs
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -11687,11 +11682,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:11690: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11685: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11694: \$? = $ac_status" >&5
+ echo "$as_me:11689: \$? = $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.
@@ -11791,11 +11786,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:11794: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11789: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11798: \$? = $ac_status" >&5
+ echo "$as_me:11793: \$? = $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
@@ -12327,7 +12322,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 12330 "configure"' > conftest.$ac_ext
+ echo '#line 12325 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -12346,7 +12341,7 @@
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
@@ -12731,9 +12726,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_CXX
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -12867,11 +12859,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_CXX
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_CXX
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -12883,7 +12875,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -12963,7 +12955,7 @@
link_all_deplibs=$link_all_deplibs_CXX
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -13385,11 +13377,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:13388: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13380: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13392: \$? = $ac_status" >&5
+ echo "$as_me:13384: \$? = $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.
@@ -13489,11 +13481,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:13492: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13484: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13496: \$? = $ac_status" >&5
+ echo "$as_me:13488: \$? = $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
@@ -14938,7 +14930,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 14941 "configure"' > conftest.$ac_ext
+ echo '#line 14933 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -14957,7 +14949,7 @@
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
@@ -15342,9 +15334,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_F77
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -15478,11 +15467,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_F77
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_F77
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -15494,7 +15483,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -15574,7 +15563,7 @@
link_all_deplibs=$link_all_deplibs_F77
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -15716,11 +15705,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:15719: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15708: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15723: \$? = $ac_status" >&5
+ echo "$as_me:15712: \$? = $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.
@@ -15984,11 +15973,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:15987: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15976: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15991: \$? = $ac_status" >&5
+ echo "$as_me:15980: \$? = $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.
@@ -16088,11 +16077,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:16091: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16080: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16095: \$? = $ac_status" >&5
+ echo "$as_me:16084: \$? = $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
@@ -17557,7 +17546,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 17560 "configure"' > conftest.$ac_ext
+ echo '#line 17549 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -17576,7 +17565,7 @@
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
@@ -17961,9 +17950,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_GCJ
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18097,11 +18083,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_GCJ
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_GCJ
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18113,7 +18099,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18193,7 +18179,7 @@
link_all_deplibs=$link_all_deplibs_GCJ
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -18445,9 +18431,6 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_RC
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18581,11 +18564,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_RC
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_RC
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18597,7 +18580,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18677,7 +18660,7 @@
link_all_deplibs=$link_all_deplibs_RC
# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -23005,6 +22988,16 @@
echo "${ECHO_T}no" >&6
fi
+
+if test "$enable_ldapi" = "yes"; then
+ enable_ldapi_TRUE=
+ enable_ldapi_FALSE='#'
+else
+ enable_ldapi_TRUE='#'
+ enable_ldapi_FALSE=
+fi
+
+
# the default prefix - override with --prefix or --with-fhs
@@ -25218,6 +25211,13 @@
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${enable_ldapi_TRUE}" && test -z "${enable_ldapi_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"enable_ldapi\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"enable_ldapi\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${WINNT_TRUE}" && test -z "${WINNT_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"WINNT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -25826,7 +25826,6 @@
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@SED@,$SED,;t t
s,@EGREP@,$EGREP,;t t
s,@LN_S@,$LN_S,;t t
s,@ECHO@,$ECHO,;t t
@@ -25848,6 +25847,8 @@
s,@enable_pam_passthru_FALSE@,$enable_pam_passthru_FALSE,;t t
s,@enable_dna_TRUE@,$enable_dna_TRUE,;t t
s,@enable_dna_FALSE@,$enable_dna_FALSE,;t t
+s,@enable_ldapi_TRUE@,$enable_ldapi_TRUE,;t t
+s,@enable_ldapi_FALSE@,$enable_ldapi_FALSE,;t t
s,@configdir@,$configdir,;t t
s,@sampledatadir@,$sampledatadir,;t t
s,@propertydir@,$propertydir,;t t
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- configure.ac 23 Feb 2007 19:40:51 -0000 1.23
+++ configure.ac 27 Feb 2007 02:57:24 -0000 1.24
@@ -119,6 +119,7 @@
else
AC_MSG_RESULT(no)
fi
+AM_CONDITIONAL(enable_ldapi,test "$enable_ldapi" = "yes")
# the default prefix - override with --prefix or --with-fhs
AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])
Index: ltmain.sh
===================================================================
RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ltmain.sh 21 Feb 2007 17:44:13 -0000 1.11
+++ ltmain.sh 27 Feb 2007 02:57:24 -0000 1.12
@@ -46,16 +46,10 @@
VERSION=1.5.22
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
# Check that we have a working $echo.
@@ -111,14 +105,12 @@
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- fi"
-done
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
# Make sure IFS has a sensible default
lt_nl='
@@ -144,8 +136,6 @@
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
#####################################
# Shell function definitions:
@@ -337,17 +327,7 @@
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xlib_u=$my_xlib
- while :; do
- case " $extracted_archives " in
- *" $my_xlib_u "*)
- extracted_serial=`expr $extracted_serial + 1`
- my_xlib_u=lt$extracted_serial-$my_xlib ;;
- *) break ;;
- esac
- done
- extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
@@ -778,7 +758,6 @@
*.f90) xform=f90 ;;
*.for) xform=for ;;
*.java) xform=java ;;
- *.obj) xform=obj ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -1159,9 +1138,8 @@
for arg
do
case $arg in
- -all-static | -static | -static-libtool-libs)
- case $arg in
- -all-static)
+ -all-static | -static)
+ if test "X$arg" = "X-all-static"; then
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
@@ -1169,20 +1147,12 @@
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
- ;;
- -static)
+ else
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
- ;;
- -static-libtool-libs)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- esac
+ fi
build_libtool_libs=no
build_old_libs=yes
break
@@ -1742,7 +1712,7 @@
continue
;;
- -static | -static-libtool-libs)
+ -static)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -2520,9 +2490,7 @@
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
- test -z "$old_library"; }; then
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -3218,7 +3186,7 @@
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows|none)
+ darwin|linux|osf|windows)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3442,11 +3410,11 @@
fi
# Eliminate all temporary directories.
-# for path in $notinst_path; do
-# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
-# done
+ for path in $notinst_path; do
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3547,12 +3515,13 @@
int main() { return 0; }
EOF
$rm conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" != "0"; then
+ if test "$name" != "" && test "$name" -ne "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3591,7 +3560,9 @@
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ $LTCC $LTCFLAGS -o conftest conftest.c $i
+ # Did it work?
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3623,7 +3594,7 @@
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -4268,14 +4239,12 @@
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec and hope we can get by with
- # turning comma into space..
+ # -Wl from whole_archive_flag_spec
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4723,16 +4692,16 @@
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
else
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
fi
;;
* )
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE(a)%$output_objdir/${outputname}S.${objext}%"`
;;
esac
;;
@@ -4747,13 +4716,13 @@
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
- finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
@@ -4840,7 +4809,7 @@
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
else
# fast_install is set to needless
relink_command=
@@ -4877,7 +4846,7 @@
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi
# Quote $echo for shipping.
@@ -5284,18 +5253,6 @@
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5438,7 +5395,7 @@
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \$*\"
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit $EXIT_FAILURE
fi
else
@@ -5624,7 +5581,7 @@
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5969,9 +5926,9 @@
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
else
- relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6180,7 +6137,7 @@
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -6456,15 +6413,12 @@
fi
# Restore saved environment variables
- for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
- do
- eval "if test \"\${save_$lt_var+set}\" = set; then
- $lt_var=\$save_$lt_var; export $lt_var
- else
- $lt_unset $lt_var
- fi"
- done
-
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6821,9 +6775,9 @@
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6837,11 +6791,9 @@
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of uninstalled libtool libraries
- -static-libtool-libs
- do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
17 years, 1 month
[Fedora-directory-commits] esc/src/lib/coolkey SmartCardMonitoringThread.cpp, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2391
Modified Files:
SmartCardMonitoringThread.cpp
Log Message:
Add time stamps to log messages.
Index: SmartCardMonitoringThread.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SmartCardMonitoringThread.cpp 27 Sep 2006 17:47:46 -0000 1.2
+++ SmartCardMonitoringThread.cpp 24 Feb 2007 02:22:04 -0000 1.3
@@ -28,213 +28,215 @@
#include "SlotUtils.h"
#include <assert.h>
+#include <time.h>
static PRLogModuleInfo *coolKeyLogSC = PR_NewLogModule("coolKeySmart");
SmartCardMonitoringThread::SmartCardMonitoringThread(SECMODModule *aModule)
: mModule(aModule), mThread(NULL)
{
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::SmartCardMonitoringThread : \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::SmartCardMonitoringThread : \n",GetTStamp(tBuff,56)));
}
SmartCardMonitoringThread::~SmartCardMonitoringThread()
{
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::~SmartCardMonitoringThread : \n"));
- Stop();
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::~SmartCardMonitoringThread : \n",GetTStamp(tBuff,56)));
+ Stop();
}
void SmartCardMonitoringThread::Start()
{
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Start : \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Start : \n",GetTStamp(tBuff,56)));
- if (!mThread) {
- mThread = PR_CreateThread(PR_SYSTEM_THREAD, LaunchExecute, this,
+ if (!mThread) {
+ mThread = PR_CreateThread(PR_SYSTEM_THREAD, LaunchExecute, this,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_JOINABLE_THREAD, 0);
- }
+ }
}
void SmartCardMonitoringThread::Stop()
{
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Stop : \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Stop : \n",GetTStamp(tBuff,56)));
- Interrupt();
+ Interrupt();
}
void SmartCardMonitoringThread::Insert(PK11SlotInfo *aSlot)
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Insert Key. \n",GetTStamp(tBuff,56)));
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Insert Key. \n"));
-
- CoolKeyInfo *info = CKHGetCoolKeyInfo(aSlot);
- if (info) {
- if (!InsertCoolKeyInfoIntoCoolKeyList(info)) {
- AutoCoolKey key(eCKType_CoolKey, info->mCUID);
- CoolKeyNotify(&key, eCKState_KeyInserted, 0);
- } else {
- delete info;
- }
- }
+ CoolKeyInfo *info = CKHGetCoolKeyInfo(aSlot);
+ if (info) {
+ if (!InsertCoolKeyInfoIntoCoolKeyList(info)) {
+ AutoCoolKey key(eCKType_CoolKey, info->mCUID);
+ CoolKeyNotify(&key, eCKState_KeyInserted, 0);
+ } else {
+ delete info;
+ }
+ }
}
void SmartCardMonitoringThread::Remove(CoolKeyInfo *info)
{
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Remove Key: \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Remove Key: \n",GetTStamp(tBuff,56)));
- info->mInfoFlags = 0;
- AutoCoolKey key(eCKType_CoolKey, info->mCUID);
- CoolKeyNotify(&key, eCKState_KeyRemoved, 0);
- RemoveCoolKeyInfoFromCoolKeyList(info);
+ info->mInfoFlags = 0;
+ AutoCoolKey key(eCKType_CoolKey, info->mCUID);
+ CoolKeyNotify(&key, eCKState_KeyRemoved, 0);
+ RemoveCoolKeyInfoFromCoolKeyList(info);
}
void SmartCardMonitoringThread::Execute()
{
- PK11SlotInfo *slot;
+ char tBuff[56];
+ PK11SlotInfo *slot;
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Execute.\n"));
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Execute.\n",GetTStamp(tBuff,56)));
//
// populate token names for already inserted tokens.
//
- PK11SlotList *sl =
+ PK11SlotList *sl =
PK11_FindSlotsByNames(mModule->dllName, NULL, NULL, PR_TRUE);
- PK11SlotListElement *sle;
+ PK11SlotListElement *sle;
- if (sl) {
+ if (sl) {
- for (sle=PK11_GetFirstSafe(sl); sle;
+ for (sle=PK11_GetFirstSafe(sl); sle;
sle=PK11_GetNextSafe(sl,sle,PR_FALSE)) {
-
- Insert(sle->slot);
-
- PK11_FreeSlot(sle->slot);
+ Insert(sle->slot);
+ PK11_FreeSlot(sle->slot);
+ }
+ PK11_FreeSlotList(sl);
}
- PK11_FreeSlotList(sl);
- }
// loop starts..
- do {
-
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Execute.Waiting for TokenEvent\n"));
- slot = SECMOD_WaitForAnyTokenEvent(mModule, 0, PR_SecondsToInterval(1) );
-
-
- PR_LOG( coolKeyLogSC, PR_LOG_ALWAYS,
- ("SmartCard thread event detected. \n"));
-
- if (slot == NULL) {
+ do {
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Execute. slot is NULL\n"));
- break;
- }
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Execute.Waiting for TokenEvent\n",GetTStamp(tBuff,56)));
+ slot = SECMOD_WaitForAnyTokenEvent(mModule, 0, PR_SecondsToInterval(1) );
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCard thread event detected. \n",GetTStamp(tBuff,56)));
+
+ if (slot == NULL) {
+
+ PR_LOG( coolKeyLogSC, PR_LOG_ERROR,
+ ("%s SmartCard thread event detected, but the slot is NULL.\n",GetTStamp(tBuff,56)));
+ break;
+ }
// now we have a potential insertion or removal event see if the slot
// is present to determine which it is...
- CoolKeyInfo *info = GetCoolKeyInfoBySlot(slot);
-
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::info %p : \n",info));
+ CoolKeyInfo *info = GetCoolKeyInfoBySlot(slot);
- PRBool isPresent = PK11_IsPresent(slot);
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::info %p : \n",GetTStamp(tBuff,56),info));
+ PRBool isPresent = PK11_IsPresent(slot);
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::isPresent %d : \n",isPresent));
-
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::isPresent %d : \n",GetTStamp(tBuff,56),isPresent));
/* if we think we have a token, but it's not the right one, or it's
* not there, then send a removal event */
- if (info && (!isPresent || (info->mSeries != PK11_GetSlotSeries(slot))) ) {
+ if (info && (!isPresent || (info->mSeries != PK11_GetSlotSeries(slot))) ) {
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Execute Token Removed : \n"));
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Execute Token Removed : \n",GetTStamp(tBuff,56)));
- Remove(info);
- delete info;
- info = NULL;
- }
+ Remove(info);
+ delete info;
+ info = NULL;
+ }
/* if the there is a token and we don't have info for it, send an
* insertion event */
- if (isPresent && !info) {
+ if (isPresent && !info) {
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Execute Token Inserted : \n"));
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Execute Token Inserted : \n",GetTStamp(tBuff,56)));
- Insert(slot);
- }
- PK11_FreeSlot(slot);
+ Insert(slot);
+ }
+ PK11_FreeSlot(slot);
- } while (1);
+ } while (1);
}
void SmartCardMonitoringThread::Interrupt()
{
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Interrupt: mThread %p mModule %p\n",mThread,mModule));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Interrupt: mThread %p mModule %p\n",GetTStamp(tBuff,56),mThread,mModule));
- if(mThread)
- {
- SECStatus rv;
- rv = SECMOD_CancelWait(mModule);
- if (rv !=SECSuccess) {
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Interrupt:"
+ if(mThread)
+ {
+ SECStatus rv;
+ rv = SECMOD_CancelWait(mModule);
+ if (rv !=SECSuccess) {
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Interrupt:"
" Can't join thread. result of CancelWait"
- " %d error %d \n",rv,PORT_GetError()));
+ " %d error %d \n",GetTStamp(tBuff,56),rv,PORT_GetError()));
- return; // don't hang if we couldn't wake up thread!!
- }
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Interrupt: "
- "About to join smart card thread. \n"));
+ return; // don't hang if we couldn't wake up thread!!
+ }
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Interrupt: "
+ "About to join smart card thread. \n",GetTStamp(tBuff,56)));
- PRStatus rs = PR_JoinThread(mThread);
+ PRStatus rs = PR_JoinThread(mThread);
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Interrupt: result"
- " of PR_JoinThread %d error %d \n",rs,PORT_GetError()));
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Interrupt: result"
+ " of PR_JoinThread %d error %d \n",GetTStamp(tBuff,56),rs,PORT_GetError()));
- mThread = 0;
- }
+ mThread = 0;
+ }
- if(mModule)
- {
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Interrupt: about to unload module"
+ if(mModule)
+ {
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Interrupt: about to unload module \n",GetTStamp(tBuff,56)
));
- mModule = 0;
- }
+ mModule = 0;
+ }
}
void SmartCardMonitoringThread::Release() {
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::Release : \n",GetTStamp(tBuff,56)));
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::Release : \n"));
-
- if (mCurrentActivation)
- free(mCurrentActivation);
+ if (mCurrentActivation)
+ free(mCurrentActivation);
- mCurrentActivation= NULL;
+ mCurrentActivation= NULL;
}
void SmartCardMonitoringThread::OnComplete()
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
+ ("%s SmartCardMonitoringThread::OnComplete : \n",GetTStamp(tBuff,56)));
- PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
- ("SmartCardMonitoringThread::OnComplete : \n"));
-
- AutoCoolKey key(eCKType_CoolKey, mCurrentActivation);
- CoolKeyNotify(&key, eCKState_KeyInserted, 0);
+ AutoCoolKey key(eCKType_CoolKey, mCurrentActivation);
+ CoolKeyNotify(&key, eCKState_KeyInserted, 0);
}
void SmartCardMonitoringThread::OnDisconnect() {}
@@ -242,6 +244,5 @@
void SmartCardMonitoringThread::LaunchExecute(void *arg)
{
- ((SmartCardMonitoringThread*)arg)->Execute();
+ ((SmartCardMonitoringThread*)arg)->Execute();
}
-
17 years, 1 month
[Fedora-directory-commits] esc/src/lib/coolkey SlotUtils.cpp, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2362
Modified Files:
SlotUtils.cpp
Log Message:
Add time stamps to log messages and formatting.
Index: SlotUtils.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SlotUtils.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SlotUtils.cpp 27 Sep 2006 17:47:46 -0000 1.2
+++ SlotUtils.cpp 24 Feb 2007 02:21:15 -0000 1.3
@@ -32,6 +32,7 @@
#include "prprf.h"
#include "prlock.h"
#include <assert.h>
+#include <time.h>
#include "SlotUtils.h"
#include <list>
@@ -52,48 +53,48 @@
class AutoCoolKeyListLock
{
public:
- AutoCoolKeyListLock() { LockCoolKeyList(); }
- ~AutoCoolKeyListLock() { UnlockCoolKeyList(); }
+ AutoCoolKeyListLock() { LockCoolKeyList(); }
+ ~AutoCoolKeyListLock() { UnlockCoolKeyList(); }
};
void
InitCoolKeyList()
{
-
- gCoolKeyListLock = PR_NewLock();
+ gCoolKeyListLock = PR_NewLock();
}
void
DestroyCoolKeyList()
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("DestroyCoolKeyList:\n"));
- ClearCoolKeyList();
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s DestroyCoolKeyList:\n",GetTStamp(tBuff,56)));
+ ClearCoolKeyList();
- if (gCoolKeyListLock)
- {
- PR_DestroyLock(gCoolKeyListLock);
- gCoolKeyListLock = NULL;
- }
+ if (gCoolKeyListLock)
+ {
+ PR_DestroyLock(gCoolKeyListLock);
+ gCoolKeyListLock = NULL;
+ }
}
void
LockCoolKeyList()
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("LockCoolKeyList:\n gCoolKeyListLock %p",gCoolKeyListLock));
-
- if(!gCoolKeyListLock)
- {
- gCoolKeyListLock = PR_NewLock();
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s LockCoolKeyList:\n gCoolKeyListLock %p",GetTStamp(tBuff,56),gCoolKeyListLock));
- }
+ if(!gCoolKeyListLock)
+ {
+ gCoolKeyListLock = PR_NewLock();
+ }
- if (gCoolKeyListLock) {
+ if (gCoolKeyListLock) {
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("LockCoolKeyList:\n gCoolKeyListLock %p about to lock gCoolKeyListLock",gCoolKeyListLock));
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s LockCoolKeyList:\n gCoolKeyListLock %p about to lock gCoolKeyListLock",GetTStamp(tBuff,56),gCoolKeyListLock));
PR_Lock(gCoolKeyListLock);
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("LockCoolKeyList:\n gCoolKeyListLock %p obtained gCoolKeyListLock",gCoolKeyListLock));
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s LockCoolKeyList:\n gCoolKeyListLock %p obtained gCoolKeyListLock",GetTStamp(tBuff,56),gCoolKeyListLock));
#ifdef DEBUG
assert(gCoolKeyListLockCount == 0);
@@ -105,385 +106,409 @@
void
UnlockCoolKeyList()
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("UnLockCoolKeyList:\n"));
- if (gCoolKeyListLock) {
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s UnLockCoolKeyList:\n",GetTStamp(tBuff,56)));
+ if (gCoolKeyListLock) {
#ifdef DEBUG
- --gCoolKeyListLockCount;
- assert(gCoolKeyListLockCount == 0);
+ --gCoolKeyListLockCount;
+ assert(gCoolKeyListLockCount == 0);
#endif // DEBUG
- PR_Unlock(gCoolKeyListLock);
- }
+ PR_Unlock(gCoolKeyListLock);
+ }
}
CoolKeyInfo *
GetCoolKeyInfoByReaderName(const char *aReaderName)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCoolKeyInfoByReaderName:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCoolKeyInfoByReaderName:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- std::list<CoolKeyInfo*>::iterator it;
+ std::list<CoolKeyInfo*>::iterator it;
- for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
- {
- if (!PL_strcasecmp((*it)->mReaderName, aReaderName))
- return *it;
- }
+ for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
+ {
+ if (!PL_strcasecmp((*it)->mReaderName, aReaderName))
+ return *it;
+ }
- return NULL;
+ return NULL;
}
CoolKeyInfo *
GetCoolKeyInfoBySlotName(const char *aSlotName)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCoolKeyInfoBySlotName:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCoolKeyInfoBySlotName:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- std::list<CoolKeyInfo*>::iterator it;
+ std::list<CoolKeyInfo*>::iterator it;
- for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
- {
- const char* slotName = PK11_GetSlotName((*it)->mSlot);
-
- if (!PL_strcasecmp(slotName, aSlotName))
- {
- return (*it);
- }
- }
+ for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
+ {
+ const char* slotName = PK11_GetSlotName((*it)->mSlot);
- return NULL;
+ if (!PL_strcasecmp(slotName, aSlotName))
+ {
+ return (*it);
+ }
+ }
+
+ return NULL;
}
CoolKeyInfo *
GetCoolKeyInfoBySlot(PK11SlotInfo *aSlot)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCoolKeyInfoBySlot:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCoolKeyInfoBySlot:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- std::list<CoolKeyInfo*>::iterator it;
+ std::list<CoolKeyInfo*>::iterator it;
- for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
- {
- if ((*it)->mSlot == aSlot)
- {
- return (*it);
- }
- }
+ for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
+ {
+ if ((*it)->mSlot == aSlot)
+ {
+ return (*it);
+ }
+ }
- return NULL;
+ return NULL;
}
CoolKeyInfo *
GetCoolKeyInfoByKeyIDInternal(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCoolKeyInfoByKeyIDInternal:\n"));
- std::list<CoolKeyInfo*>::iterator it;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCoolKeyInfoByKeyIDInternal:\n",GetTStamp(tBuff,56)));
+ std::list<CoolKeyInfo*>::iterator it;
+
+ if(!aKey)
+ return NULL;
- for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
- {
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCoolKeyInfoByKeyIDInternal id %s:\n",(*it)->mCUID));
+ for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
+ {
+
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCoolKeyInfoByKeyIDInternal id %s:\n",GetTStamp(tBuff,56),(*it)->mCUID));
// XXX_KEY_TYPE_CASUALTY: We need to check the keyType here too!
- if (!PL_strcasecmp((*it)->mCUID, aKey->mKeyID))
- return *it;
- }
+ if (!PL_strcasecmp((*it)->mCUID, aKey->mKeyID))
+ return *it;
+ }
- return NULL;
+ return NULL;
}
CoolKeyInfo *
GetCoolKeyInfoByKeyID(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCoolKeyInfoByKeyID:\n"));
- AutoCoolKeyListLock autoLock;
- return GetCoolKeyInfoByKeyIDInternal(aKey);
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCoolKeyInfoByKeyID:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
+ return GetCoolKeyInfoByKeyIDInternal(aKey);
}
-
CoolKeyInfo *
GetCoolKeyInfoByTokenName(const char *aTokenName)
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCoolKeyInfoByTokenName:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCoolKeyInfoByTokenName:\n"));
- AutoCoolKeyListLock autoLock;
+ std::list<CoolKeyInfo*>::iterator it;
- std::list<CoolKeyInfo*>::iterator it;
+ for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
+ {
+ char* tokenName = PK11_GetTokenName((*it)->mSlot);
- for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
- {
- char* tokenName = PK11_GetTokenName((*it)->mSlot);
-
- if (!PL_strcasecmp(tokenName, aTokenName))
- {
- return (*it);
- }
- }
+ if (!PL_strcasecmp(tokenName, aTokenName))
+ {
+ return (*it);
+ }
+ }
- return NULL;
+ return NULL;
}
const char *
GetReaderNameForKeyID(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetReaderNameForKeyID:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetReaderNameForKeyID:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- if (!info)
- return 0;
+ if (!info)
+ return 0;
- return info->mReaderName;
+ return info->mReaderName;
}
const char *
GetSlotNameForKeyID(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetSlotNameForKeyID:\n"));
- const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- if (!info)
- return NULL;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetSlotNameForKeyID:\n",GetTStamp(tBuff,56)));
+ const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ if (!info)
+ return NULL;
- return PK11_GetSlotName(info->mSlot);
+ return PK11_GetSlotName(info->mSlot);
}
const char *
GetATRForKeyID(const CoolKey *aKey)
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetSlotNameForKeyID:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetSlotNameForKeyID:\n"));
- AutoCoolKeyListLock autoLock;
-
- const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- if (!info)
- return 0;
+ if (!info)
+ return 0;
- return info->mATR;
+ return info->mATR;
}
const char *
GetCUIDForKeyID(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetCUIDForKeyID:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetCUIDForKeyID:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- if (!info)
- return 0;
+ if (!info)
+ return 0;
- return info->mCUID;
+ return info->mCUID;
}
const char *
GetMSNForKeyIDInternal(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetMSNForKeyIDInternal:\n"));
- const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetMSNForKeyIDInternal:\n",GetTStamp(tBuff,56)));
+ const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- if (!info)
- return 0;
+ if (!info)
+ return 0;
- return info->mMSN;
+ return info->mMSN;
}
const char *
GetMSNForKeyID(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetMSNForKeyID:\n"));
- AutoCoolKeyListLock autoLock;
- return GetMSNForKeyIDInternal(aKey);
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetMSNForKeyID:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
+ return GetMSNForKeyIDInternal(aKey);
}
unsigned int
GetInfoFlagsForKeyID(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetInfoFlagsForKeyID:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetInfoFlagsForKeyID:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ const CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- if (!info)
- return 0;
+ if (!info)
+ return 0;
- return info->mInfoFlags;
+ return info->mInfoFlags;
}
int
RefreshInfoFlagsForKeyID(const CoolKey *aKey)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("RefreshInfoFlagsForKeyID:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s RefreshInfoFlagsForKeyID:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- int alreadyCoolKey = 0;
- if( IS_REALLY_A_COOLKEY(info->mInfoFlags))
- alreadyCoolKey = 1;
+ if(!info)
+ return -1;
+ int alreadyCoolKey = 0;
+ if( IS_REALLY_A_COOLKEY(info->mInfoFlags))
+ alreadyCoolKey = 1;
- if (!info)
- return -1;
+ if (!info)
+ return -1;
- if (!HAS_ATR(info->mInfoFlags))
- return -1;
+ if (!HAS_ATR(info->mInfoFlags))
+ return -1;
- info->mInfoFlags = CKHGetInfoFlags(info->mSlot);
+ info->mInfoFlags = CKHGetInfoFlags(info->mSlot);
- if(alreadyCoolKey)
- {
- info->mInfoFlags |= COOLKEY_INFO_IS_REALLY_A_COOLKEY_MASK;
- }
+ if(alreadyCoolKey)
+ {
+ info->mInfoFlags |= COOLKEY_INFO_IS_REALLY_A_COOLKEY_MASK;
+ }
- return 0;
+ return 0;
}
int
InsertCoolKeyInfoIntoCoolKeyList(CoolKeyInfo *aInfo)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("InsertCoolKeyInfoIntoCoolKeyList:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s InsertCoolKeyInfoIntoCoolKeyList:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- if (!aInfo)
- return -1;
+ if (!aInfo)
+ return -1;
- gCoolKeyList.push_back(aInfo);
+ gCoolKeyList.push_back(aInfo);
- return 0;
+ return 0;
}
int
RemoveCoolKeyInfoFromCoolKeyList(CoolKeyInfo *aInfo)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("RemoveCoolKeyInfoFromCoolKeyList:\n"));
- AutoCoolKeyListLock autoLock;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s RemoveCoolKeyInfoFromCoolKeyList:\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
+
+ if (!aInfo)
+ return -1;
- if (!aInfo)
- return -1;
+ std::list<CoolKeyInfo*>::iterator it;
- std::list<CoolKeyInfo*>::iterator it;
- for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
- {
- if (*it == aInfo)
+ for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
{
- gCoolKeyList.erase(it);
- break;
+ if (*it == aInfo)
+ {
+ gCoolKeyList.erase(it);
+ break;
+ }
}
- }
- return 0;
+ return 0;
}
int
ClearCoolKeyList()
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s ClearCoolKeyList:entering\n",GetTStamp(tBuff,56)));
+ AutoCoolKeyListLock autoLock;
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("ClearCoolKeyList:entering\n"));
- AutoCoolKeyListLock autoLock;
-
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("ClearCoolKeyList:\n"));
- std::list<CoolKeyInfo*>::iterator it;
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s ClearCoolKeyList:\n",GetTStamp(tBuff,56)));
+ std::list<CoolKeyInfo*>::iterator it;
- for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
- {
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("ClearCoolKeyList: clearing %p \n",*it));
- CoolKeyInfo *info = *it;
- delete info;
- }
+ for (it = gCoolKeyList.begin(); it != gCoolKeyList.end(); ++it)
+ {
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s ClearCoolKeyList: clearing %p \n",GetTStamp(tBuff,56),*it));
+ CoolKeyInfo *info = *it;
+ delete info;
+ }
- gCoolKeyList.clear();
+ gCoolKeyList.clear();
- return 0;
+ return 0;
}
PK11SlotInfo *GetSlotForKeyID(const CoolKey *aKey)
{
- AutoCoolKeyListLock autoLock;
-
+ AutoCoolKeyListLock autoLock;
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetSlotForKeyID:\n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetSlotForKeyID:\n",GetTStamp(tBuff,56)));
- if (!aKey)
- {
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetSlotForKeyID: null CoolKey.\n"));
- return NULL;
- }
+ if (!aKey)
+ {
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetSlotForKeyID: null CoolKey.\n",GetTStamp(tBuff,56)));
+ return NULL;
+ }
- CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
- if (!info)
- return NULL;
+ CoolKeyInfo *info = GetCoolKeyInfoByKeyIDInternal(aKey);
+ if (!info)
+ return NULL;
- return PK11_ReferenceSlot(info->mSlot);
+ return PK11_ReferenceSlot(info->mSlot);
}
enum {
- eGetPublicKey,
- eGetPrivateKey
+ eGetPublicKey,
+ eGetPrivateKey
};
void* GetAuthKey(int keyType, PK11SlotInfo* slot)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetAuthKey:\n"));
- CERTCertListNode *node;
- CERTCertList *certs = PK11_ListCertsInSlot(slot);
- if (!certs)
- return NULL;
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetAuthKey:\n",GetTStamp(tBuff,56)));
+ CERTCertListNode *node;
+ CERTCertList *certs = PK11_ListCertsInSlot(slot);
+ if (!certs)
+ return NULL;
- for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node))
- {
- SECItem policyItem;
- policyItem.data = 0;
-
- SECStatus s = CERT_FindCertExtension(node->cert, SEC_OID_X509_CERTIFICATE_POLICIES, &policyItem);
-
- if (s != SECSuccess || !policyItem.data)
- continue;
-
- CERTCertificatePolicies *policies = CERT_DecodeCertificatePoliciesExtension(&policyItem);
-
- if (!policies)
+ for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node))
{
- PORT_Free(policyItem.data);
- continue;
- }
+ SECItem policyItem;
+ policyItem.data = 0;
- CERTPolicyInfo **policyInfos = policies->policyInfos;
+ SECStatus s = CERT_FindCertExtension(node->cert, SEC_OID_X509_CERTIFICATE_POLICIES, &policyItem);
- while (*policyInfos)
- {
- char *policyID = CERT_GetOidString(&(*policyInfos)->policyID);
- if (!PL_strcasecmp(policyID, SAOL_OID_BRONZE))
- {
- PR_smprintf_free(policyID);
- PORT_Free(policyItem.data);
-
- if (keyType == eGetPrivateKey)
- return PK11_FindPrivateKeyFromCert(slot, node->cert, NULL);
+ if (s != SECSuccess || !policyItem.data)
+ continue;
+
+ CERTCertificatePolicies *policies = CERT_DecodeCertificatePoliciesExtension(&policyItem);
+
+ if (!policies)
+ {
+ PORT_Free(policyItem.data);
+ continue;
+ }
+
+ CERTPolicyInfo **policyInfos = policies->policyInfos;
+
+ while (*policyInfos)
+ {
+ char *policyID = CERT_GetOidString(&(*policyInfos)->policyID);
+ if (!PL_strcasecmp(policyID, SAOL_OID_BRONZE))
+ {
+ PR_smprintf_free(policyID);
+ PORT_Free(policyItem.data);
+
+ if (keyType == eGetPrivateKey)
+ return PK11_FindPrivateKeyFromCert(slot, node->cert, NULL);
+
+ if (keyType == eGetPublicKey)
+ return SECITEM_DupItem(&node->cert->derPublicKey);
+ }
+ policyInfos++;
+ PR_smprintf_free(policyID);
+ }
- if (keyType == eGetPublicKey)
- return SECITEM_DupItem(&node->cert->derPublicKey);
- }
- policyInfos++;
- PR_smprintf_free(policyID);
+ PORT_Free(policyItem.data);
+ CERT_DestroyCertificatePoliciesExtension(policies);
}
- PORT_Free(policyItem.data);
- CERT_DestroyCertificatePoliciesExtension(policies);
- }
-
- CERT_DestroyCertList(certs);
- return NULL;
+ CERT_DestroyCertList(certs);
+ return NULL;
}
SECKEYPrivateKey* GetAuthenticationPrivateKey(PK11SlotInfo* slot)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetAuthenticationPrivateKey:\n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetAuthenticationPrivateKey:\n",GetTStamp(tBuff,56)));
return (SECKEYPrivateKey*) GetAuthKey(eGetPrivateKey, slot);
}
SECItem* GetAuthenticationPublicKey(PK11SlotInfo* slot)
{
- PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("GetAuthenticationPrivateKey:\n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogSU, PR_LOG_DEBUG, ("%s GetAuthenticationPrivateKey:\n",GetTStamp(tBuff,56)));
return (SECItem*) GetAuthKey(eGetPublicKey, slot);
}
@@ -491,47 +516,47 @@
#ifdef DUMP_CHALLENGE_RESPONSE
void DumpAuthenticationPublicKey(PK11SlotInfo* slot, FILE *f)
{
- CERTCertListNode *node;
- CERTCertList *certs = PK11_ListCertsInSlot(slot);
- if (!certs)
- return;
+ CERTCertListNode *node;
+ CERTCertList *certs = PK11_ListCertsInSlot(slot);
+ if (!certs)
+ return;
- for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node))
- {
- SECItem policyItem;
- policyItem.data = 0;
-
- SECStatus s = CERT_FindCertExtension(node->cert, SEC_OID_X509_CERTIFICATE_POLICIES, &policyItem);
-
- if (s != SECSuccess || !policyItem.data)
- continue;
-
- CERTCertificatePolicies *policies = CERT_DecodeCertificatePoliciesExtension(&policyItem);
-
- if (!policies)
+ for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node))
{
- PORT_Free(policyItem.data);
- continue;
- }
+ SECItem policyItem;
+ policyItem.data = 0;
- CERTPolicyInfo **policyInfos = policies->policyInfos;
+ SECStatus s = CERT_FindCertExtension(node->cert, SEC_OID_X509_CERTIFICATE_POLICIES, &policyItem);
- while (*policyInfos)
- {
- char *policyID = CERT_GetOidString(&(*policyInfos)->policyID);
- if (!PL_strcasecmp(policyID, SAOL_OID_BRONZE))
- {
- PR_smprintf_free(policyID);
- PORT_Free(policyItem.data);
- fwrite(node->cert->derCert.data, node->cert->derCert.len, 1, f);
- return;
- }
- policyInfos++;
- PR_smprintf_free(policyID);
- }
+ if (s != SECSuccess || !policyItem.data)
+ continue;
+
+ CERTCertificatePolicies *policies = CERT_DecodeCertificatePoliciesExtension(&policyItem);
+
+ if (!policies)
+ {
+ PORT_Free(policyItem.data);
+ continue;
+ }
+
+ CERTPolicyInfo **policyInfos = policies->policyInfos;
+
+ while (*policyInfos)
+ {
+ char *policyID = CERT_GetOidString(&(*policyInfos)->policyID);
+ if (!PL_strcasecmp(policyID, SAOL_OID_BRONZE))
+ {
+ PR_smprintf_free(policyID);
+ PORT_Free(policyItem.data);
+ fwrite(node->cert->derCert.data, node->cert->derCert.len, 1, f);
+ return;
+ }
+ policyInfos++;
+ PR_smprintf_free(policyID);
+ }
- PORT_Free(policyItem.data);
- CERT_DestroyCertificatePoliciesExtension(policies);
+ PORT_Free(policyItem.data);
+ CERT_DestroyCertificatePoliciesExtension(policies);
}
CERT_DestroyCertList(certs);
17 years, 1 month
[Fedora-directory-commits] esc/src/lib/coolkey NSSManager.cpp, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2331
Modified Files:
NSSManager.cpp
Log Message:
Add time stamps to log messages.
Index: NSSManager.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/NSSManager.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NSSManager.cpp 27 Sep 2006 17:47:46 -0000 1.2
+++ NSSManager.cpp 24 Feb 2007 02:20:22 -0000 1.3
@@ -40,8 +40,7 @@
#include "keyhi.h"
#include <iostream>
- #include <sstream>
-
+#include <sstream>
#include "SlotUtils.h"
@@ -49,146 +48,148 @@
NSSManager::NSSManager()
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::NSSManager:\n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::NSSManager:\n",GetTStamp(tBuff,56)));
mpSCMonitoringThread = NULL;
}
NSSManager::~NSSManager()
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::~NSSManager:\n"));
- if (mpSCMonitoringThread) {
- delete mpSCMonitoringThread;
- mpSCMonitoringThread = NULL;
- }
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::~NSSManager:\n",GetTStamp(tBuff,56)));
+ if (mpSCMonitoringThread) {
+ delete mpSCMonitoringThread;
+ mpSCMonitoringThread = NULL;
+ }
}
HRESULT NSSManager::InitNSS(const char *aAppDir)
{
// Init NSS
- PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("Initializing the NSS Crypto Library. \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s Initializing the NSS Crypto Library. \n",GetTStamp(tBuff,56)));
+ if(aAppDir)
+ {
+ SECStatus status = NSS_Init(aAppDir);
- if(aAppDir)
- {
- SECStatus status = NSS_Init(aAppDir);
-
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("InitNSS:\n"));
- if(status != SECSuccess)
- {
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("InitNSS: db init failed try simple init.\n"));
- status = NSS_NoDB_Init(NULL);
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS:\n",GetTStamp(tBuff,56)));
+ if(status != SECSuccess)
+ {
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS: db init failed try simple init.\n",GetTStamp(tBuff,56)));
+ status = NSS_NoDB_Init(NULL);
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("InitNSS: tried NSS_NoDB_Init res %d .\n",status));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS: tried NSS_NoDB_Init res %d .\n",GetTStamp(tBuff,56),status));
- if(status != SECSuccess)
- {
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("InitNSS:Simple init failed.\n"));
+ if(status != SECSuccess)
+ {
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS:Simple init failed.\n",GetTStamp(tBuff,56)));
return E_FAIL;
- }
- }
- }
-
- char *libName = COOLKEY_PKCS11_LIBRARY ;
+ }
+ }
+ }
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("InitNSS: About to try SECMOD_AddNewModule :%s \n",libName));
+ char *libName = COOLKEY_PKCS11_LIBRARY ;
- char modSpec[512];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS: About to try SECMOD_AddNewModule :%s \n",GetTStamp(tBuff,56),libName));
- sprintf(modSpec,"library=\"%s\" name=\"%s\" parameters=\"%s\" NSS=\"slotParams={0x00000002=[slotFlags='PublicCerts']}\"\n",COOLKEY_PKCS11_LIBRARY,COOLKEY_NAME,PROMISCUOUS_PARAMETER);
+ char modSpec[512];
+ sprintf(modSpec,"library=\"%s\" name=\"%s\" parameters=\"%s\" NSS=\"slotParams={0x00000002=[slotFlags='PublicCerts']}\"\n",COOLKEY_PKCS11_LIBRARY,COOLKEY_NAME,PROMISCUOUS_PARAMETER);
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("InitNSS: modSpec %s\n",modSpec));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS: modSpec %s\n",GetTStamp(tBuff,56),modSpec));
- SECMODModule *userModule = SECMOD_LoadUserModule(modSpec,NULL,0);
+ SECMODModule *userModule = SECMOD_LoadUserModule(modSpec,NULL,0);
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("InitNSS: Done SECMOD_LoadUserModule %p \n",userModule));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s InitNSS: Done SECMOD_LoadUserModule %p \n",GetTStamp(tBuff,56),userModule));
- if(!userModule || !userModule->loaded)
- {
- PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("NSSManager::InitNSS problem loading PKCS11 module. No keys will be recognized!\n"));
- return E_FAIL;
- }
+ if(!userModule || !userModule->loaded)
+ {
+ PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s NSSManager::InitNSS problem loading PKCS11 module. No keys will be recognized!\n",GetTStamp(tBuff,56)));
+ return E_FAIL;
+ }
- mpSCMonitoringThread = new SmartCardMonitoringThread(userModule);
- if (!mpSCMonitoringThread) {
- SECMOD_UnloadUserModule(userModule);
- return E_FAIL;
- }
- mpSCMonitoringThread->Start();
+ mpSCMonitoringThread = new SmartCardMonitoringThread(userModule);
+ if (!mpSCMonitoringThread) {
+ SECMOD_UnloadUserModule(userModule);
+ return E_FAIL;
+ }
+ mpSCMonitoringThread->Start();
- return S_OK;
+ return S_OK;
}
void NSSManager::Shutdown()
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::Shutdown \n"));
- if (mpSCMonitoringThread) {
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::Shutdown \n",GetTStamp(tBuff,56)));
+ if (mpSCMonitoringThread) {
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::Shutdown Stopping Smart Thread %p \n",mpSCMonitoringThread));
- mpSCMonitoringThread->Stop();
- }
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::Shutdown Stopping Smart Thread %p \n",GetTStamp(tBuff,56),mpSCMonitoringThread));
+ mpSCMonitoringThread->Stop();
+ }
// Logout all tokens.
- PK11_LogoutAll();
-
+ PK11_LogoutAll();
}
bool
NSSManager::AuthenticateCoolKey(const CoolKey *aKey, const char *aPIN)
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::AuthenticateCoolKey \n"));
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::AuthenticateCoolKey \n",GetTStamp(tBuff,56)));
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- return false;
+ if (!slot)
+ return false;
- if (!PK11_IsPresent(slot)) {
- PK11_FreeSlot(slot);
- return false;
- }
+ if (!PK11_IsPresent(slot)) {
+ PK11_FreeSlot(slot);
+ return false;
+ }
- if (!PK11_NeedLogin(slot)) {
- PK11_FreeSlot(slot);
- return true;
- }
+ if (!PK11_NeedLogin(slot)) {
+ PK11_FreeSlot(slot);
+ return true;
+ }
- SECStatus status = PK11_CheckUserPassword(slot, (char *)aPIN);
- PK11_FreeSlot(slot);
+ SECStatus status = PK11_CheckUserPassword(slot, (char *)aPIN);
+ PK11_FreeSlot(slot);
// Note: SECWouldBlock means that the password was incorrect.
// SECFailure means NSS encountered a failure that couldn't
// be fixed by a retry.
- bool didAuth = (status == SECSuccess);
+ bool didAuth = (status == SECSuccess);
- return didAuth;
+ return didAuth;
}
-
HRESULT
NSSManager::GetSignatureLength(const CoolKey *aKey, int *aLength)
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetSignatureLength \n"));
- if (!aKey || !aKey->mKeyID || !aLength)
- return E_FAIL;
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetSignatureLength \n",GetTStamp(tBuff,56)));
+ if (!aKey || !aKey->mKeyID || !aLength)
+ return E_FAIL;
- *aLength = 0;
+ *aLength = 0;
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- return E_FAIL;
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ if (!slot)
+ return E_FAIL;
- SECKEYPrivateKey *privKey = GetAuthenticationPrivateKey(slot);
+ SECKEYPrivateKey *privKey = GetAuthenticationPrivateKey(slot);
- if (!privKey)
- return E_FAIL;
+ if (!privKey)
+ return E_FAIL;
- *aLength = PK11_SignatureLen(privKey);
+ *aLength = PK11_SignatureLen(privKey);
- PK11_FreeSlot(slot);
- SECKEY_DestroyPrivateKey(privKey);
- return S_OK;
+ PK11_FreeSlot(slot);
+ SECKEY_DestroyPrivateKey(privKey);
+ return S_OK;
}
HRESULT
@@ -196,76 +197,75 @@
const unsigned char *aData, int aDataLen,
unsigned char *aSignedData, int *aSignedDataLen)
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::SignDataWithKey \n"));
- if (!aKey || !aKey->mKeyID || !aData || aDataLen < 1 ||
- !aSignedData || !aSignedDataLen)
- return E_FAIL;
-
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::SignDataWithKey \n",GetTStamp(tBuff,56)));
+ if (!aKey || !aKey->mKeyID || !aData || aDataLen < 1 ||
+ !aSignedData || !aSignedDataLen)
+ return E_FAIL;
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- return E_FAIL;
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ if (!slot)
+ return E_FAIL;
- SECKEYPrivateKey *privKey = GetAuthenticationPrivateKey(slot);
+ SECKEYPrivateKey *privKey = GetAuthenticationPrivateKey(slot);
- if (!privKey)
- return E_FAIL;
+ if (!privKey)
+ return E_FAIL;
// Make sure the caller supplied us with a aSignedData
// buffer that was large enough!
- int sigLen = PK11_SignatureLen(privKey);
-
- if (sigLen > *aSignedDataLen)
- return E_FAIL;
+ int sigLen = PK11_SignatureLen(privKey);
- unsigned char digest[1024]; // How do I dynamically check the size needed?
- unsigned int digestLen;
+ if (sigLen > *aSignedDataLen)
+ return E_FAIL;
- PK11Context* DigestContext = PK11_CreateDigestContext(SEC_OID_SHA1);
- SECStatus s = PK11_DigestBegin(DigestContext);
- s = PK11_DigestOp(DigestContext, aData, aDataLen);
- s = PK11_DigestFinal(DigestContext, digest, &digestLen, sizeof digest);
+ unsigned char digest[1024]; // How do I dynamically check the size needed?
+ unsigned int digestLen;
- PK11_DestroyContext(DigestContext, PR_TRUE);
+ PK11Context* DigestContext = PK11_CreateDigestContext(SEC_OID_SHA1);
+ SECStatus s = PK11_DigestBegin(DigestContext);
+ s = PK11_DigestOp(DigestContext, aData, aDataLen);
+ s = PK11_DigestFinal(DigestContext, digest, &digestLen, sizeof digest);
- SECItem sig, hash;
+ PK11_DestroyContext(DigestContext, PR_TRUE);
- sig.data = aSignedData;
- sig.len = *aSignedDataLen;
- hash.data = digest;
- hash.len = digestLen;
+ SECItem sig, hash;
- s = PK11_Sign(privKey, &sig, &hash);
+ sig.data = aSignedData;
+ sig.len = *aSignedDataLen;
+ hash.data = digest;
+ hash.len = digestLen;
+ s = PK11_Sign(privKey, &sig, &hash);
- PK11_FreeSlot(slot);
- SECKEY_DestroyPrivateKey(privKey);
- return S_OK;
+ PK11_FreeSlot(slot);
+ SECKEY_DestroyPrivateKey(privKey);
+ return S_OK;
}
HRESULT
NSSManager::GetKeyCertNicknames( const CoolKey *aKey, vector<string> & aStrings )
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertNickNames \n",GetTStamp(tBuff,56)));
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyCertNickNames \n"));
-
- if(!aKey )
- {
- return E_FAIL;
- }
+ if(!aKey )
+ {
+ return E_FAIL;
+ }
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- {
- return E_FAIL;
- }
+ if (!slot)
+ {
+ return E_FAIL;
+ }
- CERTCertList *certs = PK11_ListCerts(PK11CertListAll,NULL);
+ CERTCertList *certs = PK11_ListCerts(PK11CertListAll,NULL);
if (!certs)
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetCertNicknames no certs found! \n"));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetCertNicknames no certs found! \n",GetTStamp(tBuff,56)));
PK11_FreeSlot(slot);
return E_FAIL;
}
@@ -285,17 +285,15 @@
}
}
}
-
}
+ if (!certs)
+ {
+ PK11_FreeSlot(slot);
+ return E_FAIL;
+ }
- if (!certs)
- {
- PK11_FreeSlot(slot);
- return E_FAIL;
- }
-
- CERTCertNicknames *nicknames =
+ CERTCertNicknames *nicknames =
CERT_NicknameStringsFromCertList(certs,
NICKNAME_EXPIRED_STRING,
NICKNAME_NOT_YET_VALID_STRING);
@@ -310,38 +308,33 @@
{
curName = nicknames->nicknames[i];
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetCertKeyNicknames name %s \n",curName));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetCertKeyNicknames name %s \n",GetTStamp(tBuff,56),curName));
string str = curName;
aStrings.push_back (str);
}
-
CERT_FreeNicknames(nicknames);
-
}
if(certs)
- CERT_DestroyCertList(certs);
+ CERT_DestroyCertList(certs);
if(slot)
- PK11_FreeSlot(slot);
-
-
+ PK11_FreeSlot(slot);
return S_OK;
-
}
HRESULT NSSManager::GetKeyIssuedTo(const CoolKey *aKey, char *aBuf, int aBufLength)
{
-
+ char tBuff[56];
if(!aBuf)
return E_FAIL;
aBuf[0]=0;
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyIssuedTo \n"));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyIssuedTo \n",GetTStamp(tBuff,56)));
if(!aKey )
{
@@ -355,12 +348,11 @@
return E_FAIL;
}
-
CERTCertList *certs = PK11_ListCerts(PK11CertListAll,NULL);
if (!certs)
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyIssuedTo no certs found! \n"));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%sNSSManager::GetKeyIssuedTo no certs found! \n",GetTStamp(tBuff,56)));
PK11_FreeSlot(slot);
return E_FAIL;
}
@@ -369,7 +361,6 @@
char *certID = NULL;
-
for( node = CERT_LIST_HEAD(certs);
! CERT_LIST_END(node, certs);
node = CERT_LIST_NEXT(node))
@@ -380,13 +371,10 @@
if(cert)
{
-
-
if(cert->slot == slot)
{
-
certID = CERT_GetCommonName(&cert->subject);
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyIssuedTo ourSlot %p curSlot %p certID %s \n",slot,cert->slot,certID));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyIssuedTo ourSlot %p curSlot %p certID %s \n",GetTStamp(tBuff,56),slot,cert->slot,certID));
}
@@ -416,40 +404,40 @@
HRESULT NSSManager::GetKeyCertInfo(const CoolKey *aKey, char *aCertNickname, string & aCertInfo)
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertInfo Nickname %s \n",GetTStamp(tBuff,56),aCertNickname));
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyCertInfo Nickname %s \n",aCertNickname));
-
- aCertInfo = "";
+ aCertInfo = "";
- if(!aKey )
- {
- return E_FAIL;
- }
+ if(!aKey )
+ {
+ return E_FAIL;
+ }
- if(!aCertNickname)
- {
- return E_FAIL;
- }
+ if(!aCertNickname)
+ {
+ return E_FAIL;
+ }
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- {
- return E_FAIL;
- }
+ if (!slot)
+ {
+ return E_FAIL;
+ }
- CERTCertList *certs = PK11_ListCerts(PK11CertListAll,NULL);
+ CERTCertList *certs = PK11_ListCerts(PK11CertListAll,NULL);
- if (!certs)
- {
- if(slot)
- PK11_FreeSlot(slot);
- return E_FAIL;
- }
+ if (!certs)
+ {
+ if(slot)
+ PK11_FreeSlot(slot);
+ return E_FAIL;
+ }
- PR_LOG(coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyCertInfo About to get CertList for slot. \n"));
+ PR_LOG(coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertInfo About to get CertList for slot. \n",GetTStamp(tBuff,56)));
- CERTCertListNode *node= NULL;
+ CERTCertListNode *node= NULL;
for( node = CERT_LIST_HEAD(certs);
! CERT_LIST_END(node, certs);
node = CERT_LIST_NEXT(node))
@@ -463,7 +451,7 @@
{
if(!strcmp(cert->nickname,aCertNickname))
{
- PR_LOG(coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyCertInfo We have a matching cert to our slot. nickname %s \n",cert->nickname));
+ PR_LOG(coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertInfo We have a matching cert to our slot. nickname %s \n",GetTStamp(tBuff,56),cert->nickname));
char *issuerCN = NULL;
char *issuedToCN = NULL;
@@ -485,16 +473,13 @@
char *nBefore = (char *) DER_UTCTimeToAscii(&cert->validity.notBefore);
char *nAfter = (char *) DER_UTCTimeToAscii(&cert->validity.notAfter);
-
-
if(nBefore)
notBeforeStr = nBefore;
if(nAfter)
notAfterStr = nAfter;
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyCertInfo notBefore %s notAfter %s \n",nBefore, nAfter));
-
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertInfo notBefore %s notAfter %s \n",GetTStamp(tBuff,56),nBefore, nAfter));
int serialNumber = DER_GetInteger(&cert->serialNumber);
@@ -505,9 +490,8 @@
aCertInfo = issuedToCNStr + "\n" + issuerCNStr + "\n"
+ notBeforeStr + "\n" + notAfterStr + "\n" + serialStr ;
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyCertInfo issuerCN %s issuedToCN %s \n",issuerCN, issuedToCN));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertInfo issuerCN %s issuedToCN %s \n",GetTStamp(tBuff,56),issuerCN, issuedToCN));
-
break;
}
}
@@ -515,201 +499,131 @@
}
}
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyCertInfo info: %s \n",aCertInfo.c_str()));
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyCertInfo info: %s \n",GetTStamp(tBuff,56),aCertInfo.c_str()));
- if(certs)
- CERT_DestroyCertList(certs);
+ if(certs)
+ CERT_DestroyCertList(certs);
- if(slot)
- PK11_FreeSlot(slot);
+ if(slot)
+ PK11_FreeSlot(slot);
- return S_OK;
+ return S_OK;
}
HRESULT
NSSManager::GetKeyPolicy(const CoolKey *aKey, char *aBuf, int aBufLength)
{
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::GetKeyPolicy \n"));
- aBuf[0] = '\0';
- char* carot = aBuf;
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::GetKeyPolicy \n",GetTStamp(tBuff,56)));
+ aBuf[0] = '\0';
+ char* carot = aBuf;
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- return E_FAIL;
+ if (!slot)
+ return E_FAIL;
- CERTCertListNode *node;
- CERTCertList *certs = PK11_ListCertsInSlot(slot);
- if (!certs)
- return E_FAIL;;
-
- for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node)) {
- SECItem policyItem;
- policyItem.data = 0;
+ CERTCertListNode *node;
+ CERTCertList *certs = PK11_ListCertsInSlot(slot);
+ if (!certs)
+ return E_FAIL;;
+
+ for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node)) {
+ SECItem policyItem;
+ policyItem.data = 0;
- SECStatus s = CERT_FindCertExtension(node->cert, SEC_OID_X509_CERTIFICATE_POLICIES, &policyItem);
+ SECStatus s = CERT_FindCertExtension(node->cert, SEC_OID_X509_CERTIFICATE_POLICIES, &policyItem);
- if (s != SECSuccess || !policyItem.data)
- continue;
+ if (s != SECSuccess || !policyItem.data)
+ continue;
- CERTCertificatePolicies *policies = CERT_DecodeCertificatePoliciesExtension(&policyItem);
+ CERTCertificatePolicies *policies = CERT_DecodeCertificatePoliciesExtension(&policyItem);
- if (!policies) {
- PORT_Free(policyItem.data);
- continue;
- }
+ if (!policies) {
+ PORT_Free(policyItem.data);
+ continue;
+ }
- CERTPolicyInfo **policyInfos = policies->policyInfos;
+ CERTPolicyInfo **policyInfos = policies->policyInfos;
- while (*policyInfos) {
- char *policyID = CERT_GetOidString(&(*policyInfos)->policyID);
- int policyLen = (int)strlen(policyID);
+ while (*policyInfos) {
+ char *policyID = CERT_GetOidString(&(*policyInfos)->policyID);
+ int policyLen = (int)strlen(policyID);
// check to see if there is space. we substract an extra -1 for the comma
- if (aBufLength - policyLen - 1 >=0) {
+ if (aBufLength - policyLen - 1 >=0) {
// if this policy ID isn't in the buffer, add it.
- if (!strstr(aBuf, policyID)) {
+ if (!strstr(aBuf, policyID)) {
// assuming that this isn't the start, add our delimiter
- if (carot != aBuf)
- strcat(carot++, ",");
+ if (carot != aBuf)
+ strcat(carot++, ",");
// Add the policy id
- strcat(carot, policyID);
- carot += policyLen;
+ strcat(carot, policyID);
+ carot += policyLen;
// decrement the length of the availability space in the |in| buffer.
- aBufLength -= (policyLen + 1);
+ aBufLength -= (policyLen + 1);
+ }
+ }
+ policyInfos++;
+ PR_smprintf_free(policyID);
}
- }
- policyInfos++;
- PR_smprintf_free(policyID);
- }
-
- PORT_Free(policyItem.data);
- CERT_DestroyCertificatePoliciesExtension(policies);
- }
-
- CERT_DestroyCertList(certs);
- PK11_FreeSlot(slot);
- return S_OK;
- }
-
-/*
-
-
-HRESULT
-NSSManager::GetKeyPolicy(const CoolKey *aKey, char *aBuf, int aBufLength)
-{
- aBuf[0] = '\0';
- char* carot = aBuf;
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
-
- if (!slot)
- return E_FAIL;
-
- CERTCertListNode *node;
- CERTCertList *certs = PK11_ListCertsInSlot(slot);
- if (!certs)
- return E_FAIL;;
-
- for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs); node = CERT_LIST_NEXT(node)) {
- SECItem policyItem;
- policyItem.data = 0;
-
- SECStatus s = CERT_FindCertExtension(node->cert, SEC_OID_X509_CERTIFICATE_POLICIES, &policyItem);
-
- if (s != SECSuccess || !policyItem.data)
- continue;
-
- CERTCertificatePolicies *policies = CERT_DecodeCertificatePoliciesExtension(&policyItem);
-
- if (!policies) {
PORT_Free(policyItem.data);
- continue;
+ CERT_DestroyCertificatePoliciesExtension(policies);
}
-
- CERTPolicyInfo **policyInfos = policies->policyInfos;
-
- while (*policyInfos) {
- char *policyID = CERT_GetOidString(&(*policyInfos)->policyID);
- int policyLen = (int)strlen(policyID);
-
- // check to see if there is space. we substract an extra -1 for the comma
- if (aBufLength - policyLen - 1 >=0) {
-
- // if this policy ID isn't in the buffer, add it.
- if (!strstr(aBuf, policyID)) {
-
- // assuming that this isn't the start, add our delimiter
- if (carot != aBuf)
- strcat(carot++, ",");
- // Add the policy id
- strcat(carot++, policyID);
+ CERT_DestroyCertList(certs);
+ PK11_FreeSlot(slot);
+ return S_OK;
+}
- // decrement the length of the availability space in the |in| buffer.
- aBufLength -= (policyLen + 1);
- }
- }
- policyInfos++;
- PR_smprintf_free(policyID);
- }
-
- PORT_Free(policyItem.data);
- CERT_DestroyCertificatePoliciesExtension(policies);
- }
-
- CERT_DestroyCertList(certs);
- PK11_FreeSlot(slot);
- return S_OK;
- }
-*/
bool
NSSManager::RequiresAuthentication(const CoolKey *aKey)
{
-
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::RequiresAuthentication \n"));
- if (!aKey || !aKey->mKeyID)
- return false;
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::RequiresAuthentication \n",GetTStamp(tBuff,56)));
+ if (!aKey || !aKey->mKeyID)
+ return false;
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- return false;
+ if (!slot)
+ return false;
- bool needsLogin = false;
+ bool needsLogin = false;
- if (PK11_IsPresent(slot))
- needsLogin = PK11_NeedLogin(slot) ? true : false;
+ if (PK11_IsPresent(slot))
+ needsLogin = PK11_NeedLogin(slot) ? true : false;
- PK11_FreeSlot(slot);
+ PK11_FreeSlot(slot);
- return needsLogin;
+ return needsLogin;
}
bool
NSSManager::IsAuthenticated(const CoolKey *aKey)
{
-
- PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("NSSManager::IsAuthenticated \n"));
- if (!aKey || !aKey->mKeyID)
- return false;
+ char tBuff[56];
+ PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::IsAuthenticated \n",GetTStamp(tBuff,56)));
+ if (!aKey || !aKey->mKeyID)
+ return false;
- PK11SlotInfo *slot = GetSlotForKeyID(aKey);
+ PK11SlotInfo *slot = GetSlotForKeyID(aKey);
- if (!slot)
- return false;
+ if (!slot)
+ return false;
- bool isAuthenticated = false;
+ bool isAuthenticated = false;
- if (PK11_IsPresent(slot))
- isAuthenticated = PK11_IsLoggedIn(slot, NULL) ? true : false;
+ if (PK11_IsPresent(slot))
+ isAuthenticated = PK11_IsLoggedIn(slot, NULL) ? true : false;
- PK11_FreeSlot(slot);
+ PK11_FreeSlot(slot);
- return isAuthenticated;
+ return isAuthenticated;
}
17 years, 1 month
[Fedora-directory-commits] esc/src/lib/coolkey CoolKey_Message.cpp, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2302
Modified Files:
CoolKey_Message.cpp
Log Message:
Add time stamp to log files.
Index: CoolKey_Message.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey_Message.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CoolKey_Message.cpp 27 Sep 2006 17:47:46 -0000 1.2
+++ CoolKey_Message.cpp 24 Feb 2007 02:19:44 -0000 1.3
@@ -19,8 +19,10 @@
#include "nspr.h"
#include "CoolKey_Message.h"
+#include "CoolKey.h"
#include "math.h"
#include <iostream>
+#include <time.h>
PRLogModuleInfo *nkeyLogMS = PR_NewLogModule("coolKeyMessage");
@@ -29,7 +31,7 @@
void eCKMessage::CreateTokenMap(vector<string> &aTokens)
{
- CreateTokenMap(mTokenMap,aTokens);
+ CreateTokenMap(mTokenMap,aTokens);
}
void eCKMessage::CreateTokenMap(map<string,string> &aTokenMap, vector<string> &aTokens)
@@ -54,7 +56,6 @@
aTokenMap[curKey] = curValue;
//cout << "key = " << curKey << " value = " << curValue << " \n" << endl;
-
}
}
@@ -226,7 +227,6 @@
{
*aSize = 0;
return;
-
}
int input_size = *aSize;
@@ -250,7 +250,6 @@
string value = mTokenMap[aKey];
return atoi(value.c_str());
-
}
string &eCKMessage::getStringValue(string &aKey)
@@ -286,12 +285,11 @@
*aSize = output_size;
//printf("output %s \n",decode_output);
-
}
const char *eCKMessage::getMESSAGETypeAsString()
{
- return getMESSAGETypeAsString(message_type);
+ return getMESSAGETypeAsString(message_type);
}
const char *eCKMessage::getMESSAGETypeAsString(sntype type)
@@ -318,7 +316,7 @@
default: st = "unknown";
}
- return st;
+ return st;
}
eCKMessage_EXTENDED_LOGIN_REQUEST::eCKMessage_EXTENDED_LOGIN_REQUEST()
@@ -327,8 +325,8 @@
eCKMessage_EXTENDED_LOGIN_REQUEST::~eCKMessage_EXTENDED_LOGIN_REQUEST()
{
-
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_EXTENDED_LOGIN_REQUEST::~eCKMessage_EXTENDED_LOGIN_REQUEST \n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_EXTENDED_LOGIN_REQUEST::~eCKMessage_EXTENDED_LOGIN_REQUEST \n",GetTStamp(tBuff,56)));
}
void eCKMessage_EXTENDED_LOGIN_REQUEST::encode(string &aOutputVal)
@@ -388,8 +386,6 @@
{
}
-
-
nsNKeyREQUIRED_PARAMETERS_LIST::~nsNKeyREQUIRED_PARAMETERS_LIST()
{
CleanUp();
@@ -402,7 +398,6 @@
if(new_parameter)
{
mParameters.push_back(new_parameter);
-
}
return new_parameter;
}
@@ -415,7 +410,6 @@
return NULL;
return mParameters.at(index);
-
}
nsNKeyREQUIRED_PARAMETER *nsNKeyREQUIRED_PARAMETERS_LIST::GetById(string &aId)
{
@@ -435,7 +429,6 @@
if(tId == aId)
return curParam;
-
}
}
@@ -444,47 +437,38 @@
void nsNKeyREQUIRED_PARAMETERS_LIST::CleanUp()
{
-
vector<nsNKeyREQUIRED_PARAMETER *>::iterator i;
-
nsNKeyREQUIRED_PARAMETER * curParam = NULL;
-
for(i = mParameters.begin(); i!= mParameters.end(); i++)
{
-
curParam = (*i);
if(curParam)
delete curParam;
curParam = NULL;
-
}
-
mParameters.clear();
-
}
int nsNKeyREQUIRED_PARAMETERS_LIST::AreAllParametersSet()
{
-
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("nsNKeyREQUIRED_PARAMETERS_LIST::AreAllParametersSet:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s nsNKeyREQUIRED_PARAMETERS_LIST::AreAllParametersSet:\n",GetTStamp(tBuff,56)));
int done = 0;
-
int num_params = GetNumParameters();
for(int i = 0; i < num_params ; i++)
{
nsNKeyREQUIRED_PARAMETER *curParam = GetAt(i);
-
if(curParam)
{
if( !curParam->hasValueAttempted())
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("nsNKeyREQUIRED_PARAMETERS_LIST::AreAllParametersSet found parameter not set: index %d\n",i));
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s nsNKeyREQUIRED_PARAMETERS_LIST::AreAllParametersSet found parameter not set: index %d\n",GetTStamp(tBuff,56),i));
return done;
}
@@ -492,17 +476,13 @@
}
done = 1;
-
return done;
}
void nsNKeyREQUIRED_PARAMETERS_LIST::EmitToBuffer(string &aOutputBuff)
{
-
aOutputBuff = "";
-
string separater = "&&";
-
int num_params = GetNumParameters();
for(int i = 0 ; i < num_params ; i++)
@@ -513,9 +493,7 @@
{
string raw = curParam->GetRawText();
aOutputBuff += raw + separater;
-
}
-
}
int size = aOutputBuff.size();
@@ -525,17 +503,18 @@
aOutputBuff.erase(size - 1);
aOutputBuff.erase(size - 2);
}
-
}
eCKMessage_LOGIN_REQUEST::eCKMessage_LOGIN_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_LOGIN_REQUEST::eCKMessage_LOGIN_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_LOGIN_REQUEST::eCKMessage_LOGIN_REQUEST:\n",GetTStamp(tBuff,56)));
message_type = LOGIN_REQUEST;
}
eCKMessage_LOGIN_REQUEST:: ~eCKMessage_LOGIN_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_LOGIN_REQUEST::~eCKMessage_LOGIN_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_LOGIN_REQUEST::~eCKMessage_LOGIN_REQUEST:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_LOGIN_REQUEST::encode(string &aOutputVal)
@@ -545,19 +524,21 @@
void eCKMessage_LOGIN_REQUEST::decode(string &aInputVal)
{
- eCKMessage::decode(aInputVal);
+ eCKMessage::decode(aInputVal);
}
eCKMessage_LOGIN_RESPONSE::eCKMessage_LOGIN_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_LOGIN_RESPONSE::eCKMessage_LOGIN_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_LOGIN_RESPONSE::eCKMessage_LOGIN_RESPONSE:\n",GetTStamp(tBuff,56)));
message_type = LOGIN_RESPONSE;
}
eCKMessage_LOGIN_RESPONSE:: ~eCKMessage_LOGIN_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_LOGIN_RESPONSE::~eCKMessage_LOGIN_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_LOGIN_RESPONSE::~eCKMessage_LOGIN_RESPONSE:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_LOGIN_RESPONSE::decode(string &aInputVal)
@@ -582,21 +563,21 @@
aOutputVal += sKey + delim1 + lScreenName + delim + pKey + delim1 + lPassword;
eCKMessage::encode(aOutputVal);
-
}
eCKMessage_EXTENDED_LOGIN_RESPONSE::eCKMessage_EXTENDED_LOGIN_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_EXTENDED_LOGIN_RESPONSE::eCKMessage_EXTENDED_LOGIN_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_EXTENDED_LOGIN_RESPONSE::eCKMessage_EXTENDED_LOGIN_RESPONSE:\n",GetTStamp(tBuff,56)));
- message_type = EXTENDED_LOGIN_RESPONSE;
- paramList = NULL;
+ message_type = EXTENDED_LOGIN_RESPONSE;
+ paramList = NULL;
}
eCKMessage_EXTENDED_LOGIN_RESPONSE:: ~eCKMessage_EXTENDED_LOGIN_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_EXTENDED_LOGIN_RESPONSE::~eCKMessage_EXTENDED_LOGIN_RESPONSE:\n"));
-
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_EXTENDED_LOGIN_RESPONSE::~eCKMessage_EXTENDED_LOGIN_RESPONSE:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_EXTENDED_LOGIN_RESPONSE::decode(string &aInputVal)
@@ -635,9 +616,7 @@
if(i < (num_parameters - 1))
aOutputVal += delim;
-
}
-
}
//cout << "nsNKeyMESSGE_EXTENDED_LOGIN_RESPONSE::encode " << aOutputVal + "\n" << endl;
@@ -647,15 +626,16 @@
eCKMessage_SECURID_REQUEST::eCKMessage_SECURID_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_SECURID_REQUEST::eCKMessage_SECURID_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_SECURID_REQUEST::eCKMessage_SECURID_REQUEST:\n",GetTStamp(tBuff,56)));
message_type = SECURID_REQUEST;
}
eCKMessage_SECURID_REQUEST::~eCKMessage_SECURID_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_SECURID_REQUEST::~eCKMessage_SECURID_REQUEST:\n"));
-
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_SECURID_REQUEST::~eCKMessage_SECURID_REQUEST:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_SECURID_REQUEST::encode(string &aOutputVal)
@@ -665,20 +645,20 @@
void eCKMessage_SECURID_REQUEST::decode(string &aInputVal)
{
- eCKMessage::decode(aInputVal);
-
+ eCKMessage::decode(aInputVal);
}
eCKMessage_SECURID_RESPONSE::eCKMessage_SECURID_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_SECURID_RESPONSE::eCKMessage_SECURID_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_SECURID_RESPONSE::eCKMessage_SECURID_RESPONSE:\n",GetTStamp(tBuff,56)));
message_type = SECURID_RESPONSE;
}
eCKMessage_SECURID_RESPONSE::~eCKMessage_SECURID_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_SECURID_RESPONSE::~eCKMessage_SECURID_RESPONSE:\n"));
-
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_SECURID_RESPONSE::~eCKMessage_SECURID_RESPONSE:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_SECURID_RESPONSE::decode(string &aInputVal)
@@ -703,20 +683,20 @@
aOutputVal += keyPin + delim1 + lPin + delim + keyValue + delim1 + lValue ;
eCKMessage::encode(aOutputVal);
-
}
eCKMessage_NEWPIN_REQUEST::eCKMessage_NEWPIN_REQUEST()
-
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_NEWPIN_REQUEST::eCKMessage_NEWPIN_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_NEWPIN_REQUEST::eCKMessage_NEWPIN_REQUEST:\n",GetTStamp(tBuff,56)));
message_type = NEW_PIN_REQUEST;
}
eCKMessage_NEWPIN_REQUEST::~eCKMessage_NEWPIN_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_NEWPIN_REQUEST::~eCKMessage_NEWPIN_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_NEWPIN_REQUEST::~eCKMessage_NEWPIN_REQUEST:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_NEWPIN_REQUEST::encode(string &aOutputVal)
@@ -730,15 +710,18 @@
}
eCKMessage_NEWPIN_RESPONSE::eCKMessage_NEWPIN_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_NEWPIN_RESPONSE::eCKMessage_NEWPIN_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_NEWPIN_RESPONSE::eCKMessage_NEWPIN_RESPONSE:\n",GetTStamp(tBuff,56)));
message_type = NEW_PIN_RESPONSE;
}
eCKMessage_NEWPIN_RESPONSE::~eCKMessage_NEWPIN_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_NEWPIN_RESPONSE::~eCKMessage_NEWPIN_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_NEWPIN_RESPONSE::~eCKMessage_NEWPIN_RESPONSE:\n",GetTStamp(tBuff,56)));
}
+
void eCKMessage_NEWPIN_RESPONSE::decode(string &aInputVal)
{
@@ -764,14 +747,16 @@
eCKMessage_TOKEN_PDU_REQUEST::eCKMessage_TOKEN_PDU_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_TOKEN_PDU_REQUEST::eCKMessage_TOKEN_PDU_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_TOKEN_PDU_REQUEST::eCKMessage_TOKEN_PDU_REQUEST:\n",GetTStamp(tBuff,56)));
message_type = TOKEN_PDU_REQUEST;
}
eCKMessage_TOKEN_PDU_REQUEST::~eCKMessage_TOKEN_PDU_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_TOKEN_PDU_REQUEST::~eCKMessage_TOKEN_PDU_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_TOKEN_PDU_REQUEST::~eCKMessage_TOKEN_PDU_REQUEST:\n",GetTStamp(tBuff,56)));
}
@@ -787,14 +772,16 @@
eCKMessage_TOKEN_PDU_RESPONSE::eCKMessage_TOKEN_PDU_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_TOKEN_PDU_RESPONSE::eCKMessage_TOKEN_PDU_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_TOKEN_PDU_RESPONSE::eCKMessage_TOKEN_PDU_RESPONSE:\n",GetTStamp(tBuff,56)));
message_type = TOKEN_PDU_RESPONSE;
}
eCKMessage_TOKEN_PDU_RESPONSE::~eCKMessage_TOKEN_PDU_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_TOKEN_PDU_RESPONSE::~eCKMessage_TOKEN_PDU_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_TOKEN_PDU_RESPONSE::~eCKMessage_TOKEN_PDU_RESPONSE:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_TOKEN_PDU_RESPONSE::decode(string &aInputVal)
@@ -825,14 +812,14 @@
eCKMessage_STATUS_UPDATE_REQUEST:: ~eCKMessage_STATUS_UPDATE_REQUEST()
{
-
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_STATUS_UPDATE_REQUEST::~eCKMessage_STATUS_UPDATE_REQUEST:\n"));
-
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_STATUS_UPDATE_REQUEST::~eCKMessage_STATUS_UPDATE_REQUEST:\n",GetTStamp(tBuff,56)));
}
eCKMessage_STATUS_UPDATE_REQUEST::eCKMessage_STATUS_UPDATE_REQUEST()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_STATUS_UPDATE_REQUEST::eCKMessage_STATUS_UPDATE_REQUEST:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_STATUS_UPDATE_REQUEST::eCKMessage_STATUS_UPDATE_REQUEST:\n",GetTStamp(tBuff,56)));
message_type = STATUS_UPDATE_REQUEST;
}
@@ -848,20 +835,20 @@
}
eCKMessage_STATUS_UPDATE_RESPONSE:: ~eCKMessage_STATUS_UPDATE_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_STATUS_UPDATE_RESPONSE::~eCKMessage_STATUS_UPDATE_RESPONSE:\n"));
-
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_STATUS_UPDATE_RESPONSE::~eCKMessage_STATUS_UPDATE_RESPONSE:\n",GetTStamp(tBuff,56)));
}
eCKMessage_STATUS_UPDATE_RESPONSE::eCKMessage_STATUS_UPDATE_RESPONSE()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_STATUS_UPDATE_RESPONSE::eCKMessage_STATUS_UPDATE_RESPONSE:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_STATUS_UPDATE_RESPONSE::eCKMessage_STATUS_UPDATE_RESPONSE:\n",GetTStamp(tBuff,56)));
message_type = STATUS_UPDATE_RESPONSE;
}
void eCKMessage_STATUS_UPDATE_RESPONSE::decode(string &aInputVal)
{
-
}
void eCKMessage_STATUS_UPDATE_RESPONSE::encode(string &aOutputVal)
@@ -877,21 +864,21 @@
int currentState = getIntValue(key);
- aOutputVal += delim1 + intToString(currentState);
+ aOutputVal += key + delim1 + intToString(currentState);
eCKMessage::encode(aOutputVal);
-
}
eCKMessage_END_OP::eCKMessage_END_OP()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_END_OP::eCKMessage_END_OP:\n"));
-
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_END_OP::eCKMessage_END_OP:\n",GetTStamp(tBuff,56)));
message_type = END_OP;
}
eCKMessage_END_OP::~eCKMessage_END_OP()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_END_OP::~eCKMessage_END_OP:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_END_OP::~eCKMessage_END_OP:\n",GetTStamp(tBuff,56)));
}
void eCKMessage_END_OP::encode(string &aOutputVal)
@@ -905,14 +892,16 @@
eCKMessage_BEGIN_OP::eCKMessage_BEGIN_OP()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_BEGIN_OP::eCKMessage_BEGIN_OP:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_BEGIN_OP::eCKMessage_BEGIN_OP:\n",GetTStamp(tBuff,56)));
message_type = BEGIN_OP;
}
eCKMessage_BEGIN_OP::~eCKMessage_BEGIN_OP()
{
- PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("eCKMessage_BEGIN_OP::~eCKMessage_BEGIN_OP:\n"));
+ char tBuff[56];
+ PR_LOG( nkeyLogMS, PR_LOG_DEBUG, ("%s eCKMessage_BEGIN_OP::~eCKMessage_BEGIN_OP:\n",GetTStamp(tBuff,56)));
}
@@ -1109,8 +1098,6 @@
}
*cur = '\0'; // null-terminated
}
-
-
nsNKeyREQUIRED_PARAMETER::~nsNKeyREQUIRED_PARAMETER()
{
}
17 years, 1 month
[Fedora-directory-commits] esc/src/lib/coolkey CoolKeyHandler.h, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2168
Modified Files:
CoolKeyHandler.h
Log Message:
Change a few method prototypes .
Index: CoolKeyHandler.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKeyHandler.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CoolKeyHandler.h 27 Sep 2006 17:47:46 -0000 1.2
+++ CoolKeyHandler.h 24 Feb 2007 02:17:37 -0000 1.3
@@ -146,6 +146,7 @@
void Release();
HRESULT SetAuthParameter(const char *param_id, const char *value);
+ HRESULT CancelAuthParameters();
HRESULT SetScreenName(const char *screenName);
HRESULT SetPassword(const char *password);
HRESULT SetTokenPin(const char *pin);
@@ -242,11 +243,11 @@
HRESULT HttpSendSecurID(eCKMessage_SECURID_REQUEST *req);
HRESULT HttpSendNewPin(eCKMessage_NEWPIN_REQUEST * req);
- HRESULT HttpSendAuthResponse(eCKMessage_EXTENDED_LOGIN_REQUEST *req);
+ HRESULT HttpSendAuthResponse(CoolKeyHandler *context,eCKMessage_EXTENDED_LOGIN_REQUEST *req);
HRESULT HttpBeginOpRequest();
HRESULT HttpSendUsernameAndPW();
HRESULT HttpProcessStatusUpdate(eCKMessage_STATUS_UPDATE_REQUEST * msg);
- HRESULT HttpOnDisconnect();
+ HRESULT HttpDisconnect(int reason=0);
static void HttpProcessTokenPDU(CoolKeyHandler *context,eCKMessage_TOKEN_PDU_REQUEST *req);
static void HttpProcessEndOp(CoolKeyHandler* context, eCKMessage_END_OP *end);
17 years, 1 month
[Fedora-directory-commits] esc/src/lib/coolkey CoolKeyHandler.cpp, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2137
Modified Files:
CoolKeyHandler.cpp
Log Message:
Add time stamp to log messages and handle cancelled operation better.
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.2 -r 1.3 CoolKeyHandler.cpp
Index: CoolKeyHandler.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKeyHandler.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CoolKeyHandler.cpp 27 Sep 2006 17:47:46 -0000 1.2
+++ CoolKeyHandler.cpp 24 Feb 2007 02:16:41 -0000 1.3
@@ -21,6 +21,7 @@
#include <assert.h>
#include <stdio.h>
#include <string>
+#include <time.h>
#include "prprf.h"
#include "nss.h"
@@ -46,7 +47,6 @@
//static char *test_extended_login = "s=325&msg_type=13&invalid_login=0&blocked=0&error=&required_parameter0=id%3DUSER%5FID%26name%3DUser+ID%26desc%3DUser+ID%26type%3Dstring%26option%3Doption1%2Coption2%2Coption3&required_parameter1=id%3DUSER%5FPWD%26name%3DUser+Password%26desc%3DUser+Password%26type%3Dpassword%26option%3D&required_parameter2=id%3DUSER%5FPIN%26name%3DPIN%26desc%3DOne+time+PIN+received+via+mail%26type%3Dpassword%26option%3D";
-
#include <string>
#ifndef CKO_MOZILLA_READER
@@ -59,52 +59,52 @@
void NotifyEndResult(CoolKeyHandler* context, int operation, int result, int description);
-
struct AutoCKYBuffer : public CKYBuffer
{
- AutoCKYBuffer() { CKYBuffer_InitEmpty(this); };
- AutoCKYBuffer(const char *aHex) { CKYBuffer_InitFromHex(this, aHex); };
- AutoCKYBuffer(unsigned const char *aData, unsigned int aLength) { CKYBuffer_InitFromData(this, aData, aLength); };
- AutoCKYBuffer(unsigned long aLength) { CKYBuffer_InitFromLen(this, aLength); };
- ~AutoCKYBuffer() { CKYBuffer_FreeData(this); };
+ AutoCKYBuffer() { CKYBuffer_InitEmpty(this); };
+ AutoCKYBuffer(const char *aHex) { CKYBuffer_InitFromHex(this, aHex); };
+ AutoCKYBuffer(unsigned const char *aData, unsigned int aLength) { CKYBuffer_InitFromData(this, aData, aLength); };
+ AutoCKYBuffer(unsigned long aLength) { CKYBuffer_InitFromLen(this, aLength); };
+ ~AutoCKYBuffer() { CKYBuffer_FreeData(this); };
};
struct KHHttpEvent
{
- KHHttpEvent(CoolKeyHandler *aKeyHandler,NSS_HTTP_HANDLE handle)
- : mKeyHandler(aKeyHandler), mHttpHandle(handle)
- {
- }
+ KHHttpEvent(CoolKeyHandler *aKeyHandler,NSS_HTTP_HANDLE handle)
+ : mKeyHandler(aKeyHandler), mHttpHandle(handle)
+ {
+ }
- virtual ~KHHttpEvent()
- {
- }
+ virtual ~KHHttpEvent()
+ {
+ }
- virtual HRESULT Execute() = 0;
+ virtual HRESULT Execute() = 0;
- CoolKeyHandler *mKeyHandler;
- NSS_HTTP_HANDLE mHttpHandle;
+ CoolKeyHandler *mKeyHandler;
+ NSS_HTTP_HANDLE mHttpHandle;
};
struct KHOnConnectEvent : public KHHttpEvent
{
- KHOnConnectEvent(CoolKeyHandler *aKeyHandler, NSS_HTTP_HANDLE handle)
- : KHHttpEvent(aKeyHandler, handle)
- {
- }
+ KHOnConnectEvent(CoolKeyHandler *aKeyHandler, NSS_HTTP_HANDLE handle)
+ : KHHttpEvent(aKeyHandler, handle)
+ {
+ }
- HRESULT Execute()
- {
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("KHOnConnectEvent::Execute:\n"));
- HRESULT res;
- res = mKeyHandler->OnConnectImpl();
+ HRESULT Execute()
+ {
+ char tBuff[56];
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s KHOnConnectEvent::Execute:\n",GetTStamp(tBuff,56)));
+ HRESULT res;
+ res = mKeyHandler->OnConnectImpl();
if(res == E_FAIL)
{
- mKeyHandler->OnDisConnectImpl();
+ mKeyHandler->OnDisConnectImpl();
}
- return res;
+ return res;
}
};
@@ -112,128 +112,126 @@
{
public:
- PDUWriterThread(CoolKeyHandler *aHandler) {mAccepting=PR_FALSE; mHandler = aHandler;};
- ~PDUWriterThread() ;
+ PDUWriterThread(CoolKeyHandler *aHandler) {mAccepting=PR_FALSE; mHandler = aHandler;};
+ ~PDUWriterThread() ;
- HRESULT Init();
+ HRESULT Init();
- HRESULT QueueKHHttpEvent(KHHttpEvent *aEvent);
- HRESULT QueueOnConnectEvent(CoolKeyHandler *aKeyHandler,
+ HRESULT QueueKHHttpEvent(KHHttpEvent *aEvent);
+ HRESULT QueueOnConnectEvent(CoolKeyHandler *aKeyHandler,
NSS_HTTP_HANDLE handle);
- HRESULT Shutdown();
+ HRESULT Shutdown();
- static void ThreadRun(void* arg);
+ static void ThreadRun(void* arg);
- PRLock *mLock;
- PRCondVar *mCondVar;
- PRThread *mThread;
- PRBool mAccepting;
+ PRLock *mLock;
+ PRCondVar *mCondVar;
+ PRThread *mThread;
+ PRBool mAccepting;
- CoolKeyHandler *mHandler;
+ CoolKeyHandler *mHandler;
- std::list<KHHttpEvent*> mPendingEvents;
+ std::list<KHHttpEvent*> mPendingEvents;
};
PDUWriterThread::~PDUWriterThread()
{
-
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("PDUWriterThread::~PDUWriterThread:\n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s PDUWriterThread::~PDUWriterThread:\n",GetTStamp(tBuff,56)));
if (mCondVar ) {
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CoolKeyHandler::PDUWriterThread::~PDUWriterThreade about to destroy mCondVar.\n"));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CoolKeyHandler::PDUWriterThread::~PDUWriterThreade about to destroy mCondVar.\n",GetTStamp(tBuff,56)));
PR_DestroyCondVar(mCondVar);
mCondVar = NULL;
- }
-
- if (mLock ) {
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CoolKeyHandler::PDUWriterThread::~PDUWriterThread about to destroy mLock.\n"));
-
- PR_DestroyLock(mLock);
- mLock = NULL;
- }
+ }
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CoolKeyHandler::PDUWriterThread::~PDUWriterThread leaving....\n"));
+ if (mLock ) {
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CoolKeyHandler::PDUWriterThread::~PDUWriterThread about to destroy mLock.\n",GetTStamp(tBuff,56)));
+ PR_DestroyLock(mLock);
+ mLock = NULL;
+ }
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CoolKeyHandler::PDUWriterThread::~PDUWriterThread leaving....\n",GetTStamp(tBuff,56)));
}
void
PDUWriterThread::ThreadRun(void *arg)
{
+ char tBuff[56];
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s PDUWriterThread::ThreadRun:\n",GetTStamp(tBuff,56)));
+ PDUWriterThread *pn = (PDUWriterThread*) arg;
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("PDUWriterThread::ThreadRun:\n"));
- PDUWriterThread *pn = (PDUWriterThread*) arg;
-
- while (pn->mAccepting && pn->mLock && pn->mCondVar) {
+ while (pn->mAccepting && pn->mLock && pn->mCondVar) {
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("PDUWriterThread::ThreadRun: top of while loop accepting %d lock %p cond %p\n",pn->mAccepting,pn->mLock,pn->mCondVar));
- PR_Lock(pn->mLock);
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s PDUWriterThread::ThreadRun: top of while loop accepting %d lock %p cond %p\n",GetTStamp(tBuff,56),pn->mAccepting,pn->mLock,pn->mCondVar));
+ PR_Lock(pn->mLock);
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("PDUWriterThread::ThreadRun: done PR_Lock()\\n"));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s PDUWriterThread::ThreadRun: done PR_Lock()\\n",GetTStamp(tBuff,56)));
[...2857 lines suppressed...]
+ goto failed;
+ }
// get the reader name (though we probably don't need it anymore
- status = PK11_ReadRawAttribute(PK11_TypeGeneric, obj, CKA_LABEL, &label);
- if (status != SECSuccess) {
- goto failed;
- }
+ status = PK11_ReadRawAttribute(PK11_TypeGeneric, obj, CKA_LABEL, &label);
+ if (status != SECSuccess) {
+ goto failed;
+ }
// get the ATR (though, again, we probably don't need it
- status = PK11_ReadRawAttribute(PK11_TypeGeneric, obj, CKA_MOZILLA_ATR, &ATR);
+ status = PK11_ReadRawAttribute(PK11_TypeGeneric, obj, CKA_MOZILLA_ATR, &ATR);
// PK11_DestroyGenericObjects(obj);
- if (status != SECSuccess) {
- goto failed;
- }
+ if (status != SECSuccess) {
+ goto failed;
+ }
// get the CUID/Serial number (we *WILL* continue to need it )
- status = PK11_GetTokenInfo(aSlot,&tokenInfo);
- if (status != SECSuccess) {
- goto failed;
- }
+ status = PK11_GetTokenInfo(aSlot,&tokenInfo);
+ if (status != SECSuccess) {
+ goto failed;
+ }
//get the are we a CoolKey value
- status = PK11_ReadRawAttribute(PK11_TypeGeneric, obj, CKA_MOZILLA_IS_COOL_KEY, &isCOOLKey);
+ status = PK11_ReadRawAttribute(PK11_TypeGeneric, obj, CKA_MOZILLA_IS_COOL_KEY, &isCOOLKey);
- PK11_DestroyGenericObjects(obj);
- obj = NULL;
+ PK11_DestroyGenericObjects(obj);
+ obj = NULL;
- if (status != SECSuccess) {
- goto failed;
- }
+ if (status != SECSuccess) {
+ goto failed;
+ }
- if(isCOOLKey.len == 1)
- {
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: CKA_MOZILLA_IS_COOL_KEY %d.\n",(int) isCOOLKey.data[0]));
+ if(isCOOLKey.len == 1)
+ {
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: CKA_MOZILLA_IS_COOL_KEY %d.\n",GetTStamp(tBuff,56),(int) isCOOLKey.data[0]));
- isACOOLKey=(int) isCOOLKey.data[0];
- }
+ isACOOLKey=(int) isCOOLKey.data[0];
+ }
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: info->flags %u.\n",tokenInfo.flags));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: info->flags %u.\n",GetTStamp(tBuff,56),tokenInfo.flags));
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: info->label %s.\n",(char *)tokenInfo.label));
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: info->manufacturerID %s.\n",(char *)tokenInfo.manufacturerID));
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: info->model %s.\n",(char *)tokenInfo.model));
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: info->serialNumber %s.\n",(char *)tokenInfo.serialNumber));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: info->label %s.\n",GetTStamp(tBuff,56),(char *)tokenInfo.label));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: info->manufacturerID %s.\n",GetTStamp(tBuff,56),(char *)tokenInfo.manufacturerID));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: info->model %s.\n",GetTStamp(tBuff,56),(char *)tokenInfo.model));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: info->serialNumber %s.\n",GetTStamp(tBuff,56),(char *)tokenInfo.serialNumber));
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: info->firmwareVersion.major %d info->firmwareVersion.minor %d \n",(int)tokenInfo.firmwareVersion.major,(int) tokenInfo.firmwareVersion.minor));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: info->firmwareVersion.major %d info->firmwareVersion.minor %d \n",GetTStamp(tBuff,56),(int)tokenInfo.firmwareVersion.major,(int) tokenInfo.firmwareVersion.minor));
// OK, we have everything we need, now build the COOLKEYInfo structure.
- info = new CoolKeyInfo();
- if (!info) {
- goto failed;
- }
+ info = new CoolKeyInfo();
+ if (!info) {
+ goto failed;
+ }
- atrSize = ATR.len*2+5;
- atrString = (char *)malloc(atrSize);
- hres = CoolKeyBinToHex(ATR.data, ATR.len,
+ atrSize = ATR.len*2+5;
+ atrString = (char *)malloc(atrSize);
+ hres = CoolKeyBinToHex(ATR.data, ATR.len,
(unsigned char *) atrString, atrSize, true);
/* shouldn't the be != S_SUCCESS? */
- if (hres == E_FAIL) {
- free(atrString);
- goto failed;
- }
- SECITEM_FreeItem(&ATR,PR_FALSE);
- ATR.data = NULL;
+ if (hres == E_FAIL) {
+ free(atrString);
+ goto failed;
+ }
+ SECITEM_FreeItem(&ATR,PR_FALSE);
+ ATR.data = NULL;
- PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("CKHGetCoolKeyInfo: info->atr %s.\n",(char *)atrString));
+ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CKHGetCoolKeyInfo: info->atr %s.\n",GetTStamp(tBuff,56),(char *)atrString));
- info->mATR = atrString;
- info->mReaderName= (char *)malloc(label.len+1);
- if (!info->mReaderName) {
- goto failed;
- }
- memcpy(info->mReaderName, label.data, label.len);
- info->mReaderName[label.len] = 0;
- info->mInfoFlags = MapGetFlags(&tokenInfo);
+ info->mATR = atrString;
+ info->mReaderName= (char *)malloc(label.len+1);
+ if (!info->mReaderName) {
+ goto failed;
+ }
+ memcpy(info->mReaderName, label.data, label.len);
+ info->mReaderName[label.len] = 0;
+ info->mInfoFlags = MapGetFlags(&tokenInfo);
//Handle the isCOOLKey flag
- if(isACOOLKey) {
- info->mInfoFlags |= COOLKEY_INFO_IS_REALLY_A_COOLKEY_MASK;
- }
+ if(isACOOLKey) {
+ info->mInfoFlags |= COOLKEY_INFO_IS_REALLY_A_COOLKEY_MASK;
+ }
- info->mCUID = (char *)malloc(35); /* should be a define ! */
- if (!info->mCUID) {
- goto failed;
- }
- hres = getCUIDFromTokenInfo(&tokenInfo, info->mCUID);
+ info->mCUID = (char *)malloc(35); /* should be a define ! */
+ if (!info->mCUID) {
+ goto failed;
+ }
+ hres = getCUIDFromTokenInfo(&tokenInfo, info->mCUID);
/* shouldn't the be != S_SUCCESS? */
- if (hres == E_FAIL) {
- goto failed;
- }
-
- SECITEM_FreeItem(&ATR,PR_FALSE);
- SECITEM_FreeItem(&label,PR_FALSE);
- SECITEM_FreeItem(&isCOOLKey,PR_FALSE);
-
- info->mSlot = PK11_ReferenceSlot(aSlot);
- info->mSeries = PK11_GetSlotSeries(aSlot);
- return info;
+ if (hres == E_FAIL) {
+ goto failed;
+ }
-failed:
- if (ATR.data) {
SECITEM_FreeItem(&ATR,PR_FALSE);
- }
- if (label.data) {
SECITEM_FreeItem(&label,PR_FALSE);
- }
- if (obj) {
- PK11_DestroyGenericObjects(obj);
- }
- if (info) {
- delete info;
- }
- return NULL;
+ SECITEM_FreeItem(&isCOOLKey,PR_FALSE);
+
+ info->mSlot = PK11_ReferenceSlot(aSlot);
+ info->mSeries = PK11_GetSlotSeries(aSlot);
+ return info;
+
+failed:
+ if (ATR.data) {
+ SECITEM_FreeItem(&ATR,PR_FALSE);
+ }
+ if (label.data) {
+ SECITEM_FreeItem(&label,PR_FALSE);
+ }
+ if (obj) {
+ PK11_DestroyGenericObjects(obj);
+ }
+ if (info) {
+ delete info;
+ }
+ return NULL;
}
17 years, 1 month
[Fedora-directory-commits] esc/src/lib/coolkey CoolKey.h,1.3,1.4
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2025
Modified Files:
CoolKey.h
Log Message:
Add prototype for time stamp utility function.
Index: CoolKey.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/CoolKey.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CoolKey.h 9 Feb 2007 22:00:37 -0000 1.3
+++ CoolKey.h 24 Feb 2007 02:15:00 -0000 1.4
@@ -175,6 +175,8 @@
COOLKEY_API int CoolKeyGetAppletVer(const CoolKey *aKey, const bool isMajor);
+//Utility time function
+char *GetTStamp(char *aTime,int aSize);
}
////////////////////////////////////////////////////////////////////////
17 years, 1 month