Files
packages/utils/opensc/Makefile
Daniel Golle 49eb8e86b9 opensc: update to version 0.25.1
* New in 0.25.1; 2024-04-05
** General improvements
* Add missing file to dist tarball to build documentation (#3063)

** minidriver
* Fix RSA decryption with PKCS#1 v1.5 padding (#3077)
* Fix crash when app is not set (#3084)

* New in 0.25.0; 2024-03-06
** Security
* [CVE-2023-5992](https://github.com/OpenSC/OpenSC/wiki/CVE-2023-5992): Side-channel leaks while stripping encryption PKCS#1.5 padding in OpenSC (#2948)
* [CVE-2024-1454](https://github.com/OpenSC/OpenSC/wiki/CVE-2024-1454): Potential use-after-free in AuthentIC driver during card enrollment in pkcs15init (#2962)

** General improvements
* Update OpenSSL 1.1.1 to 3.0 in MacOS build (#2930)
* Remove support for old card drivers Akis, GPK, Incrypto34 and Westcos, disable Cyberflex driver (#2885)
* Fix 64b to 32b conversions (#2993)
* Improvements for the p11test (#2991)
* Fix reader initialization without SCardControl (#3007)
* Make RSA PKCS#1 v1.5 depadding constant-time (#2948)
* Add option for disabling PKCS#1 v1.5 depadding (type 01 and 02) on the card (#2975)
* Enable MSI signing via Signpath CI integration for Windows (#2799)
* Fixed various issues reported by OSS-Fuzz and Coverity in drivers, PKCS#11 and PKCS#15 layer

** minidriver
* Fix wrong hash selection (#2932)

** pkcs11-tool
* Simplify printing EC keys parameters (#2960)
* Add option to import GENERIC key (#2955)
* Add support for importing Ed25518/448 keys (#2985)
** drust-tool
* Add tool for D-Trust cards (#3026, #3051)
** IDPrime
* Support uncompressed certificates on IDPrime 940 (#2958)
* Enhance IDPrime logging (#3003)
* Add SafeNet 5110+ FIPS token support (#3048)
** D-Trust Signature Cards
* Add support for RSA D-Trust Signature Card 4.1 and 4.4 (#2943)
** EstEID
* Remove expired EstEID 3.* card support (#2950)
** ePass2003
* Allow SW implementation with more SHA2 hashes and ECDSA (#3012)
* Fix EC key generation (#3045)
** SmartCard-HSM
* Fix SELECT APDU command (#2978)
** MyEID
* Update for PKCS#15 profile (#2965)
** Rutoken
* Support for RSA 4096 key algorithm (#3011)
** OpenPGP

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-23 11:10:41 -07:00

235 lines
5.9 KiB
Makefile

#
# Copyright (C) 2011-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=opensc
PKG_VERSION:=0.25.1
PKG_RELEASE:=1
PKG_HASH:=23cbaae8bd7c8eb589b68c0a961dfb0d02007bea3165a3fc5efe2621d549b37b
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:opensc_project:opensc
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_SOURCE_URL:=https://github.com/OpenSC/OpenSC/releases/download/$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DEPENDS:=pcsc-lite
PKG_FIXUP:=libtool
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libopensc
SECTION:=libs
CATEGORY:=Libraries
TITLE:=OpenSC libraries for smart cards
URL:=https://github.com/OpenSC/OpenSC/wiki
DEPENDS:=+libopenssl +libpthread +zlib
MENU:=1
endef
define Package/libopensc/description
OpenSC provides a set of libraries and utilities to work with smart cards.
Its main focus is on cards that support cryptographic operations, and
facilitate their use in security applications such as authentication,
mail encryption and digital signatures.
endef
define Package/libopensc-pkcs11
SECTION:=libs
CATEGORY:=Libraries
TITLE:=OpenSC - PKCS11 provider
URL:=https://github.com/OpenSC/OpenSC/wiki
DEPENDS:=libopensc
endef
define Package/libopensc-pkcs11/description
OpenSC PKCS#11 provider
endef
define Package/libpkcs11-spy
SECTION:=libs
CATEGORY:=Libraries
TITLE:=PKCS11 spying wrapper
URL:=https://github.com/OpenSC/OpenSC/wiki
DEPENDS:=+libopenssl +libpthread
endef
define Package/libpkcs11-spy/dscription
PKCS#11 spying wrapper
endef
define Package/opensc-utils
SECTION:=utils
CATEGORY:=Utilities
TITLE:=OpenSC - tools for smart cards
URL:=https://github.com/OpenSC/OpenSC/wiki
DEPENDS:=+libopensc
MENU:=1
endef
define Package/opensc-utils/description
OpenSC utilities
endef
define ToolGen
define Package/opensc-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))
TITLE:=$(firstword $(subst :, ,$(1))) utility from opensc
URL:=https://github.com/OpenSC/OpenSC/wiki
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=opensc-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
endef
endef
define ProfileGen
define Package/libopensc-profile-$(subst _,-,$(firstword $(subst :, ,$(1))))
TITLE:=$(firstword $(subst :, ,$(1))) card profile for opensc
URL:=https://github.com/OpenSC/OpenSC/wiki
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=libopensc
endef
endef
CONFIGURE_ARGS += \
--disable-man \
--disable-notify \
--disable-strict
TOOLS:= \
cardos-tool \
cryptoflex-tool \
dnie-tool \
dtrust-tool \
egk-tool \
eidenv \
gids-tool \
goid-tool \
iasecc-tool \
netkey-tool \
openpgp-tool \
opensc-asn1 \
opensc-explorer:+libncurses:+libreadline \
opensc-tool \
piv-tool \
pkcs11-register \
pkcs11-tool \
pkcs15-crypt \
pkcs15-init \
pkcs15-tool \
sc-hsm-tool \
westcos-tool
PROFILES:= \
asepcos \
authentic \
cardos \
cyberflex \
entersafe \
epass2003 \
flex \
gids \
ias_adele_admin1 \
ias_adele_admin2 \
ias_adele_common \
iasecc_admin_eid \
iasecc_generic_oberthur \
iasecc_generic_pki \
iasecc \
isoApplet \
muscle \
myeid \
oberthur \
openpgp \
pkcs15 \
rutoken_ecp \
rutoken_lite \
rutoken \
sc-hsm \
setcos \
starcos
$(foreach file,$(TOOLS),$(eval $(call ToolGen,$(file))))
$(foreach file,$(PROFILES),$(eval $(call ProfileGen,$(file))))
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libopensc.{la,so}* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmm-local.{la,so}* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/opensc-pkcs11.so $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkcs11-spy.so $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkcs11
$(LN) ../pkcs11-spy.so $(1)/usr/lib/pkcs11/
$(LN) ../opensc-pkcs11.so $(1)/usr/lib/pkcs11/
$(INSTALL_DIR) $(1)/usr/share/opensc
$(CP) $(PKG_INSTALL_DIR)/usr/share/opensc/* $(1)/usr/share/opensc/
endef
define Package/libopensc/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libopensc.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmm-local.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_INSTALL_DIR)/etc/opensc.conf $(1)/etc/
endef
define Package/libopensc-pkcs11/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/opensc-pkcs11.so $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkcs11
$(LN) ../opensc-pkcs11.so $(1)/usr/lib/pkcs11/
endef
define Package/libpkcs11-spy/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkcs11-spy.so $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkcs11
$(LN) ../pkcs11-spy.so $(1)/usr/lib/pkcs11/
endef
define Package/opensc-card-profiles
$(INSTALL_DIR) $(1)/usr/share/opensc
$(CP) $(PKG_INSTALL_DIR)/usr/share/opensc/* $(1)/usr/share/opensc/
endef
define Package/opensc-utils/install
true
endef
define ToolInstall
define Package/opensc-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
$(INSTALL_DIR) $$(1)/usr/bin
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/$(firstword $(subst :, ,$(1))) \
$$(1)/usr/bin/
endef
endef
define ProfileInstall
define Package/libopensc-profile-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
$(INSTALL_DIR) $$(1)/usr/share/opensc
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/share/opensc/$(firstword $(subst :, ,$(1))).profile \
$$(1)/usr/share/opensc
endef
endef
$(foreach file,$(TOOLS),$(eval $(call ToolInstall,$(file))))
$(foreach file,$(PROFILES),$(eval $(call ProfileInstall,$(file))))
$(eval $(call BuildPackage,libopensc))
$(eval $(call BuildPackage,libopensc-pkcs11))
$(eval $(call BuildPackage,libpkcs11-spy))
$(eval $(call BuildPackage,opensc-utils))
$(foreach file,$(TOOLS),$(eval $(call BuildPackage,opensc-utils-$(subst _,-,$(firstword $(subst :, ,$(file)))))))
$(foreach file,$(PROFILES),$(eval $(call BuildPackage,libopensc-profile-$(subst _,-,$(firstword $(subst :, ,$(file)))))))