Skip to contentSkip to conversation

package/opensc: fix build issue since bump to 0.26

PATCH In review Thomas Petazzoni via buildroot 3 participants 3 messages Jan 6, 2025 – Jan 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/opensc: fix build issue since bump to 0.26

Buildroot commit 1f4b4ccde7ceb379010aeb93458792202622d64b ("package/opensc: security bump to version 0.26.0") bumped opensc from 0.24 to 0.26, and the build started failing with:

pkcs11-tool.c:7854:45: warning: implicit declaration of function 'EVP_bf_cbc'; did you mean 'EVP_sm4_cbc'? [-Wimplicit-function-declaration]

on configurations that have BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH disabled (it is not explicitly selected by this package).

Our initial fix was to simply select BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH, but when investigating when EVP_bf_cbc() started being used in OpenSC, we discovered it has been in use for a while... but in code that kept being disabled from version to version as it was broken (upstream bug
https://github.com/OpenSC/OpenSC/issues/1796), but it was apparently forgotten to be disabled again for 0.26 (the issue is still open). Therefore, we opted to continue disabling this known broken part of the code, and submit an upstream PR for that
https://github.com/OpenSC/OpenSC/pull/3303, which ultimately will clarify what is the right fix.

In the mean time, this allows to fix the build issue.

Fixes:

http://autobuild.buildroot.net/results/ca51b3e8e3ac83e2a69814caa84d9862385b956f/

---
 ...ble-wrap-unwrap-test-until-OpenSC-17.patch | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 package/opensc/0001-pkcs11-tool-disable-wrap-unwrap-test-until-OpenSC-17.patch
package/opensc/0001-pkcs11-tool-disable-wrap-unwrap-test-until-OpenSC-17.patch new file +41 -0
new file mode 100644
index 0000000000..9bf601370a
@@ -0,0 +1,41 @@
+From 768c9bfcd91206f0d85cd4757fde48e00850a014 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Mon, 6 Jan 2025 22:36:10 +0100
+Subject: [PATCH] pkcs11-tool: disable wrap/unwrap test until OpenSC#1796 is
+ resolved
+
+Similar to ab74fae4d71d1705b77b9459141987a95dcfc91e ("pkcs11-tool:
+disable wrap/unwrap test until OpenSC#1796 is resolved"), but for
+0.26, since OpenSC#1796 is still open.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Upstream: https://github.com/OpenSC/OpenSC/pull/3303
+---
+ src/tools/pkcs11-tool.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools/pkcs11-tool.c b/src/tools/pkcs11-tool.c
+index d701d76d6..871a39977 100644
+--- a/src/tools/pkcs11-tool.c
++++ b/src/tools/pkcs11-tool.c
+@@ -7681,7 +7681,7 @@ static int test_verify(CK_SESSION_HANDLE sess)
+ 	return errors;
+ }
+ 
+-#if OPENSC_VERSION_MAJOR == 0 && OPENSC_VERSION_MINOR <= 25
++#if OPENSC_VERSION_MAJOR == 0 && OPENSC_VERSION_MINOR <= 26
+ #else
+ #ifdef ENABLE_OPENSSL
+ static int wrap_unwrap(CK_SESSION_HANDLE session,
+@@ -7805,7 +7805,7 @@ static int wrap_unwrap(CK_SESSION_HANDLE session,
+  */
+ static int test_unwrap(CK_SESSION_HANDLE sess)
+ {
+-#if OPENSC_VERSION_MAJOR == 0 && OPENSC_VERSION_MINOR <= 25
++#if OPENSC_VERSION_MAJOR == 0 && OPENSC_VERSION_MINOR <= 26
+ 	/* temporarily disable test, see https://github.com/OpenSC/OpenSC/issues/1796 */
+ 	return 0;
+ #else
+-- 
+2.47.1
+
Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 22 lines · Thomas Petazzoni via buildroot

Buildroot commit 1f4b4ccde7ceb379010aeb93458792202622d64b ("package/opensc: security bump to version 0.26.0") bumped opensc from 0.24 to 0.26, and the build started failing with:

pkcs11-tool.c:7854:45: warning: implicit declaration of function 'EVP_bf_cbc'; did you mean 'EVP_sm4_cbc'? [-Wimplicit-function-declaration]

on configurations that have BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH disabled (it is not explicitly selected by this package).

Our initial fix was to simply select BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH, but when investigating when EVP_bf_cbc() started being used in OpenSC, we discovered it has been in use for a while... but in code that kept being disabled from version to version as it was broken (upstream bug
https://github.com/OpenSC/OpenSC/issues/1796), but it was apparently forgotten to be disabled again for 0.26 (the issue is still open). Therefore, we opted to continue disabling this known broken part of the code, and submit an upstream PR for that
https://github.com/OpenSC/OpenSC/pull/3303, which ultimately will clarify what is the right fix.

Quoted 8 lines

In the mean time, this allows to fix the build issue.

Fixes:

http://autobuild.buildroot.net/results/ca51b3e8e3ac83e2a69814caa84d9862385b956f/

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 22 lines · Thomas Petazzoni via buildroot

Buildroot commit 1f4b4ccde7ceb379010aeb93458792202622d64b ("package/opensc: security bump to version 0.26.0") bumped opensc from 0.24 to 0.26, and the build started failing with:

pkcs11-tool.c:7854:45: warning: implicit declaration of function 'EVP_bf_cbc'; did you mean 'EVP_sm4_cbc'? [-Wimplicit-function-declaration]

on configurations that have BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH disabled (it is not explicitly selected by this package).

Our initial fix was to simply select BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH, but when investigating when EVP_bf_cbc() started being used in OpenSC, we discovered it has been in use for a while... but in code that kept being disabled from version to version as it was broken (upstream bug
https://github.com/OpenSC/OpenSC/issues/1796), but it was apparently forgotten to be disabled again for 0.26 (the issue is still open). Therefore, we opted to continue disabling this known broken part of the code, and submit an upstream PR for that
https://github.com/OpenSC/OpenSC/pull/3303, which ultimately will clarify what is the right fix.

Quoted 7 lines

In the mean time, this allows to fix the build issue.

Fixes:

   http://autobuild.buildroot.net/results/ca51b3e8e3ac83e2a69814caa84d9862385b956f/

Committed to 2024.02.x and 2024.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot