Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pkcs11-helper for openSUSE:Factory checked in at 2024-02-15 20:58:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pkcs11-helper (Old) and /work/SRC/openSUSE:Factory/.pkcs11-helper.new.1815 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pkcs11-helper" Thu Feb 15 20:58:31 2024 rev:29 rq:1146104 version:1.30.0 Changes: -------- --- /work/SRC/openSUSE:Factory/pkcs11-helper/pkcs11-helper.changes 2022-10-27 13:52:18.640001087 +0200 +++ /work/SRC/openSUSE:Factory/.pkcs11-helper.new.1815/pkcs11-helper.changes 2024-02-15 20:58:33.132034649 +0100 @@ -1,0 +2,9 @@ +Sun Feb 11 19:01:57 UTC 2024 - Andreas Stieger <[email protected]> + +- update to 1.30.0: + * core: add dynamic loader provider attribute + * openssl: support DSA in libressl-3.5.0 + * openssl: fix openssl_ex_data_dup prototype +- get rid of almost empty pkcs11-helper package + +------------------------------------------------------------------- Old: ---- pkcs11-helper-1.29.0.tar.bz2 New: ---- pkcs11-helper-1.30.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pkcs11-helper.spec ++++++ --- /var/tmp/diff_new_pack.4tsXsr/_old 2024-02-15 20:58:33.948064118 +0100 +++ /var/tmp/diff_new_pack.4tsXsr/_new 2024-02-15 20:58:33.948064118 +0100 @@ -2,6 +2,7 @@ # spec file for package pkcs11-helper # # Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 Andreas Stieger <[email protected]> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +18,7 @@ Name: pkcs11-helper -Version: 1.29.0 +Version: 1.30.0 Release: 0 Summary: Helper Library for the Use with Smart Cards and the PKCS#11 API License: BSD-3-Clause AND GPL-2.0-only @@ -27,10 +28,8 @@ Source2: baselibs.conf BuildRequires: doxygen BuildRequires: fdupes -#BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: pkgconfig(openssl) -Requires: libpkcs11-helper1 = %{version} %description pkcs11-helper allows using multiple PKCS#11 providers at the same @@ -44,6 +43,8 @@ %package -n libpkcs11-helper1 Summary: Helper Library for the Use with Smart Cards and the PKCS#11 API Group: System/Libraries +# dropped empty package with 1.30.0, required by openvpn +Provides: %{name} = %{version} %description -n libpkcs11-helper1 pkcs11-helper allows using multiple PKCS#11 providers at the same time, @@ -55,8 +56,7 @@ %package devel Summary: Helper Library for the Use with Smart Cards and the PKCS#11 API Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} -Requires: pkgconfig(openssl) +Requires: libpkcs11-helper1 = %{version} %description devel pkcs11-helper allows using multiple PKCS#11 providers at the same time, @@ -66,7 +66,7 @@ using a simple API. %prep -%setup -q +%autosetup -p1 %build #autoreconf -fvi @@ -86,20 +86,17 @@ %make_install cp -a AUTHORS ChangeLog THANKS %{buildroot}%{_docdir}/%{name}/ find %{buildroot} -type f -name "*.la" -delete -print -%fdupes %{buildroot}%{_docdir} - -%post -n libpkcs11-helper1 -p /sbin/ldconfig -%postun -n libpkcs11-helper1 -p /sbin/ldconfig +# installed via macro +find %{buildroot}%{_docdir} -type f -name "COPYING*" -delete -print -%files -%license COPYING* -%doc %{_docdir}/%{name} -%exclude %{_docdir}/%{name}/api -%{_mandir}/man8/*%{ext_man} +%ldconfig_scriptlets -n libpkcs11-helper1 %files -n libpkcs11-helper1 %license COPYING* %{_libdir}/libpkcs11-helper.so.* +%{_mandir}/man8/*%{ext_man} +%doc %{_docdir}/%{name} +%exclude %{_docdir}/%{name}/api %files devel %license COPYING* ++++++ pkcs11-helper-1.29.0.tar.bz2 -> pkcs11-helper-1.30.0.tar.bz2 ++++++ ++++ 19209 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/ChangeLog new/pkcs11-helper-1.30.0/ChangeLog --- old/pkcs11-helper-1.29.0/ChangeLog 2022-04-21 09:06:43.000000000 +0200 +++ new/pkcs11-helper-1.30.0/ChangeLog 2023-12-01 17:51:56.000000000 +0100 @@ -1,7 +1,13 @@ pkcs11-helper Copyright (c) 2005-2022 Alon Bar-Lev <[email protected]> -2020-04-21 - Version 1.29.0 +2023-12-01 - Version 1.30.0 +* core: add dynamic loader provider attribute, thanks to Marc Becker. +* openssl: support DSA in libressl-3.5.0, thanks to Fabrice Fontaine. +* openssl: fix openssl_ex_data_dup prototype, thanks to Sam James for + reporting. + +2022-04-21 - Version 1.29.0 * build: do not fail if slot evnets are disabled, thanks to Fabrice Fontaine. * core: do not assume standard objects supported by provider. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/compile new/pkcs11-helper-1.30.0/compile --- old/pkcs11-helper-1.29.0/compile 2022-04-21 09:06:52.000000000 +0200 +++ new/pkcs11-helper-1.30.0/compile 2023-12-01 17:52:51.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/config-w32-vc.h new/pkcs11-helper-1.30.0/config-w32-vc.h --- old/pkcs11-helper-1.29.0/config-w32-vc.h 2022-04-21 09:07:25.000000000 +0200 +++ new/pkcs11-helper-1.30.0/config-w32-vc.h 2023-12-01 17:53:13.000000000 +0100 @@ -127,13 +127,13 @@ #define PACKAGE_NAME "pkcs11-helper" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "pkcs11-helper 1.29.0" +#define PACKAGE_STRING "pkcs11-helper 1.30.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pkcs11-helper" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.29.0" +#define PACKAGE_VERSION "1.30.0" /* Define if you are on Cygwin */ /* #undef PKCS11H_USE_CYGWIN */ @@ -163,7 +163,7 @@ /* #undef USE_VALGRIND */ /* Version number of package */ -#define VERSION "1.29.0" +#define VERSION "1.30.0" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/config.h.in new/pkcs11-helper-1.30.0/config.h.in --- old/pkcs11-helper-1.29.0/config.h.in 2022-04-21 09:06:51.000000000 +0200 +++ new/pkcs11-helper-1.30.0/config.h.in 2023-12-01 17:52:51.000000000 +0100 @@ -63,6 +63,9 @@ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT +/* Have DSA_METHOD->name */ +#undef HAVE_DSA_METHOD_NAME + /* Define to 1 if you have the `DSA_meth_dup' function. */ #undef HAVE_DSA_METH_DUP @@ -111,9 +114,6 @@ /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET @@ -237,7 +237,9 @@ /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Test log level */ @@ -246,9 +248,6 @@ /* Test provider */ #undef TEST_PROVIDER -/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ -#undef TIME_WITH_SYS_TIME - /* Define to 1 if your <sys/time.h> declares `struct tm'. */ #undef TM_IN_SYS_TIME @@ -267,7 +266,7 @@ /* Define to `long int' if <sys/types.h> does not define. */ #undef off_t -/* Define to `int' if <sys/types.h> does not define. */ +/* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define to `unsigned int' if <sys/types.h> does not define. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/configure.ac new/pkcs11-helper-1.30.0/configure.ac --- old/pkcs11-helper-1.29.0/configure.ac 2022-04-21 09:06:43.000000000 +0200 +++ new/pkcs11-helper-1.30.0/configure.ac 2023-12-01 17:52:38.000000000 +0100 @@ -48,10 +48,10 @@ # POSSIBILITY OF SUCH DAMAGE. # -AC_PREREQ(2.60) +AC_PREREQ([2.60]) define([PACKAGE_VERSION_MAJOR], [1]) -define([PACKAGE_VERSION_MINOR], [29]) +define([PACKAGE_VERSION_MINOR], [30]) define([PACKAGE_VERSION_FIX], [0]) define([PACKAGE_SUFFIX], []) @@ -248,6 +248,7 @@ [AC_DEFINE_UNQUOTED([TEST_LOG_LEVEL], [3], [Test log level])] ) +AC_PROG_EGREP AC_PROG_CC AC_PROG_INSTALL PKG_PROG_PKG_CONFIG @@ -300,7 +301,9 @@ fi if test "${have_openssl}" = "yes"; then + old_CFLAGS="${CFLAGS}" old_LIBS="${LIBS}" + CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}" LIBS="${LIBS} ${OPENSSL_LIBS}" AC_CHECK_FUNCS([ \ RSA_meth_dup RSA_meth_free \ @@ -344,6 +347,20 @@ ) AC_MSG_CHECKING([for OpenSSL ec support]) AC_MSG_RESULT([${openssl_ec}]) + # https://github.com/OpenSC/pkcs11-helper/pull/55 + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <openssl/dsa.h>]], + [[ + int foo() { + DSA_METHOD *meth = NULL; + sizeof(meth->name); + } + ]] + )], + [AC_DEFINE([HAVE_DSA_METHOD_NAME], [1], [Have DSA_METHOD->name])] + ) + CFLAGS="${old_CFLAGS}" LIBS="${old_LIBS}" fi @@ -402,8 +419,6 @@ CFLAGS="${CFLAGS} -Wall -Wextra -Wpointer-arith -Wsign-compare -Wno-unused-parameter -Wno-unused-function -Wno-variadic-macros -Wno-long-long" fi -# Checks for header files. -AC_HEADER_STDC AX_CPP_VARARG_MACRO_ISO AX_CPP_VARARG_MACRO_GCC AC_C_CONST @@ -412,9 +427,10 @@ AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T -AC_HEADER_TIME + AC_STRUCT_TM AX_SIZE_T_PRINTF +AC_CHECK_INCLUDES_DEFAULT AC_CHECK_HEADERS([ \ stdio.h \ stdlib.h \ @@ -581,6 +597,7 @@ AC_SUBST([LIBPKCS11_HELPER_LT_OLDEST]) AC_SUBST([WIN_LIBPREFIX]) AC_SUBST([PKCS11H_FEATURES]) +AM_CONDITIONAL([ENABLE_SHARED], [test "${enable_shared}" = "yes" ]) AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) AM_CONDITIONAL([CYGWIN], [test "${CYGWIN}" = "yes"]) AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/distro/rpm/pkcs11-helper.spec new/pkcs11-helper-1.30.0/distro/rpm/pkcs11-helper.spec --- old/pkcs11-helper-1.29.0/distro/rpm/pkcs11-helper.spec 2022-04-21 09:07:25.000000000 +0200 +++ new/pkcs11-helper-1.30.0/distro/rpm/pkcs11-helper.spec 2023-12-01 17:53:13.000000000 +0100 @@ -2,7 +2,7 @@ %bcond_with doc %define name pkcs11-helper -%define version 1.29.0 +%define version 1.30.0 %define release 2 %define prefix /usr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/include/pkcs11-helper-1.0/pkcs11h-core.h new/pkcs11-helper-1.30.0/include/pkcs11-helper-1.0/pkcs11h-core.h --- old/pkcs11-helper-1.29.0/include/pkcs11-helper-1.0/pkcs11h-core.h 2021-12-31 19:33:35.000000000 +0100 +++ new/pkcs11-helper-1.30.0/include/pkcs11-helper-1.0/pkcs11h-core.h 2023-09-07 23:43:32.000000000 +0200 @@ -134,7 +134,7 @@ #define PKCS11H_LOG_QUIET 0 /** @} */ -/** Inifite session limit */ +/** Infinite session limit */ #define PKCS11H_PIN_CACHE_INFINITE -1 /** @@ -384,8 +384,17 @@ */ #define PKCS11H_PROVIDER_PROPERTY_PROVIDER_DESTRUCT_HOOK_DATA 8 +/** + * @brief Provider loader flags for platform. + * Value type is unsigned. + * Default value is platform dependent: + * win32 -> 0 + * dlopen -> RTLD_NOW | RTLD_LOCAL + */ +#define PKCS11H_PROVIDER_PROPERTY_LOADER_FLAGS 9 + /** @private */ -#define _PKCS11H_PROVIDER_PROPERTY_LAST 9 +#define _PKCS11H_PROVIDER_PROPERTY_LAST 10 /** @} */ @@ -519,7 +528,7 @@ pkcs11h_getFeatures (void); /** - * @brief Inititalize helper interface. + * @brief Initialize helper interface. * @return CK_RV. * @see pkcs11h_terminate(). * @attention This function must be called from the main thread. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/include/pkcs11-helper-1.0/pkcs11h-version.h new/pkcs11-helper-1.30.0/include/pkcs11-helper-1.0/pkcs11h-version.h --- old/pkcs11-helper-1.29.0/include/pkcs11-helper-1.0/pkcs11h-version.h 2022-04-21 09:07:25.000000000 +0200 +++ new/pkcs11-helper-1.30.0/include/pkcs11-helper-1.0/pkcs11h-version.h 2023-12-01 17:53:13.000000000 +0100 @@ -70,7 +70,7 @@ */ #define PKCS11H_VERSION ( \ (1<<16) | \ - (29<<8) | \ + (30<<8) | \ (0<<0) \ ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/lib/Makefile.am new/pkcs11-helper-1.30.0/lib/Makefile.am --- old/pkcs11-helper-1.29.0/lib/Makefile.am 2021-02-03 20:11:21.000000000 +0100 +++ new/pkcs11-helper-1.30.0/lib/Makefile.am 2023-09-07 23:43:32.000000000 +0200 @@ -128,10 +128,12 @@ endif if WIN32 +if ENABLE_SHARED mylibdir=$(libdir) mylib_DATA=.libs/@WIN_LIBPREFIX@pkcs11-helper-@[email protected] .libs/@WIN_LIBPREFIX@pkcs11-helper-@[email protected]: libpkcs11-helper.la endif +endif RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/lib/Makefile.w32-vc new/pkcs11-helper-1.30.0/lib/Makefile.w32-vc --- old/pkcs11-helper-1.29.0/lib/Makefile.w32-vc 2021-05-15 11:20:50.000000000 +0200 +++ new/pkcs11-helper-1.30.0/lib/Makefile.w32-vc 2023-09-07 23:43:32.000000000 +0200 @@ -69,7 +69,7 @@ OPENSSL_LIB=$(OPENSSL_HOME)\lib OPENSSL_CFLAGS=-I$(OPENSSL_INC) -DENABLE_PKCS11H_OPENSSL -OPENSSL_LIBS=-LIBPATH:$(OPENSSL_LIB) user32.lib advapi32.lib $(OPENSSL_STATIC) +OPENSSL_LIBS=-LIBPATH:$(OPENSSL_LIB) user32.lib advapi32.lib ws2_32.lib crypt32.lib $(OPENSSL_STATIC) !endif CFLAGS = -I../include $(OPENSSL_CFLAGS) -DWIN32 -DWIN32_LEAN_AND_MEAN -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_WIN32_WINNT=0x0400 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/lib/_pkcs11h-core.h new/pkcs11-helper-1.30.0/lib/_pkcs11h-core.h --- old/pkcs11-helper-1.29.0/lib/_pkcs11h-core.h 2021-12-31 19:33:35.000000000 +0100 +++ new/pkcs11-helper-1.30.0/lib/_pkcs11h-core.h 2023-09-07 23:43:32.000000000 +0200 @@ -134,6 +134,8 @@ #if defined(ENABLE_PKCS11H_SLOTEVENT) _pkcs11h_thread_t slotevent_thread; #endif + + unsigned loader_flags; }; struct _pkcs11h_session_s { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/lib/pkcs11h-core.c new/pkcs11-helper-1.30.0/lib/pkcs11h-core.c --- old/pkcs11-helper-1.29.0/lib/pkcs11h-core.c 2022-04-06 20:09:20.000000000 +0200 +++ new/pkcs11-helper-1.30.0/lib/pkcs11h-core.c 2023-09-07 23:43:32.000000000 +0200 @@ -138,6 +138,7 @@ "init_args", "provider_destruct_hook", "provider_destruct_hook_data", + "provider_loader_flags", NULL }; @@ -916,6 +917,10 @@ reference ); +#if !defined(_WIN32) + provider->loader_flags = RTLD_NOW | RTLD_LOCAL; +#endif + _PKCS11H_DEBUG ( PKCS11H_LOG_DEBUG2, "PKCS#11: pkcs11h_registerProvider Provider '%s'", @@ -1001,6 +1006,7 @@ case PKCS11H_PROVIDER_PROPERTY_SLOT_EVENT_METHOD: case PKCS11H_PROVIDER_PROPERTY_MASK_PRIVATE_MODE: case PKCS11H_PROVIDER_PROPERTY_SLOT_POLL_INTERVAL: + case PKCS11H_PROVIDER_PROPERTY_LOADER_FLAGS: *(unsigned *)value = (unsigned)strtol(value_str, 0, 0); value_size = sizeof(unsigned); break; @@ -1084,6 +1090,9 @@ case PKCS11H_PROVIDER_PROPERTY_PROVIDER_DESTRUCT_HOOK_DATA: *value = &provider->destruct_hook_data; *value_size = sizeof(provider->destruct_hook_data); + case PKCS11H_PROVIDER_PROPERTY_LOADER_FLAGS: + *value = &provider->loader_flags; + *value_size = sizeof(provider->loader_flags); break; } rv = CKR_OK; @@ -1254,9 +1263,9 @@ } #if defined(_WIN32) - provider->handle = LoadLibraryA (provider->provider_location); + provider->handle = LoadLibraryExA (provider->provider_location, NULL, provider->loader_flags); #else - provider->handle = dlopen (provider->provider_location, RTLD_NOW | RTLD_LOCAL); + provider->handle = dlopen (provider->provider_location, provider->loader_flags); #endif if (provider->handle == NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/lib/pkcs11h-openssl.c new/pkcs11-helper-1.30.0/lib/pkcs11h-openssl.c --- old/pkcs11-helper-1.29.0/lib/pkcs11h-openssl.c 2022-04-07 19:01:01.000000000 +0200 +++ new/pkcs11-helper-1.30.0/lib/pkcs11h-openssl.c 2023-09-07 23:43:32.000000000 +0200 @@ -235,9 +235,13 @@ static int DSA_meth_set1_name (DSA_METHOD *meth, const char *name) { +#ifdef HAVE_DSA_METHOD_NAME CK_RV rv; rv = _pkcs11h_mem_strdup ((void *)&meth->name, name); return rv == CKR_OK ? 1 : 0; +#else + return 0; +#endif } #endif @@ -336,7 +340,7 @@ __pkcs11h_openssl_ex_data_dup ( CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, - void *from_d, + void **from_d, int idx, long argl, void *argp @@ -346,7 +350,7 @@ __pkcs11h_openssl_ex_data_dup ( CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, - void *from_d, + void **from_d, int idx, long argl, void *argp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/lib/pkcs11h-session.c new/pkcs11-helper-1.30.0/lib/pkcs11h-session.c --- old/pkcs11-helper-1.29.0/lib/pkcs11h-session.c 2022-04-07 19:01:01.000000000 +0200 +++ new/pkcs11-helper-1.30.0/lib/pkcs11h-session.c 2023-09-07 23:48:31.000000000 +0200 @@ -1006,24 +1006,6 @@ } - if (label == NULL && (mask_prompt & PKCS11H_PROMPT_MASK_ALLOW_PIN_PROMPT) == 0) { - rv = CKR_USER_NOT_LOGGED_IN; - - _PKCS11H_DEBUG ( - PKCS11H_LOG_DEBUG1, - "PKCS#11: Calling pin_prompt hook denied because of prompt mask" - ); - } - - if (label != NULL && (mask_prompt & PKCS11H_PROMPT_MASK_ALLOW_KEY_PROMPT) == 0) { - rv = CKR_USER_NOT_LOGGED_IN; - - _PKCS11H_DEBUG ( - PKCS11H_LOG_DEBUG1, - "PKCS#11: Calling pin_prompt hook denied because of prompt mask" - ); - } - while ( !login_succeeded && retry_count < _g_pkcs11h_data->max_retries @@ -1042,43 +1024,56 @@ PKCS11H_BOOL prompt_ret; if (label != NULL &&_g_pkcs11h_data->hooks.key_prompt != NULL) { - _PKCS11H_DEBUG ( - PKCS11H_LOG_DEBUG1, - "PKCS#11: Calling key_prompt hook for '%s':'%s'", - session->token_id->display, - label - ); - prompt_ret = _g_pkcs11h_data->hooks.key_prompt ( - _g_pkcs11h_data->hooks.key_prompt_data, - user_data, - session->token_id, - label, - retry_count, - pin, - sizeof (pin) - ); - } - else { - _PKCS11H_DEBUG ( - PKCS11H_LOG_DEBUG1, - "PKCS#11: Calling pin_prompt hook for '%s'", - label == NULL ? session->token_id->display : compact_token_id->display - ); - prompt_ret = _g_pkcs11h_data->hooks.pin_prompt ( - _g_pkcs11h_data->hooks.pin_prompt_data, - user_data, - label == NULL ? session->token_id : compact_token_id, - retry_count, - pin, - sizeof (pin) - ); - } + if ((mask_prompt & PKCS11H_PROMPT_MASK_ALLOW_KEY_PROMPT) == 0) { + rv = CKR_USER_NOT_LOGGED_IN; - if (prompt_ret) { - rv = CKR_OK; + _PKCS11H_DEBUG ( + PKCS11H_LOG_DEBUG1, + "PKCS#11: Calling key_prompt hook denied because of prompt mask" + ); + } + else { + _PKCS11H_DEBUG ( + PKCS11H_LOG_DEBUG1, + "PKCS#11: Calling key_prompt hook for '%s':'%s'", + session->token_id->display, + label + ); + rv = _g_pkcs11h_data->hooks.key_prompt ( + _g_pkcs11h_data->hooks.key_prompt_data, + user_data, + session->token_id, + label, + retry_count, + pin, + sizeof (pin) + ) != 0 ? CKR_OK : CKR_CANCEL; + } } else { - rv = CKR_CANCEL; + if ((mask_prompt & PKCS11H_PROMPT_MASK_ALLOW_PIN_PROMPT) == 0) { + rv = CKR_USER_NOT_LOGGED_IN; + + _PKCS11H_DEBUG ( + PKCS11H_LOG_DEBUG1, + "PKCS#11: Calling pin_prompt hook denied because of prompt mask" + ); + } + else { + _PKCS11H_DEBUG ( + PKCS11H_LOG_DEBUG1, + "PKCS#11: Calling pin_prompt hook for '%s'", + label == NULL ? session->token_id->display : compact_token_id->display + ); + rv = _g_pkcs11h_data->hooks.pin_prompt ( + _g_pkcs11h_data->hooks.pin_prompt_data, + user_data, + label == NULL ? session->token_id : compact_token_id, + retry_count, + pin, + sizeof (pin) + ) != 0 ? CKR_OK : CKR_CANCEL; + } } _PKCS11H_DEBUG ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/lib/versioninfo.rc new/pkcs11-helper-1.30.0/lib/versioninfo.rc --- old/pkcs11-helper-1.29.0/lib/versioninfo.rc 2022-04-21 09:07:25.000000000 +0200 +++ new/pkcs11-helper-1.30.0/lib/versioninfo.rc 2023-12-01 17:53:13.000000000 +0100 @@ -2,7 +2,7 @@ VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,0 - PRODUCTVERSION 1,29,0,0 + PRODUCTVERSION 1,30,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x21L @@ -27,8 +27,8 @@ VALUE "OriginalFilename", "pkcs11-helper-1.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "pkcs11-helper\0" - VALUE "ProductVersion", "1,29,0,0\0" - VALUE "SpecialBuild", " key_prompt openssl engine_crypto_openssl engine_crypto_nss engine_crypto_mbedtls debug threading token data certificate slotevent engine_crypto \0" + VALUE "ProductVersion", "1,30,0,0\0" + VALUE "SpecialBuild", " key_prompt openssl engine_crypto_openssl engine_crypto_mbedtls debug threading token data certificate slotevent engine_crypto \0" END END END diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/m4/libtool.m4 new/pkcs11-helper-1.30.0/m4/libtool.m4 --- old/pkcs11-helper-1.29.0/m4/libtool.m4 2022-04-21 09:06:49.000000000 +0200 +++ new/pkcs11-helper-1.30.0/m4/libtool.m4 2023-12-01 17:52:49.000000000 +0100 @@ -1071,11 +1071,11 @@ # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/missing new/pkcs11-helper-1.30.0/missing --- old/pkcs11-helper-1.29.0/missing 2022-04-21 09:06:52.000000000 +0200 +++ new/pkcs11-helper-1.30.0/missing 2023-12-01 17:52:51.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/pkcs11-helper-1.29.0/test-driver new/pkcs11-helper-1.30.0/test-driver --- old/pkcs11-helper-1.29.0/test-driver 2022-04-21 09:06:52.000000000 +0200 +++ new/pkcs11-helper-1.30.0/test-driver 2023-12-01 17:52:51.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,11 +42,13 @@ { cat <<END Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] + test-driver --test-name NAME --log-file PATH --trs-file PATH + [--expect-failure {yes|no}] [--color-tests {yes|no}] + [--enable-hard-errors {yes|no}] [--] TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] + The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. END } @@ -103,8 +105,11 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name"
