[pkg-opensc-commit] [libp11] 55/86: libpkcs11.so renamed to pkcs11.so; closes #68

Eric Dorland eric at moszumanska.debian.org
Sun Jul 24 21:40:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit bfa6ad82f5438e00d1c1ab40a1d9bcc890da0870
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Mon Feb 29 13:03:39 2016 +0100

    libpkcs11.so renamed to pkcs11.so; closes #68
---
 src/Makefile.am            | 18 ++++++++++++------
 src/eng_front.c            |  2 +-
 tests/rsa-evp-sign.softhsm |  2 +-
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index e1ace15..7c2bbbb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@ EXTRA_DIST = Makefile.mak libp11.rc.in pkcs11.rc.in
 noinst_HEADERS= libp11-int.h pkcs11.h atfork.h
 include_HEADERS= libp11.h
 lib_LTLIBRARIES = libp11.la
-engines_LTLIBRARIES = libpkcs11.la
+engines_LTLIBRARIES = pkcs11.la
 pkgconfig_DATA = libp11.pc
 
 libp11_la_SOURCES = libpkcs11.c p11_attr.c p11_cert.c p11_err.c p11_key.c \
@@ -23,17 +23,23 @@ libp11_la_LDFLAGS = $(AM_LDFLAGS) \
 	-version-info @LIBP11_LT_CURRENT@:@LIBP11_LT_REVISION@:@LIBP11_LT_AGE@ \
 	-export-symbols "$(srcdir)/libp11.exports"
 
-libpkcs11_la_SOURCES = eng_front.c eng_back.c eng_parse.c engine.h pkcs11.exports
+pkcs11_la_SOURCES = eng_front.c eng_back.c eng_parse.c engine.h pkcs11.exports
 if WIN32
-libpkcs11_la_SOURCES += pkcs11.rc
+pkcs11_la_SOURCES += pkcs11.rc
 else
 dist_noinst_DATA += pkcs11.rc
 endif
-libpkcs11_la_CFLAGS = $(AM_CFLAGS) $(OPENSSL_EXTRA_CFLAGS) $(OPENSSL_CFLAGS)
-libpkcs11_la_LIBADD = libp11.la $(OPENSSL_LIBS)
-libpkcs11_la_LDFLAGS = $(AM_LDFLAGS) -shared -avoid-version \
+pkcs11_la_CFLAGS = $(AM_CFLAGS) $(OPENSSL_EXTRA_CFLAGS) $(OPENSSL_CFLAGS)
+pkcs11_la_LIBADD = libp11.la $(OPENSSL_LIBS)
+pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -shared -avoid-version \
 	-export-symbols "$(srcdir)/pkcs11.exports"
 
+# OpenSSL older than 1.1.0 expected libpkcs11.so instead of pkcs11.so
+all-local:
+	cd .libs && $(LN_S) -f pkcs11.so libpkcs11.so
+install-exec-hook:
+	cd '$(DESTDIR)$(enginesdir)' && $(LN_S) -f pkcs11.so libpkcs11.so
+
 if WIN32
 # def file required for MS users to build library
 mylibdir=$(libdir)
diff --git a/src/eng_front.c b/src/eng_front.c
index a52af8e..fe515eb 100644
--- a/src/eng_front.c
+++ b/src/eng_front.c
@@ -119,7 +119,7 @@ static ENGINE_CTX *get_ctx(ENGINE *engine)
 	ENGINE_CTX *ctx;
 
 	if (pkcs11_idx < 0) {
-		pkcs11_idx = ENGINE_get_ex_new_index(0, "libpkcs11", NULL, NULL, 0);
+		pkcs11_idx = ENGINE_get_ex_new_index(0, "pkcs11", NULL, NULL, 0);
 		if (pkcs11_idx < 0)
 			return NULL;
 		ctx = NULL;
diff --git a/tests/rsa-evp-sign.softhsm b/tests/rsa-evp-sign.softhsm
index 6efacec..2455a8f 100755
--- a/tests/rsa-evp-sign.softhsm
+++ b/tests/rsa-evp-sign.softhsm
@@ -22,7 +22,7 @@ outdir="output.$$"
 
 # This uses the engine for basic sign-verify operation.
 
-sed -e "s|@MODULE_PATH@|${ADDITIONAL_PARAM}|g" -e "s|@ENGINE_PATH@|../src/.libs/libpkcs11.so|g" <"${srcdir}/engines.cnf.in" >"${outdir}/engines.cnf"
+sed -e "s|@MODULE_PATH@|${ADDITIONAL_PARAM}|g" -e "s|@ENGINE_PATH@|../src/.libs/pkcs11.so|g" <"${srcdir}/engines.cnf.in" >"${outdir}/engines.cnf"
 
 export OPENSSL_ENGINES="../src/.libs/"
 PRIVATE_KEY="pkcs11:token=libp11-test;id=%00%01%02%03;object=server-key;type=private;pin-value=1234"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list