From f675efc237f89843883318a1b59cefe58ede6068 Mon Sep 17 00:00:00 2001 From: Michael Adler Date: Wed, 13 Nov 2024 11:01:43 +0100 Subject: [PATCH] opensc: 0.25.1 -> 0.26.0 Note: This also contains a patch to keep support for MICARDO cards. (cherry picked from commit 2c2e671e7b1a80a38b69477ea0d984250fe0a215) --- ...Revert-Desctivate-driver-for-MICARDO.patch | 33 +++++++++++++++++++ pkgs/tools/security/opensc/default.nix | 8 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/security/opensc/0001-Revert-Desctivate-driver-for-MICARDO.patch diff --git a/pkgs/tools/security/opensc/0001-Revert-Desctivate-driver-for-MICARDO.patch b/pkgs/tools/security/opensc/0001-Revert-Desctivate-driver-for-MICARDO.patch new file mode 100644 index 0000000000000..8318a7b83e6b0 --- /dev/null +++ b/pkgs/tools/security/opensc/0001-Revert-Desctivate-driver-for-MICARDO.patch @@ -0,0 +1,33 @@ +From 6b576118c02241c7e366696be2f16850460fac35 Mon Sep 17 00:00:00 2001 +From: Michael Adler +Date: Wed, 27 Nov 2024 09:23:04 +0100 +Subject: [PATCH] Revert "Desctivate driver for MICARDO" + +This reverts commit 13951f633b5f1df14d5c49310cd397a42a467f36. +--- + src/libopensc/ctx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libopensc/ctx.c b/src/libopensc/ctx.c +index 6fbab389c..2316209ee 100644 +--- a/src/libopensc/ctx.c ++++ b/src/libopensc/ctx.c +@@ -148,6 +148,7 @@ static const struct _sc_driver_entry internal_card_drivers[] = { + * put the muscle driver first to cope with this bug. */ + { "muscle", (void *(*)(void)) sc_get_muscle_driver }, + { "sc-hsm", (void *(*)(void)) sc_get_sc_hsm_driver }, ++ { "mcrd", (void *(*)(void)) sc_get_mcrd_driver }, + { "setcos", (void *(*)(void)) sc_get_setcos_driver }, + { "PIV-II", (void *(*)(void)) sc_get_piv_driver }, + { "cac", (void *(*)(void)) sc_get_cac_driver }, +@@ -175,7 +176,6 @@ static const struct _sc_driver_entry old_card_drivers[] = { + { "atrust-acos",(void *(*)(void)) sc_get_atrust_acos_driver }, + { "cyberflex", (void *(*)(void)) sc_get_cyberflex_driver }, + { "flex", (void *(*)(void)) sc_get_cryptoflex_driver }, +- { "mcrd", (void *(*)(void)) sc_get_mcrd_driver }, + { NULL, NULL } + }; + // clang-format on +-- +2.47.1 + diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix index 8d8246028f7c3..017b78da5cfcb 100644 --- a/pkgs/tools/security/opensc/default.nix +++ b/pkgs/tools/security/opensc/default.nix @@ -8,15 +8,19 @@ stdenv.mkDerivation rec { pname = "opensc"; - version = "0.25.1"; + version = "0.26.0"; src = fetchFromGitHub { owner = "OpenSC"; repo = "OpenSC"; rev = version; - sha256 = "sha256-Ktvp/9Hca87qWmDlQhFzvWsr7TvNpIAvOFS+4zTZbB8="; + sha256 = "sha256-EIQ9YpIGwckg/JjpK0S2ZYdFf/0YC4KaWcLXRNRMuzA="; }; + patches = [ + ./0001-Revert-Desctivate-driver-for-MICARDO.patch + ]; + nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ zlib readline openssl libassuan