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 2026-01-18 22:18:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pkcs11-helper (Old)
 and      /work/SRC/openSUSE:Factory/.pkcs11-helper.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pkcs11-helper"

Sun Jan 18 22:18:46 2026 rev:30 rq:1327816 version:1.31.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/pkcs11-helper/pkcs11-helper.changes      
2024-02-15 20:58:33.132034649 +0100
+++ /work/SRC/openSUSE:Factory/.pkcs11-helper.new.1928/pkcs11-helper.changes    
2026-01-18 22:19:15.572583621 +0100
@@ -1,0 +2,15 @@
+Sat Jan 17 13:42:38 UTC 2026 - Lucas Mulling <[email protected]>
+
+- Fix test provider path
+
+-------------------------------------------------------------------
+Tue Nov 11 13:54:49 UTC 2025 - Lucas Mulling <[email protected]>
+
+- Update to 1.31.0:
+  * reading: fix mutex handling for cond_wait, thanks to Gleb Popov.
+  * mbed: initialize certificate early using mbedtls_x509_crt_init.
+  * util: fix deserialize buffer overflow. thanks to Aarnav Bos.
+- Enable tests
+- Add patch Disable-interactive-tests.patch
+
+-------------------------------------------------------------------

Old:
----
  pkcs11-helper-1.30.0.tar.bz2

New:
----
  Disable-interactive-tests.patch
  _multibuild
  pkcs11-helper-1.31.0.tar.bz2

----------(New B)----------
  New:- Enable tests
- Add patch Disable-interactive-tests.patch
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pkcs11-helper.spec ++++++
--- /var/tmp/diff_new_pack.r18qBt/_old  2026-01-18 22:19:16.312614027 +0100
+++ /var/tmp/diff_new_pack.r18qBt/_new  2026-01-18 22:19:16.316614192 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package pkcs11-helper
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 # Copyright (c) 2024 Andreas Stieger <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -17,19 +17,37 @@
 #
 
 
-Name:           pkcs11-helper
-Version:        1.30.0
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define psuffix -test
+%bcond_without test
+%else
+%define psuffix %{nil}
+%bcond_with test
+%endif
+
+%define         pkgname pkcs11-helper
+
+Name:           %{pkgname}%{psuffix}
+Version:        1.31.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
 Group:          Development/Libraries/C and C++
 URL:            https://github.com/OpenSC/OpenSC/wiki
-Source0:        
https://github.com/OpenSC/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
+Source0:        
https://github.com/OpenSC/%{pkgname}/releases/download/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.bz2
 Source2:        baselibs.conf
 BuildRequires:  doxygen
 BuildRequires:  fdupes
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(openssl)
+%if %{with test}
+Patch0:         Disable-interactive-tests.patch
+BuildRequires:  autoconf
+BuildRequires:  automake
+BuildRequires:  kryoptic
+BuildRequires:  libtool
+%endif
 
 %description
 pkcs11-helper allows using multiple PKCS#11 providers at the same
@@ -44,7 +62,7 @@
 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}
+Provides:       %{pkgname} = %{version}
 
 %description -n libpkcs11-helper1
 pkcs11-helper allows using multiple PKCS#11 providers at the same time,
@@ -66,15 +84,21 @@
 using a simple API.
 
 %prep
-%autosetup -p1
+%autosetup -p1 -n %{pkgname}-%{version}
 
 %build
-#autoreconf -fvi
+%if %{with test}
+autoreconf -fvi
+%endif
 # We use only openssl - disable all other engines
 %configure \
+%if %{with test}
+  --with-test-provider=%{_libdir}/pkcs11/libkryoptic_pkcs11.so \
+  --enable-tests \
+%endif
   --disable-static \
   --enable-doc \
-  --docdir=%{_docdir}/%{name} \
+  --docdir=%{_docdir}/%{pkgname} \
   --disable-crypto-engine-gnutls \
   --disable-crypto-engine-nss \
   --disable-crypto-engine-polarssl \
@@ -83,27 +107,36 @@
 %make_build
 
 %install
+%if %{without test}
 %make_install
-cp -a AUTHORS ChangeLog THANKS %{buildroot}%{_docdir}/%{name}/
+cp -a AUTHORS ChangeLog THANKS %{buildroot}%{_docdir}/%{pkgname}/
 find %{buildroot} -type f -name "*.la" -delete -print
 # installed via macro
 find %{buildroot}%{_docdir} -type f -name "COPYING*" -delete -print
+%endif
+
+%check
+%if %{with test}
+%make_build check
+%endif
 
+%if %{without test}
 %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
+%doc %{_docdir}/%{pkgname}
+%exclude %{_docdir}/%{pkgname}/api
 
 %files devel
 %license COPYING*
-%doc %{_docdir}/%{name}/api
+%doc %{_docdir}/%{pkgname}/api
 %{_includedir}/pkcs11-helper-1.0
 %{_libdir}/pkgconfig/*.pc
 %{_libdir}/*.so
 %dir %{_datadir}/aclocal
 %{_datadir}/aclocal/*.m4
+%endif
 

++++++ Disable-interactive-tests.patch ++++++
>From 3551870f8eeb40d9b72e27c8ba2cdff6eb3827fb Mon Sep 17 00:00:00 2001
From: Lucas Mulling <[email protected]>
Date: Wed, 12 Nov 2025 14:14:18 -0300
Subject: [PATCH] Disable interactive tests

Signed-off-by: Lucas Mulling <[email protected]>
---
 configure.ac      | 3 ---
 tests/Makefile.am | 5 +----
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 05f4a32..00a0255 100644
--- a/configure.ac
+++ b/configure.ac
@@ -627,9 +627,6 @@ AC_CONFIG_FILES([
        distro/debian/Makefile
        tests/Makefile
        tests/test-basic/Makefile
-       tests/test-certificate/Makefile
        tests/test-fork/Makefile
-       tests/test-openssl/Makefile
-       tests/test-slotevent/Makefile
 ])
 AC_OUTPUT
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 277de2a..1cfcd4a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,10 +52,7 @@ MAINTAINERCLEANFILES=$(srcdir)/Makefile.in
 
 COMMON= \
        test-basic \
-       test-fork \
-       test-certificate \
-       test-openssl \
-       test-slotevent
+       test-fork
 
 if ENABLE_TESTS
 SUBDIRS = $(COMMON)
-- 
2.51.1


++++++ _multibuild ++++++
<multibuild>
  <package>test</package>
</multibuild>

++++++ pkcs11-helper-1.30.0.tar.bz2 -> pkcs11-helper-1.31.0.tar.bz2 ++++++
++++ 4380 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.30.0/COPYING new/pkcs11-helper-1.31.0/COPYING
--- old/pkcs11-helper-1.30.0/COPYING    2023-03-30 11:58:22.000000000 +0200
+++ new/pkcs11-helper-1.31.0/COPYING    2024-09-04 10:44:23.000000000 +0200
@@ -49,7 +49,7 @@
        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
THE
        POSSIBILITY OF SUCH DAMAGE.
 
-Packeging License
+Packaging License
 
        RPM
                Copyright (c) 2006-2007 Eddy Nigg
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.30.0/ChangeLog new/pkcs11-helper-1.31.0/ChangeLog
--- old/pkcs11-helper-1.30.0/ChangeLog  2023-12-01 17:51:56.000000000 +0100
+++ new/pkcs11-helper-1.31.0/ChangeLog  2025-11-10 15:31:46.000000000 +0100
@@ -1,6 +1,11 @@
 pkcs11-helper
 Copyright (c) 2005-2022 Alon Bar-Lev <[email protected]>
 
+2025-11-10 - Version 1.31.0
+* threading: fix mutex handling for cond_wait, thanks to Gleb Popov.
+* mbed: initialize certificate early using mbedtls_x509_crt_init.
+* util: fix deserialize buffer overflow. thanks to Aarnav Bos.
+
 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.
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.30.0/config-w32-vc.h 
new/pkcs11-helper-1.31.0/config-w32-vc.h
--- old/pkcs11-helper-1.30.0/config-w32-vc.h    2023-12-01 17:53:13.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/config-w32-vc.h    2025-11-10 15:32:19.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.30.0"
+#define PACKAGE_STRING "pkcs11-helper 1.31.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.30.0"
+#define PACKAGE_VERSION "1.31.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.30.0"
+#define VERSION "1.31.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.30.0/configure.ac new/pkcs11-helper-1.31.0/configure.ac
--- old/pkcs11-helper-1.30.0/configure.ac       2023-12-01 17:52:38.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/configure.ac       2025-11-10 15:31:46.000000000 
+0100
@@ -51,7 +51,7 @@
 AC_PREREQ([2.60])
 
 define([PACKAGE_VERSION_MAJOR], [1])
-define([PACKAGE_VERSION_MINOR], [30])
+define([PACKAGE_VERSION_MINOR], [31])
 define([PACKAGE_VERSION_FIX], [0])
 define([PACKAGE_SUFFIX], [])
 
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.30.0/distro/debian/copyright 
new/pkcs11-helper-1.31.0/distro/debian/copyright
--- old/pkcs11-helper-1.30.0/distro/debian/copyright    2023-12-01 
17:53:15.000000000 +0100
+++ new/pkcs11-helper-1.31.0/distro/debian/copyright    2025-11-10 
15:32:22.000000000 +0100
@@ -58,7 +58,7 @@
        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
THE
        POSSIBILITY OF SUCH DAMAGE.
 
-Packeging License
+Packaging License
 
        RPM
                Copyright (c) 2006-2007 Eddy Nigg
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.30.0/distro/rpm/pkcs11-helper.spec 
new/pkcs11-helper-1.31.0/distro/rpm/pkcs11-helper.spec
--- old/pkcs11-helper-1.30.0/distro/rpm/pkcs11-helper.spec      2023-12-01 
17:53:13.000000000 +0100
+++ new/pkcs11-helper-1.31.0/distro/rpm/pkcs11-helper.spec      2025-11-10 
15:32:20.000000000 +0100
@@ -2,7 +2,7 @@
 %bcond_with doc
 
 %define                name            pkcs11-helper
-%define                version         1.30.0
+%define                version         1.31.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.30.0/doc/api/Doxyfile 
new/pkcs11-helper-1.31.0/doc/api/Doxyfile
--- old/pkcs11-helper-1.30.0/doc/api/Doxyfile   2023-12-01 17:53:13.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/doc/api/Doxyfile   2025-11-10 15:32:19.000000000 
+0100
@@ -601,7 +601,7 @@
 # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
 # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
 # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
+# link to the source code.  Otherwise they will link to the documentation.
 
 REFERENCES_LINK_SOURCE = 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.30.0/doc/api/Doxyfile.in 
new/pkcs11-helper-1.31.0/doc/api/Doxyfile.in
--- old/pkcs11-helper-1.30.0/doc/api/Doxyfile.in        2023-03-30 
11:58:22.000000000 +0200
+++ new/pkcs11-helper-1.31.0/doc/api/Doxyfile.in        2024-09-04 
10:44:23.000000000 +0200
@@ -601,7 +601,7 @@
 # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
 # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
 # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
+# link to the source code.  Otherwise they will link to the documentation.
 
 REFERENCES_LINK_SOURCE = 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.30.0/include/pkcs11-helper-1.0/pkcs11h-core.h 
new/pkcs11-helper-1.31.0/include/pkcs11-helper-1.0/pkcs11h-core.h
--- old/pkcs11-helper-1.30.0/include/pkcs11-helper-1.0/pkcs11h-core.h   
2023-09-07 23:43:32.000000000 +0200
+++ new/pkcs11-helper-1.31.0/include/pkcs11-helper-1.0/pkcs11h-core.h   
2024-09-04 10:44:23.000000000 +0200
@@ -159,7 +159,7 @@
  * @addtogroup PKCS11H_SLOTEVENT_METHOD
  * @{
  */
-/* Auto select by provider information. */
+/** Auto select by provider information. */
 #define PKCS11H_SLOTEVENT_METHOD_AUTO          0
 /** Force trigger. */
 #define PKCS11H_SLOTEVENT_METHOD_TRIGGER       1
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.30.0/include/pkcs11-helper-1.0/pkcs11h-version.h 
new/pkcs11-helper-1.31.0/include/pkcs11-helper-1.0/pkcs11h-version.h
--- old/pkcs11-helper-1.30.0/include/pkcs11-helper-1.0/pkcs11h-version.h        
2023-12-01 17:53:13.000000000 +0100
+++ new/pkcs11-helper-1.31.0/include/pkcs11-helper-1.0/pkcs11h-version.h        
2025-11-10 15:32:19.000000000 +0100
@@ -70,7 +70,7 @@
  */
 #define PKCS11H_VERSION ( \
        (1<<16) | \
-       (30<<8) | \
+       (31<<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.30.0/lib/_pkcs11h-crypto-mbedtls.c 
new/pkcs11-helper-1.31.0/lib/_pkcs11h-crypto-mbedtls.c
--- old/pkcs11-helper-1.30.0/lib/_pkcs11h-crypto-mbedtls.c      2023-09-07 
23:43:32.000000000 +0200
+++ new/pkcs11-helper-1.31.0/lib/_pkcs11h-crypto-mbedtls.c      2024-10-28 
15:11:45.000000000 +0100
@@ -87,13 +87,14 @@
 
        (void)global_data;
 
+       mbedtls_x509_crt_init(&x509);
+
        /*_PKCS11H_ASSERT (global_data!=NULL); NOT NEEDED*/
        _PKCS11H_ASSERT (blob!=NULL);
        _PKCS11H_ASSERT (expiration!=NULL);
 
        *expiration = (time_t)0;
 
-       memset(&x509, 0, sizeof(x509));
        if (0 != mbedtls_x509_crt_parse (&x509, blob, blob_size)) {
                goto cleanup;
        }
@@ -134,6 +135,8 @@
 
        (void)global_data;
 
+       mbedtls_x509_crt_init(&x509);
+
        /*_PKCS11H_ASSERT (global_data!=NULL); NOT NEEDED*/
        _PKCS11H_ASSERT (blob!=NULL);
        _PKCS11H_ASSERT (dn!=NULL);
@@ -141,7 +144,6 @@
 
        dn[0] = '\x0';
 
-       memset(&x509, 0, sizeof(x509));
        if (0 != mbedtls_x509_crt_parse (&x509, blob, blob_size)) {
                goto cleanup;
        }
@@ -176,16 +178,17 @@
 
        (void)global_data;
 
+       mbedtls_x509_crt_init(&x509_issuer);
+       mbedtls_x509_crt_init(&x509_cert);
+
        /*_PKCS11H_ASSERT (global_data!=NULL); NOT NEEDED*/
        _PKCS11H_ASSERT (issuer_blob!=NULL);
        _PKCS11H_ASSERT (cert_blob!=NULL);
 
-       memset(&x509_issuer, 0, sizeof(x509_issuer));
        if (0 != mbedtls_x509_crt_parse (&x509_issuer, issuer_blob, 
issuer_blob_size)) {
                goto cleanup;
        }
 
-       memset(&x509_cert, 0, sizeof(x509_cert));
        if (0 != mbedtls_x509_crt_parse (&x509_cert, cert_blob, 
cert_blob_size)) {
                goto cleanup;
        }
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.30.0/lib/pkcs11h-serialization.c 
new/pkcs11-helper-1.31.0/lib/pkcs11h-serialization.c
--- old/pkcs11-helper-1.30.0/lib/pkcs11h-serialization.c        2023-03-30 
11:58:22.000000000 +0200
+++ new/pkcs11-helper-1.31.0/lib/pkcs11h-serialization.c        2025-11-10 
15:21:21.000000000 +0100
@@ -415,6 +415,11 @@
 
        certificate_id->attrCKA_ID_size = strlen (p)/2;
 
+       if (certificate_id->attrCKA_ID_size == 0) {
+               rv = CKR_ATTRIBUTE_VALUE_INVALID;
+               goto cleanup;
+       }
+
        if (
                (rv = _pkcs11h_mem_malloc (
                        (void *)&certificate_id->attrCKA_ID,
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.30.0/lib/pkcs11h-threading.c 
new/pkcs11-helper-1.31.0/lib/pkcs11h-threading.c
--- old/pkcs11-helper-1.30.0/lib/pkcs11h-threading.c    2023-03-30 
11:58:22.000000000 +0200
+++ new/pkcs11-helper-1.31.0/lib/pkcs11h-threading.c    2024-09-04 
10:44:23.000000000 +0200
@@ -388,8 +388,7 @@
        if (
                (
                        pthread_mutex_init (&cond->mut, NULL) ||
-                       pthread_cond_init (&cond->cond, NULL) ||
-                       pthread_mutex_lock (&cond->mut)
+                       pthread_cond_init (&cond->cond, NULL)
                )
        ) {
                rv = CKR_FUNCTION_FAILED;
@@ -423,6 +422,13 @@
                goto cleanup;
        }
 #else
+       PKCS11H_BOOL unlock_mutex = FALSE;
+
+       if (pthread_mutex_lock (&cond->mut)) {
+               goto cleanup;
+       }
+       unlock_mutex = TRUE;
+
        if (milli == PKCS11H_COND_INFINITE) {
                if (pthread_cond_wait (&cond->cond, &cond->mut) ) {
                        rv = CKR_FUNCTION_FAILED;
@@ -449,6 +455,13 @@
 #endif
        rv = CKR_OK;
 cleanup:
+
+#if !defined(_WIN32)
+       if (unlock_mutex) {
+               pthread_mutex_unlock (&cond->mut);
+       }
+#endif
+
        return rv;
 }
 
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.30.0/lib/pkcs11h-util.c 
new/pkcs11-helper-1.31.0/lib/pkcs11h-util.c
--- old/pkcs11-helper-1.30.0/lib/pkcs11h-util.c 2023-03-30 11:58:22.000000000 
+0200
+++ new/pkcs11-helper-1.31.0/lib/pkcs11h-util.c 2025-11-10 15:21:21.000000000 
+0100
@@ -51,6 +51,20 @@
 #include "common.h"
 #include "_pkcs11h-util.h"
 
+static
+int
+_ctoi(const char c) {
+       if ('0' <= c && c <= '9') {
+               return c - '0';
+       } else if ('A' <= c && c <= 'F') {
+               return c - 'A' + 10;
+       } else if ('a' <= c && c <= 'f') {
+               return c - 'a' + 10;
+       } else {
+               return -1;
+       }
+}
+
 void
 _pkcs11h_util_fixupFixedString (
        OUT char * const target,                        /* MUST BE >= length+1 
*/
@@ -78,6 +92,7 @@
        IN const char * const source,
        IN OUT size_t * const p_target_size
 ) {
+       CK_RV ret = CKR_ATTRIBUTE_VALUE_INVALID;
        size_t target_max_size;
        const char *p;
        char buf[3] = {'\0', '\0', '\0'};
@@ -92,29 +107,31 @@
        *p_target_size = 0;
 
        while (*p != '\x0' && *p_target_size < target_max_size) {
-               if (isxdigit ((unsigned char)*p)) {
-                       buf[i%2] = *p;
+               int b1, b2;
 
-                       if ((i%2) == 1) {
-                               unsigned v;
-                               if (sscanf (buf, "%x", &v) != 1) {
-                                       v = 0;
-                               }
-                               target[*p_target_size] = (char)(v & 0xff);
-                               (*p_target_size)++;
-                       }
+               if ((b1 = _ctoi(*p)) == -1) {
+                       goto cleanup;
+               }
+               p++;
 
-                       i++;
+               if ((b2 = _ctoi(*p)) == -1) {
+                       goto cleanup;
                }
                p++;
+
+               target[*p_target_size] = (char)((b1 << 4) | b2);
+               (*p_target_size)++;
        }
 
        if (*p != '\x0') {
-               return CKR_ATTRIBUTE_VALUE_INVALID;
-       }
-       else {
-               return CKR_OK;
+               goto cleanup;
        }
+
+       ret = CKR_OK;
+
+cleanup:
+
+       return ret;
 }
 
 CK_RV
@@ -224,60 +241,69 @@
        CK_RV rv = CKR_FUNCTION_FAILED;
        const char *s = source;
        char *t = target;
+       size_t m = *max;
        size_t n = 0;
 
        /*_PKCS11H_ASSERT (target!=NULL); Not required*/
        _PKCS11H_ASSERT (source!=NULL);
        _PKCS11H_ASSERT (max!=NULL);
 
+#define __get_source(b) \
+       do { \
+               if (*s == '\0') { \
+                       rv = CKR_ATTRIBUTE_VALUE_INVALID; \
+                       goto cleanup; \
+               } \
+               b = *s; \
+               s++; \
+       } while(0)
+
+#define __add_target(c) \
+       do { \
+               if (t != NULL) { \
+                       if (n >= m) { \
+                               rv = CKR_ATTRIBUTE_VALUE_INVALID; \
+                               goto cleanup; \
+                       } \
+                       *t = (c); \
+                       t++; \
+               } \
+               n++; \
+       } while(0)
+
        while (*s != '\x0') {
                if (*s == '\\') {
-                       if (t != NULL) {
-                               if (n+1 > *max) {
-                                       rv = CKR_ATTRIBUTE_VALUE_INVALID;
-                                       goto cleanup;
-                               }
-                               else {
-                                       char b[3];
-                                       unsigned u;
-                                       b[0] = s[2];
-                                       b[1] = s[3];
-                                       b[2] = '\x0';
-                                       sscanf (b, "%08x", &u);
-                                       *t = (char)(u & 0xff);
-                                       t++;
-                               }
-                       }
-                       s+=4;
-               }
-               else {
-                       if (t != NULL) {
-                               if (n+1 > *max) {
-                                       rv = CKR_ATTRIBUTE_VALUE_INVALID;
-                                       goto cleanup;
-                               }
-                               else {
-                                       *t = *s;
-                                       t++;
-                               }
+                       int bin;
+                       int b1, b2;
+
+                       __get_source(bin);
+
+                       __get_source(bin);
+                       if (bin != 'x') {
+                               rv = CKR_ATTRIBUTE_VALUE_INVALID;
+                               goto cleanup;
                        }
-                       s++;
-               }
 
-               n+=1;
-       }
+                       __get_source(bin);
+                       if ((b1 = _ctoi(bin)) == -1) {
+                               rv = CKR_ATTRIBUTE_VALUE_INVALID;
+                               goto cleanup;
+                       }
 
-       if (t != NULL) {
-               if (n+1 > *max) {
-                       rv = CKR_ATTRIBUTE_VALUE_INVALID;
-                       goto cleanup;
-               }
-               else {
-                       *t = '\x0';
-                       t++;
+                       __get_source(bin);
+                       if ((b2 = _ctoi(bin)) == -1) {
+                               rv = CKR_ATTRIBUTE_VALUE_INVALID;
+                               goto cleanup;
+                       }
+                       __add_target((b1 << 4) | b2);
+               } else {
+                       int bin;
+                       __get_source(bin);
+                       __add_target(bin);
                }
        }
-       n++;
+
+       __add_target('\0');
 
        *max = n;
        rv = CKR_OK;
@@ -285,5 +311,8 @@
 cleanup:
 
        return rv;
+
+#undef __get_source
+#undef __add_target
 }
 
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.30.0/lib/versioninfo.rc 
new/pkcs11-helper-1.31.0/lib/versioninfo.rc
--- old/pkcs11-helper-1.30.0/lib/versioninfo.rc 2023-12-01 17:53:13.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/lib/versioninfo.rc 2025-11-10 15:32:19.000000000 
+0100
@@ -2,7 +2,7 @@
 
 VS_VERSION_INFO VERSIONINFO
        FILEVERSION 1,0,0,0
-       PRODUCTVERSION 1,30,0,0
+       PRODUCTVERSION 1,31,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,30,0,0\0"
-                       VALUE "SpecialBuild", " key_prompt openssl 
engine_crypto_openssl engine_crypto_mbedtls debug threading token data 
certificate slotevent engine_crypto \0"
+                       VALUE "ProductVersion", "1,31,0,0\0"
+                       VALUE "SpecialBuild", " key_prompt openssl 
engine_crypto_openssl engine_crypto_gnutls engine_crypto_nss 
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.30.0/m4/libtool.m4 new/pkcs11-helper-1.31.0/m4/libtool.m4
--- old/pkcs11-helper-1.30.0/m4/libtool.m4      2023-12-01 17:52:49.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/m4/libtool.m4      2025-11-10 15:31:54.000000000 
+0100
@@ -1,6 +1,7 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+#   Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -31,7 +32,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ])
 
-# serial 58 LT_INIT
+# serial 59 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -181,6 +182,7 @@
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_DECL_FILECMD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
@@ -219,8 +221,8 @@
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
 libext=a
 
 with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -777,7 +779,7 @@
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
+  $SED '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
    mv -f "$cfgfile" "$ofile" ||
@@ -1041,8 +1043,8 @@
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
-      echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
-      $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
       cat > conftest.c << _LT_EOF
@@ -1066,17 +1068,12 @@
       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' 
;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # 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[[912]]*)
-         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-       10.[[012]][[,.]]*)
-         _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
-       10.*|11.*)
-         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+    darwin*)
+      case $MACOSX_DEPLOYMENT_TARGET,$host in
+        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
+          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
+        *)
+          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
@@ -1125,12 +1122,12 @@
     output_verbose_link_cmd=func_echo_all
     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o 
\$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname 
\$verstring $_lt_dar_single_mod$_lt_dsymutil"
     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle 
\$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > 
\$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name \$rpath/\$soname \$verstring 
$_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > 
\$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib 
-bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > 
\$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name \$rpath/\$soname \$verstring 
$_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > 
\$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib 
-bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     m4_if([$1], [CXX],
 [   if test yes != "$lt_cv_apple_cc_single_mod"; then
       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o 
\$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib 
\$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname 
\$verstring$_lt_dsymutil"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > 
\$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs 
-nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag 
-o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name 
\$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > 
\$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs 
-nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag 
-o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name 
\$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 ],[])
   else
@@ -1244,7 +1241,8 @@
 # _LT_WITH_SYSROOT
 # ----------------
 AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
+[m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([for sysroot])
 AC_ARG_WITH([sysroot],
 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
   [Search for dependent libraries within DIR (or the compiler's sysroot
@@ -1261,7 +1259,7 @@
    fi
    ;; #(
  /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
    ;; #(
  no|'')
    ;; #(
@@ -1291,7 +1289,7 @@
   # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *ELF-32*)
        HPUX_IA64_MODE=32
        ;;
@@ -1308,7 +1306,7 @@
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test yes = "$lt_cv_prog_gnu_ld"; then
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -melf32bsmip"
          ;;
@@ -1320,7 +1318,7 @@
        ;;
       esac
     else
-      case `/usr/bin/file conftest.$ac_objext` in
+      case `$FILECMD conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -32"
          ;;
@@ -1342,7 +1340,7 @@
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *32-bit*)
        emul="${emul}32"
        ;;
@@ -1350,7 +1348,7 @@
        emul="${emul}64"
        ;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *MSB*)
        emul="${emul}btsmip"
        ;;
@@ -1358,7 +1356,7 @@
        emul="${emul}ltsmip"
        ;;
     esac
-    case `/usr/bin/file conftest.$ac_objext` in
+    case `$FILECMD conftest.$ac_objext` in
       *N32*)
        emul="${emul}n32"
        ;;
@@ -1378,14 +1376,14 @@
   # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
       *32-bit*)
        case $host in
          x86_64-*kfreebsd*-gnu)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           case `/usr/bin/file conftest.o` in
+           case `$FILECMD conftest.o` in
              *x86-64*)
                LD="${LD-ld} -m elf32_x86_64"
                ;;
@@ -1453,7 +1451,7 @@
   # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
+    case `$FILECMD conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
       yes*)
@@ -1492,9 +1490,22 @@
 m4_defun([_LT_PROG_AR],
 [AC_CHECK_TOOLS(AR, [ar], false)
 : ${AR=ar}
-: ${AR_FLAGS=cr}
 _LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
+         [Flags to create an archive])
 
 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
   [lt_cv_ar_at_file=no
@@ -1713,7 +1724,7 @@
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | 
openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1756,7 +1767,7 @@
   sysv5* | sco5v6* | sysv4.2uw2*)
     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
     if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
+      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[       ]]//'`
     else
       lt_cv_sys_max_cmd_len=32768
     fi
@@ -2206,26 +2217,35 @@
 striplib=
 old_striplib=
 AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
+if test -z "$STRIP"; then
+  AC_MSG_RESULT([no])
 else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP"; then
+  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+    old_striplib="$STRIP --strip-debug"
+    striplib="$STRIP --strip-unneeded"
+    AC_MSG_RESULT([yes])
+  else
+    case $host_os in
+    darwin*)
+      # FIXME - insert some real tests, host_os isn't really good enough
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
-    else
+      ;;
+    freebsd*)
+      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+        old_striplib="$STRIP --strip-debug"
+        striplib="$STRIP --strip-unneeded"
+        AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+      fi
+      ;;
+    *)
       AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
+      ;;
+    esac
+  fi
 fi
 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 _LT_DECL([], [striplib], [1])
@@ -2548,7 +2568,7 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED 
-e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | 
$SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
@@ -2558,14 +2578,14 @@
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release 
| $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release 
| $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
     ;;
 
-  *,cl*)
-    # Native MSVC
+  *,cl* | *,icl*)
+    # Native MSVC or ICC
     libname_spec='$name'
     soname_spec='$libname`echo $release | $SED -e 
's/[[.]]/-/g'`$versuffix$shared_ext'
     library_names_spec='$libname.dll.lib'
@@ -2584,7 +2604,7 @@
       done
       IFS=$lt_save_ifs
       # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 
's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 
's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
       ;;
     cygwin*)
       # Convert to unix form, then to dos form, then back to unix form
@@ -2621,7 +2641,7 @@
     ;;
 
   *)
-    # Assume MSVC wrapper
+    # Assume MSVC and ICC wrapper
     library_names_spec='$libname`echo $release | $SED -e 
's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
@@ -2654,7 +2674,7 @@
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
   if test -x /usr/bin/objformat; then
@@ -3465,7 +3485,7 @@
 
 bsdi[[45]]*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB 
(shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_cmd='$FILECMD -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -3499,14 +3519,14 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
       lt_cv_deplibs_check_method='file_magic 
(FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_cmd=$FILECMD
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
     esac
@@ -3520,7 +3540,7 @@
   ;;
 
 hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic 
(s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
@@ -3567,7 +3587,7 @@
 
 newos6*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB 
(executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_cmd=$FILECMD
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
@@ -3694,13 +3714,13 @@
        mingw*) lt_bad_file=conftest.nm/nofile ;;
        *) lt_bad_file=/dev/null ;;
        esac
-       case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+       case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
        *$lt_bad_file* | *'Invalid file or object type'*)
          lt_cv_path_NM="$tmp_nm -B"
          break 2
          ;;
        *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+         case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
          */dev/null*)
            lt_cv_path_NM="$tmp_nm -p"
            break 2
@@ -3726,7 +3746,7 @@
     # Let the user override the test.
   else
     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
     *COFF*)
       DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
@@ -3966,7 +3986,7 @@
 
 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
   # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
   # Adjust the below global symbol transforms to fixup imported variables.
   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
@@ -3984,20 +4004,20 @@
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
 $lt_cdecl_hook\
 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
 $lt_c_name_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
 
 # Transform an extracted symbol line into symbol name with lib prefix and
 # symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
 $lt_c_name_lib_hook\
 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
@@ -4021,7 +4041,7 @@
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
     # Fake it for dumpbin and say T for any non-static function,
     # D for any global variable and I for any imported variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
+    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
@@ -4039,9 +4059,9 @@
 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    
]]\($symcode$symcode*\)[[       ]][[    
]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[   
]]\($symcode$symcode*\)[[       ]][[    
]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ 
__gnu_lto/d'"
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ 
__gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -4329,7 +4349,7 @@
            ;;
        esac
        ;;
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
        # FreeBSD uses GNU C++
        ;;
       hpux9* | hpux10* | hpux11*)
@@ -4412,7 +4432,7 @@
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
            ;;
          *)
-           case `$CC -V 2>&1 | sed 5q` in
+           case `$CC -V 2>&1 | $SED 5q` in
            *Sun\ C*)
              # Sun C++ 5.9
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4754,7 +4774,7 @@
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
        ;;
       *)
-       case `$CC -V 2>&1 | sed 5q` in
+       case `$CC -V 2>&1 | $SED 5q` in
        *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 
8.[[0-3]]*)
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4937,7 +4957,7 @@
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | 
awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == 
"W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } 
else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e 
'\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 
2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") 
|| (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 
== "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 
sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e 
'\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 
2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") 
|| (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 
== "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print 
\$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
@@ -4945,7 +4965,7 @@
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*)
+    cl* | icl*)
       _LT_TAGVAR(exclude_expsyms, 
$1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
       ;;
     *)
@@ -5005,15 +5025,15 @@
 
   case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
+    # Microsoft Visual C++ or Intel C++ Compiler.
     if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
   interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
     with_gnu_ld=yes
     ;;
   openbsd* | bitrig*)
@@ -5068,7 +5088,7 @@
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5180,6 +5200,7 @@
        emximp -o $lib $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o 
$output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='@'
       ;;
 
     interix[[3-9]]*)
@@ -5194,7 +5215,7 @@
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs 
$compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 
262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols 
>$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs 
$compiler_flags $wl-h,$soname 
$wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr 
${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols 
>$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs 
$compiler_flags $wl-h,$soname 
$wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr 
${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -5237,7 +5258,7 @@
          _LT_TAGVAR(compiler_needs_object, $1)=yes
          ;;
        esac
-       case `$CC -V 2>&1 | sed 5q` in
+       case `$CC -V 2>&1 | $SED 5q` in
        *Sun\ C*)                       # Sun C 5.9
          _LT_TAGVAR(whole_archive_flag_spec, 
$1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test 
-z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all 
\"$new_convenience\"` $wl--no-whole-archive'
          _LT_TAGVAR(compiler_needs_object, $1)=yes
@@ -5249,13 +5270,14 @@
 
         if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > 
$output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
+            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
             echo "local: *; };" >> $output_objdir/$libname.ver~
             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs 
$compiler_flags $wl-soname $wl$soname $wl-version-script 
$wl$output_objdir/$libname.ver -o $lib'
         fi
 
        case $cc_basename in
        tcc*)
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
          ;;
        xlf* | bgf* | bgxlf* | mpixlf*)
@@ -5265,7 +5287,7 @@
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs 
$linker_flags -soname $soname -o $lib'
          if test yes = "$supports_anon_versioning"; then
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > 
$output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
+              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
               echo "local: *; };" >> $output_objdir/$libname.ver~
               $LD -shared $libobjs $deplibs $linker_flags -soname $soname 
-version-script $output_objdir/$libname.ver -o $lib'
          fi
@@ -5397,7 +5419,7 @@
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | 
awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == 
"W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } 
else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
        else
-         _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e 
'\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 
2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") 
|| (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 
== "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 
sort -u > $export_symbols'
+         _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e 
'\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 
2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") 
|| (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 
== "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print 
\$ 1 } } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
@@ -5580,12 +5602,12 @@
 
     cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
+      # Microsoft Visual C++ or Intel C++ Compiler.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       case $cc_basename in
-      cl*)
-       # Native MSVC
+      cl* | icl*)
+       # Native MSVC or ICC
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
        _LT_TAGVAR(always_export_symbols, $1)=yes
@@ -5626,7 +5648,7 @@
           fi'
        ;;
       *)
-       # Assume MSVC wrapper
+       # Assume MSVC and ICC wrapper
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
        # Tell ltmain to make .lib files, not .a files.
@@ -5674,7 +5696,7 @@
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs 
$deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
@@ -5815,6 +5837,7 @@
        # Fabrice Bellard et al's Tiny C Compiler
        _LT_TAGVAR(ld_shlibs, $1)=yes
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs 
$deplibs $compiler_flags'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
        ;;
       esac
       ;;
@@ -5886,6 +5909,7 @@
        emximp -o $lib $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o 
$output_objdir/${libname}_dll.a $output_objdir/$libname.def'
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='@'
       ;;
 
     osf3*)
@@ -6656,8 +6680,8 @@
 
       cygwin* | mingw* | pw32* | cegcc*)
        case $GXX,$cc_basename in
-       ,cl* | no,cl*)
-         # Native MSVC
+       ,cl* | no,cl* | ,icl* | no,icl*)
+         # Native MSVC or ICC
          # hardcode_libdir_flag_spec is actually meaningless, as there is
          # no search path for DLLs.
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -6755,6 +6779,7 @@
          emximp -o $lib $output_objdir/$libname.def'
        _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o 
$output_objdir/${libname}_dll.a $output_objdir/$libname.def'
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       _LT_TAGVAR(file_list_spec, $1)='@'
        ;;
 
       dgux*)
@@ -6785,7 +6810,7 @@
         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
         ;;
 
-      freebsd* | dragonfly*)
+      freebsd* | dragonfly* | midnightbsd*)
         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
         # conventions
         _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -6922,7 +6947,7 @@
        # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
        # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs 
$compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 
262144 + 1342177280` -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols 
>$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs 
$compiler_flags $wl-h,$soname 
$wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr 
${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols 
>$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs 
$compiler_flags $wl-h,$soname 
$wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr 
${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
        ;;
       irix5* | irix6*)
         case $cc_basename in
@@ -7062,13 +7087,13 @@
            _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs 
$compiler_flags $wl-soname $wl$soname -o $lib'
            if test yes = "$supports_anon_versioning"; then
              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > 
$output_objdir/$libname.ver~
-                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
+                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
                 echo "local: *; };" >> $output_objdir/$libname.ver~
                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname 
$wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
            fi
            ;;
          *)
-           case `$CC -V 2>&1 | sed 5q` in
+           case `$CC -V 2>&1 | $SED 5q` in
            *Sun\ C*)
              # Sun C++ 5.9
              _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -8214,6 +8239,14 @@
 AC_SUBST([DLLTOOL])
 ])
 
+# _LT_DECL_FILECMD
+# ----------------
+# Check for a file(cmd) program that can be used to detect file type and magic
+m4_defun([_LT_DECL_FILECMD],
+[AC_CHECK_TOOL([FILECMD], [file], [:])
+_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
+])# _LD_DECL_FILECMD
+
 # _LT_DECL_SED
 # ------------
 # Check for a fully-functional sed program, that truncates
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.30.0/m4/ltoptions.m4 
new/pkcs11-helper-1.31.0/m4/ltoptions.m4
--- old/pkcs11-helper-1.30.0/m4/ltoptions.m4    2023-12-01 17:52:49.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/m4/ltoptions.m4    2025-11-10 15:31:55.000000000 
+0100
@@ -1,7 +1,7 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+#   Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
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.30.0/m4/ltsugar.m4 new/pkcs11-helper-1.31.0/m4/ltsugar.m4
--- old/pkcs11-helper-1.30.0/m4/ltsugar.m4      2023-12-01 17:52:49.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/m4/ltsugar.m4      2025-11-10 15:31:55.000000000 
+0100
@@ -1,6 +1,6 @@
 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
 # Foundation, Inc.
 # Written by Gary V. Vaughan, 2004
 #
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.30.0/m4/ltversion.m4 
new/pkcs11-helper-1.31.0/m4/ltversion.m4
--- old/pkcs11-helper-1.30.0/m4/ltversion.m4    2023-12-01 17:52:49.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/m4/ltversion.m4    2025-11-10 15:31:55.000000000 
+0100
@@ -1,6 +1,7 @@
 # ltversion.m4 -- version numbers                      -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+#   Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,15 +10,15 @@
 
 # @configure_input@
 
-# serial 4179 ltversion.m4
+# serial 4245 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.7])
+m4_define([LT_PACKAGE_REVISION], [2.4.7])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.7'
+macro_revision='2.4.7'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 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.30.0/m4/lt~obsolete.m4 
new/pkcs11-helper-1.31.0/m4/lt~obsolete.m4
--- old/pkcs11-helper-1.30.0/m4/lt~obsolete.m4  2023-12-01 17:52:49.000000000 
+0100
+++ new/pkcs11-helper-1.31.0/m4/lt~obsolete.m4  2025-11-10 15:31:55.000000000 
+0100
@@ -1,7 +1,7 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+#   Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
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.30.0/tests/test-basic/Makefile.am 
new/pkcs11-helper-1.31.0/tests/test-basic/Makefile.am
--- old/pkcs11-helper-1.30.0/tests/test-basic/Makefile.am       2023-09-07 
23:43:32.000000000 +0200
+++ new/pkcs11-helper-1.31.0/tests/test-basic/Makefile.am       2025-11-10 
15:21:21.000000000 +0100
@@ -53,6 +53,7 @@
 MY_TESTS = \
        test-basic \
        test-basic2 \
+       test-serialize \
        $(NULL)
 
 TESTS=$(MY_TESTS)
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.30.0/tests/test-basic/test-serialize.c 
new/pkcs11-helper-1.31.0/tests/test-basic/test-serialize.c
--- old/pkcs11-helper-1.30.0/tests/test-basic/test-serialize.c  1970-01-01 
01:00:00.000000000 +0100
+++ new/pkcs11-helper-1.31.0/tests/test-basic/test-serialize.c  2025-11-10 
15:21:21.000000000 +0100
@@ -0,0 +1,137 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "../../config.h"
+#include <pkcs11-helper-1.0/pkcs11h-core.h>
+#include <pkcs11-helper-1.0/pkcs11h-certificate.h>
+
+static
+void
+fatal (const char * const m, CK_RV rv) {
+       fprintf (stderr, "%s - %08lu - %s\n", m, rv, pkcs11h_getMessage (rv));
+       exit (1);
+}
+
+static
+void
+_pkcs11h_hooks_log (
+       IN void * const global_data,
+       IN unsigned flags,
+       IN const char * const format,
+       IN va_list args
+) {
+       vfprintf (stdout, format, args);
+       fprintf (stdout, "\n");
+       fflush (stdout);
+}
+
+static
+CK_RV
+_deserialize (
+       const char * const str,
+       const PKCS11H_BOOL should_success
+) {
+       pkcs11h_certificate_id_t id = NULL;
+       char *p = NULL;
+       size_t max;
+       CK_RV ret;
+       CK_RV rv;
+
+       ret = pkcs11h_certificate_deserializeCertificateId (
+               &id,
+               str
+       );
+
+       if (should_success && ret != CKR_OK) {
+               fprintf(stderr, "String: %s\n", str);
+               fatal("Should succeed", rv);
+       }
+       if (!should_success && ret == CKR_OK) {
+               fprintf(stderr, "String: %s\n", str);
+               fatal("Should fail", rv);
+       }
+
+       if (id != NULL) {
+               if ((rv = pkcs11h_certificate_serializeCertificateId (
+                       NULL,
+                       &max,
+                       id
+               )) != CKR_OK) {
+                       fatal("pkcs11h_certificate_serializeCertificateId", rv);
+               }
+
+               if ((p = malloc(max)) == NULL) {
+                       fatal("malloc", CKR_HOST_MEMORY);
+               }
+
+               if ((rv = pkcs11h_certificate_serializeCertificateId (
+                       p,
+                       &max,
+                       id
+               )) != CKR_OK) {
+                       fatal("pkcs11h_certificate_serializeCertificateId(2)", 
rv);
+               }
+
+               if (strcmp(p, str)) {
+                       fprintf(stderr, "in: '%s' construct: '%s'\n", str, p);
+                       fatal("Fail serialize compare", CKR_FUNCTION_FAILED);
+               }
+       }
+
+       if (p != NULL) {
+               free(p);
+       }
+
+       if (id != NULL) {
+               pkcs11h_certificate_freeCertificateId(id);
+       }
+
+       return ret;
+}
+
+int main () {
+       CK_RV rv;
+       int i;
+
+       printf ("Initializing pkcs11-helper\n");
+
+       if ((rv = pkcs11h_initialize ()) != CKR_OK) {
+               fatal ("pkcs11h_initialize failed", rv);
+       }
+
+       printf ("Registering pkcs11-helper hooks\n");
+
+       if ((rv = pkcs11h_setLogHook (_pkcs11h_hooks_log, NULL)) != CKR_OK) {
+               fatal ("pkcs11h_setLogHook failed", rv);
+       }
+
+       pkcs11h_setLogLevel (TEST_LOG_LEVEL);
+
+       printf ("Sanity\n");
+
+       _deserialize("manufacturer/model/serial/label/02", TRUE);
+
+       _deserialize("manufacturer/model/serial/label/0z", FALSE);
+
+       _deserialize("manufa\\xggcturer/model/serial/label/02", FALSE);
+
+       printf ("Components\n");
+
+       const char *failure_string = "manu\\xff/model/serial/label\xee/0";
+       char buffer[1024];
+
+       for (i = 0; i < strlen(failure_string); i++) {
+               strcpy(buffer, failure_string);
+               buffer[i] = '\0';
+               _deserialize(buffer, FALSE);
+       }
+
+       printf ("Terminating pkcs11-helper\n");
+
+       if ((rv = pkcs11h_terminate ()) != CKR_OK) {
+               fatal ("pkcs11h_terminate failed", rv);
+       }
+
+       exit (0);
+       return 0;
+}

Reply via email to