Thanks, applied as 3f65f0a2057b44a0221c1f5365517caeba1f27c0.

Michael

[sent from post-receive hook]

On Mon, 18 May 2026 09:54:00 +0200, Thorsten Scherer <[email protected]> 
wrote:
> Signed-off-by: Thorsten Scherer <[email protected]>
> Message-Id: <[email protected]>
> [mol: remove dependency in opensc]
> Signed-off-by: Michael Olbrich <[email protected]>
> 
> diff --git 
> a/patches/openct-0.6.20/0001-Handle-too-large-PC-SC-buffer-values.patch 
> b/patches/openct-0.6.20/0001-Handle-too-large-PC-SC-buffer-values.patch
> deleted file mode 100644
> index 6e8ebe92ff1d..000000000000
> --- a/patches/openct-0.6.20/0001-Handle-too-large-PC-SC-buffer-values.patch
> +++ /dev/null
> @@ -1,77 +0,0 @@
> -From: =?UTF-8?q?Marcin=20Cie=C5=9Blak?= <[email protected]>
> -Date: Sun, 15 Nov 2015 00:05:56 +0000
> -Subject: [PATCH] Handle too large PC/SC buffer values
> -
> -pcsc-lite starting from 1.8.14 provides 65548 byte
> -receive buffers to IFDHTransmitToICC(), which is
> -a maximal extended APDU size. Unfortunately this
> -is more than CT API can use (16 bits).
> -
> -If more than 65536 bytes are about to be sent,
> -return IFD_PROTOCOL_NOT_SUPPORTED.
> -
> -Receive at most 65536 bytes. pcsc-lite will always
> -specify 65548 buffer, even if the client application
> -requests less; therefore we cannot return an error
> -in this case.
> -
> -Discussion:
> -https://lists.alioth.debian.org/pipermail/pcsclite-muscle/Week-of-Mon-20151109/000493.html
> -
> -Signed-off-by: Marc Kleine-Budde <[email protected]>
> ----
> - src/pcsc/pcsc.c | 13 +++++++++++--
> - 1 file changed, 11 insertions(+), 2 deletions(-)
> -
> -diff --git a/src/pcsc/pcsc.c b/src/pcsc/pcsc.c
> -index 0ed9a619e53b..d769eb5625ec 100644
> ---- a/src/pcsc/pcsc.c
> -+++ b/src/pcsc/pcsc.c
> -@@ -25,6 +25,7 @@
> - #ifdef DEBUG_IFDH
> - #include <syslog.h>
> - #endif
> -+#include <limits.h>
> - #ifdef __APPLE__
> - #include <PCSC/wintypes.h>
> - #include <PCSC/pcsclite.h>
> -@@ -390,6 +391,10 @@ IFDHTransmitToICC(DWORD Lun, SCARD_IO_HEADER SendPci,
> -     ctn = ((unsigned short)(Lun >> 16)) % IFDH_MAX_READERS;
> -     slot = ((unsigned short)(Lun & 0x0000FFFF)) % IFDH_MAX_SLOTS;
> - 
> -+    if (TxLength > USHRT_MAX) {
> -+            (*RxLength) = 0;
> -+            return IFD_PROTOCOL_NOT_SUPPORTED;
> -+    }
> - #ifdef HAVE_PTHREAD
> -     pthread_mutex_lock(&ifdh_context_mutex[ctn]);
> - #endif
> -@@ -399,7 +404,7 @@ IFDHTransmitToICC(DWORD Lun, SCARD_IO_HEADER SendPci,
> - #endif
> -             dad = (UCHAR) ((slot == 0) ? 0x00 : slot + 1);
> -             sad = 0x02;
> --            lr = (unsigned short)(*RxLength);
> -+            lr = (*RxLength > USHRT_MAX) ? USHRT_MAX : (unsigned 
> short)(*RxLength);
> -             lc = (unsigned short)TxLength;
> - 
> -             ret = CT_data(ctn, &dad, &sad, lc, TxBuffer, &lr, RxBuffer);
> -@@ -438,6 +443,10 @@ IFDHControl(DWORD Lun, PUCHAR TxBuffer,
> -     ctn = ((unsigned short)(Lun >> 16)) % IFDH_MAX_READERS;
> -     slot = ((unsigned short)(Lun & 0x0000FFFF)) % IFDH_MAX_SLOTS;
> - 
> -+    if (TxLength > USHRT_MAX) {
> -+            (*RxLength) = 0;
> -+            return IFD_PROTOCOL_NOT_SUPPORTED;
> -+    }
> - #ifdef HAVE_PTHREAD
> -     pthread_mutex_lock(&ifdh_context_mutex[ctn]);
> - #endif
> -@@ -447,7 +456,7 @@ IFDHControl(DWORD Lun, PUCHAR TxBuffer,
> - #endif
> -             dad = 0x01;
> -             sad = 0x02;
> --            lr = (unsigned short)(*RxLength);
> -+            lr = (*RxLength > USHRT_MAX) ? USHRT_MAX : (unsigned 
> short)(*RxLength);
> -             lc = (unsigned short)TxLength;
> - 
> -             ret = CT_data(ctn, &dad, &sad, lc, TxBuffer, &lr, RxBuffer);
> diff --git a/patches/openct-0.6.20/series b/patches/openct-0.6.20/series
> deleted file mode 100644
> index e1b5c45cfc00..000000000000
> --- a/patches/openct-0.6.20/series
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -# generated by git-ptx-patches
> -#tag:base --start-number 1
> -0001-Handle-too-large-PC-SC-buffer-values.patch
> -# 412ac4f5b443002e278d05ad793381f1  - git-ptx-patches magic
> diff --git a/rules/openct.in b/rules/openct.in
> deleted file mode 100644
> index 88e62455b44c..000000000000
> --- a/rules/openct.in
> +++ /dev/null
> @@ -1,54 +0,0 @@
> -## SECTION=staging
> -## old section:
> -### SECTION=communication
> -
> -menuconfig OPENCT
> -     tristate "openct                        "
> -     select LIBLTDL
> -     select LIBC_C
> -     select LIBC_DL
> -     select LIBC_PTHREAD     if OPENCT_PCSC
> -     select PCSC_LITE        if OPENCT_PCSC
> -     select LIBUSB           if OPENCT_USB
> -     select LIBUSB_COMPAT    if OPENCT_USB
> -     help
> -       OpenCT implements drivers for many card terminals, smart card
> -       readers, and usb crypto tokens. OpenCT can be used as CT-API or
> -       PC/SC Ifdhandler driver, but also directly.
> -
> -       STAGING: remove in PTXdist 2026.03.0
> -       Unmaintained in PTXdist, upstream dead and fails to build with
> -       current toolchains.
> -
> -if OPENCT
> -
> -config OPENCT_USB
> -     bool "USB Support"
> -     help
> -       Add USB support.
> -
> -config OPENCT_API
> -     bool "Use OpenCT API"
> -     default y
> -     help
> -       Add support for OpenCT communication.
> -
> -config OPENCT_PCSC
> -     bool "Use PCSC"
> -     default y
> -     select OPENCT_API
> -     help
> -       Use PCSC as the control daemon.
> -
> -config OPENCT_TOOLS
> -     bool "Install utilities"
> -     help
> -       Install also utilities like 'openct-tool', 'ifdhandler',
> -       'ifdproxy' and 'openct-control'.
> -
> -config OPENCT_SYSTEMD_UNIT
> -     bool "install systemd unit"
> -     depends on SYSTEMD
> -     default y
> -
> -endif
> diff --git a/rules/openct.make b/rules/openct.make
> deleted file mode 100644
> index d4f82876b2b6..000000000000
> --- a/rules/openct.make
> +++ /dev/null
> @@ -1,85 +0,0 @@
> -# -*-makefile-*-
> -#
> -# Copyright (C) 2010 by Juergen Beisert <[email protected]>
> -#               2015 by Marc Kleine-Budde <[email protected]>
> -#
> -# For further information about the PTXdist project and license conditions
> -# see the README file.
> -#
> -
> -#
> -# We provide this package
> -#
> -PACKAGES-$(PTXCONF_OPENCT) += openct
> -
> -#
> -# Paths and names
> -#
> -OPENCT_VERSION               := 0.6.20
> -OPENCT_MD5           := a1da3358ab798f1cb9232f1dbababc21
> -OPENCT                       := openct-$(OPENCT_VERSION)
> -OPENCT_SUFFIX                := tar.gz
> -OPENCT_URL           := $(call ptx/mirror, SF, 
> opensc/openct/$(OPENCT).$(OPENCT_SUFFIX))
> -OPENCT_SOURCE                := $(SRCDIR)/$(OPENCT).$(OPENCT_SUFFIX)
> -OPENCT_DIR           := $(BUILDDIR)/$(OPENCT)
> -OPENCT_BUILD_OOT     := YES
> -OPENCT_LICENSE               := LGPLv2
> -
> -# 
> ----------------------------------------------------------------------------
> -# Prepare
> -# 
> ----------------------------------------------------------------------------
> -
> -OPENCT_CONF_TOOL := autoconf
> -OPENCT_CONF_OPT := \
> -     $(CROSS_AUTOCONF_USR) \
> -     --localstatedir=/ \
> -     --$(call ptx/endis, PTXCONF_OPENCT_PCSC)-pcsc \
> -     --$(call ptx/endis, PTXCONF_OPENCT_USB)-usb \
> -     --disable-debug \
> -     --disable-sunray \
> -     --disable-sunrayclient \
> -     --enable-shared \
> -     --disable-static \
> -     --with-bundle=/usr/lib/pcsc
> -
> -
> -# 
> ----------------------------------------------------------------------------
> -# Target-Install
> -# 
> ----------------------------------------------------------------------------
> -
> -$(STATEDIR)/openct.targetinstall:
> -     @$(call targetinfo)
> -
> -     @$(call install_init,  openct)
> -     @$(call install_fixup, openct,PRIORITY,optional)
> -     @$(call install_fixup, openct,SECTION,base)
> -     @$(call install_fixup, openct,AUTHOR,"Juergen Beisert 
> <[email protected]>")
> -     @$(call install_fixup, openct,DESCRIPTION, "SmartCard environment")
> -
> -     @$(call install_lib, openct, 0, 0, 0644, libopenct)
> -     @$(call install_copy, openct, 0, 0, 0755, -, /usr/sbin/ifdhandler)
> -     @$(call install_copy, openct, 0, 0, 0755, -, /usr/sbin/openct-control)
> -
> -ifdef PTXCONF_OPENCT_PCSC
> -     @$(call install_lib, openct, 0, 0, 0644, openct-ifd)
> -endif
> -ifdef PTXCONF_OPENCT_API
> -     @$(call install_lib, openct, 0, 0, 0644, libopenctapi)
> -endif
> -ifdef PTXCONF_OPENCT_TOOLS
> -     @$(call install_copy, openct, 0, 0, 0755, -, /usr/bin/openct-tool)
> -     @$(call install_copy, openct, 0, 0, 0755, -, /usr/sbin/ifdproxy)
> -endif
> -     @$(call install_alternative, openct, 0, 0, 0644, /etc/openct.conf)
> -
> -ifdef PTXCONF_OPENCT_SYSTEMD_UNIT
> -     @$(call install_alternative, openct, 0, 0, 0644, 
> /usr/lib/systemd/system/openct.service)
> -     @$(call install_link, openct, ../openct.service, \
> -             /usr/lib/systemd/system/multi-user.target.wants/openct.service)
> -     @$(call install_alternative, openct, 0, 0, 0644, 
> /usr/lib/tmpfiles.d/openct.conf)
> -endif
> -
> -     @$(call install_finish, openct)
> -     @$(call touch)
> -
> -# vim: syntax=make
> diff --git a/rules/opensc.in b/rules/opensc.in
> index f48c6a07ee76..4b45cf1d8ab6 100644
> --- a/rules/opensc.in
> +++ b/rules/opensc.in
> @@ -4,7 +4,6 @@ menuconfig OPENSC
>       tristate "opensc                        "
>       select ZLIB
>       select READLINE         if OPENSC_READLINE
> -     select OPENCT           if OPENSC_OPENCT
>       select PCSC_LITE        if OPENSC_PCSC
>       select OPENSSL          if OPENSC_OPENSSL
>       select CMOCKA           if OPENSC_TESTSUITE
> @@ -25,6 +24,8 @@ choice
>       default OPENSC_PCSC
>  
>       config OPENSC_OPENCT
> +             # needs openct
> +             depends on BROKEN
>               bool "openct"
>  
>       config OPENSC_PCSC

Reply via email to