Tuesday, June 20, 2023

security/opensc: update to 0.23.0

https://github.com/OpenSC/OpenSC/releases/tag/0.23.0

my smart card keeps working with the opensc-pkcs11.so module as tested in
firefox, chrome and qdigidoc4.

Upstream tries to find a library to link against for dlopen(3) unless
LDL_LIB is already set, so instead of patching it for systems like ours
where dlopen(3) comes from libc, pass the empty string to skip detection;
I can upstream a proper fix later.

LibreSSL macro guards needed fixing, but I'm not 100% sure I got them right.

major bump due to symbol removal.

Feedback? OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/opensc/Makefile,v
retrieving revision 1.63
diff -u -p -r1.63 Makefile
--- Makefile 5 Nov 2022 17:07:24 -0000 1.63
+++ Makefile 20 Jun 2023 10:49:04 -0000
@@ -1,10 +1,9 @@
COMMENT= set of libraries and utilities to access smart cards

-V= 0.22.0
-REVISION= 3
+V= 0.23.0
DISTNAME= opensc-${V}

-SHARED_LIBS += opensc 7.3 # 8.0
+SHARED_LIBS += opensc 8.0 # 9.0
SHARED_LIBS += smm-local 3.1

CATEGORIES= security
@@ -14,8 +13,7 @@ HOMEPAGE= https://github.com/OpenSC/Open
# LGPLv2.1+
PERMIT_PACKAGE= Yes

-WANTLIB= c crypto curses ffi gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 \
- iconv intl pcre2-8 pthread readline z
+WANTLIB= c crypto curses gio-2.0 gobject-2.0 iconv pthread readline z

MASTER_SITES= https://github.com/OpenSC/OpenSC/releases/download/${V}/

@@ -24,7 +22,8 @@ BUILD_DEPENDS= security/pcsc-lite \
textproc/docbook-xsl
RUN_DEPENDS= devel/desktop-file-utils \
security/ccid
-TEST_DEPENDS= shells/bash
+TEST_DEPENDS= security/softhsm2 \
+ shells/bash
LIB_DEPENDS= devel/glib2
LIBTOOL_FLAGS= --tag=disable-static

@@ -37,7 +36,8 @@ CONFIGURE_ARGS= --enable-static \
--disable-cryptotokenkit \
--with-pkcs11-provider=${LOCALBASE}/lib/pkcs11/opensc-pkcs11.so \
--with-xsl-stylesheetsdir=${LOCALBASE}/share/xsl/docbook
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include/PCSC"
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include/PCSC" \
+ LDL_LIBS=' '

FAKE_FLAGS= mandir="${PREFIX}/man/" \
sysconfdir="${PREFIX}/share/examples/opensc/"
Index: distinfo
===================================================================
RCS file: /cvs/ports/security/opensc/distinfo,v
retrieving revision 1.17
diff -u -p -r1.17 distinfo
--- distinfo 10 Mar 2022 14:37:15 -0000 1.17
+++ distinfo 20 Jun 2023 07:38:18 -0000
@@ -1,2 +1,2 @@
-SHA256 (opensc-0.22.0.tar.gz) = jU5TRxlevqMyvlhd9h3MRwMxwmlp5LBEfIUfsIRMcYY=
-SIZE (opensc-0.22.0.tar.gz) = 2287020
+SHA256 (opensc-0.23.0.tar.gz) = pIRKbqA6Ui7PNeSWWXFtrLa+A/fAEKGlg6rz65Fe0uA=
+SIZE (opensc-0.23.0.tar.gz) = 2366469
Index: patches/patch-configure_ac
===================================================================
RCS file: /cvs/ports/security/opensc/patches/patch-configure_ac,v
retrieving revision 1.14
diff -u -p -r1.14 patch-configure_ac
--- patches/patch-configure_ac 28 Jun 2022 10:13:51 -0000 1.14
+++ patches/patch-configure_ac 20 Jun 2023 10:38:19 -0000
@@ -1,7 +1,7 @@
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
-@@ -414,7 +414,7 @@ AC_FUNC_STAT
+@@ -427,7 +427,7 @@ AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([ \
getpass gettimeofday getline memset mkdir \
Index: patches/patch-src_libopensc_card-iasecc_c
===================================================================
RCS file: patches/patch-src_libopensc_card-iasecc_c
diff -N patches/patch-src_libopensc_card-iasecc_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_libopensc_card-iasecc_c 20 Jun 2023 10:38:44 -0000
@@ -0,0 +1,16 @@
+LibreSSL does provide an EVP_MD_CTX_md_data() accessor
+
+Index: src/libopensc/card-iasecc.c
+--- src/libopensc/card-iasecc.c.orig
++++ src/libopensc/card-iasecc.c
+@@ -45,10 +45,6 @@
+ * LibreSSL
+ */
+
+-#if defined(LIBRESSL_VERSION_NUMBER)
+-# define EVP_MD_CTX_md_data(x) (x->md_data)
+-

No comments:

Post a Comment