Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (db0ca84bc5bd6bcf2b4373145d4bb8d61beb858f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (db0ca84bc5bd6bcf2b4373145d4bb8d61beb858f)
  • Date: Tue, 15 Aug 2023 18:34:09 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

crypto/opensc/HISTORY
| 7 -
crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.5.0.patch
| 55 ++++++++++
crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.7.0.patch
| 28 -----
crypto/opensc/patches/0002-fixed-compatibility-with-LibreSSL-3.7.0.patch
| 28 +++++
crypto/opensc/patches/0003-LibreSSL-does-provide-EVP_sha3_-after-3.7.3.patch
| 36 ++++++
crypto/opensc/patches/0004-fixed-detection-of-SHA3-compatibility.patch
| 30 +++++
6 files changed, 154 insertions(+), 30 deletions(-)

New commits:
commit db0ca84bc5bd6bcf2b4373145d4bb8d61beb858f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

opensc: Fix build against LibreSSL 3.8.0

diff --git a/crypto/opensc/HISTORY b/crypto/opensc/HISTORY
index e87e96b..6954a8f 100644
--- a/crypto/opensc/HISTORY
+++ b/crypto/opensc/HISTORY
@@ -1,6 +1,9 @@
2023-08-15 Ismael Luceno <ismael AT sourcemage.org>
- * PRE_BUILD, 0001-fixed-compatibility-with-LibreSSL-3.7.0.patch:
- fixed build against libressl 3.7+
+ * PRE_BUILD, 0001-fixed-compatibility-with-LibreSSL-3.5.0.patch,
+ 0002-fixed-compatibility-with-LibreSSL-3.7.0.patch,
+ 0003-LibreSSL-does-provide-EVP_sha3_-after-3.7.3.patch,
+ 0004-fixed-detection-of-SHA3-compatibility.patch:
+ fixed build against libressl 3.5.0+; up to 3.8.0

2023-08-01 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 0.23.0
diff --git
a/crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.5.0.patch
b/crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.5.0.patch
new file mode 100644
index 0000000..6ca6d4c
--- /dev/null
+++ b/crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.5.0.patch
@@ -0,0 +1,55 @@
+From da01e5fab9be9865db1aac203e574e0edbfd6584 Mon Sep 17 00:00:00 2001
+From: Frank Morgner <frankmorgner AT gmail.com>
+Date: Wed, 14 Dec 2022 09:31:29 +0100
+Subject: [PATCH 1/4] fixed compatibility with LibreSSL >= 3.5.0
+
+Origin: Upstream
+Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/issues/2664]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/libopensc/card-iasecc.c | 12 +-----------
+ src/libopensc/sc-ossl-compat.h | 1 +
+ 2 files changed, 2 insertions(+), 11 deletions(-)
+
+diff --git a/src/libopensc/card-iasecc.c b/src/libopensc/card-iasecc.c
+index 480c1cf87ba7..1347ed23931c 100644
+--- a/src/libopensc/card-iasecc.c
++++ b/src/libopensc/card-iasecc.c
+@@ -38,21 +38,11 @@
+ #include <openssl/pkcs12.h>
+ #include <openssl/x509v3.h>
+
+-/*
+- * OpenSSL-3.0.0 does not allow access to the SHA data
+- * so this driver can not produces signatures
+- * OpenSSL 1.1.1 uses EVP_MD_CTX_md_data
+- * LibreSSL
+- */
+-
+-#if defined(LIBRESSL_VERSION_NUMBER)
+-# define EVP_MD_CTX_md_data(x) (x->md_data)
+-#endif
+-
+ #include "internal.h"
+ #include "asn1.h"
+ #include "cardctl.h"
+ #include "opensc.h"
++#include "sc-ossl-compat.h"
+ /* #include "sm.h" */
+ #include "pkcs15.h"
+ /* #include "hash-strings.h" */
+diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h
+index da53ca8ceebd..8c0f96701ce7 100644
+--- a/src/libopensc/sc-ossl-compat.h
++++ b/src/libopensc/sc-ossl-compat.h
+@@ -42,6 +42,7 @@ extern "C" {
+ #define X509_get_extension_flags(x) (x->ex_flags)
+ #define X509_get_key_usage(x) (x->ex_kusage)
+ #define X509_get_extended_key_usage(x) (x->ex_xkusage)
++#define EVP_MD_CTX_md_data(x) (x->md_data)
+ #endif
+
+ #if defined(LIBRESSL_VERSION_NUMBER)
+--
+2.41.0
+
diff --git
a/crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.7.0.patch
b/crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.7.0.patch
deleted file mode 100644
index f192cc1..0000000
--- a/crypto/opensc/patches/0001-fixed-compatibility-with-LibreSSL-3.7.0.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8d80c2b7902445399f011b3f430095c74da0e39f Mon Sep 17 00:00:00 2001
-From: Frank Morgner <frankmorgner AT gmail.com>
-Date: Fri, 16 Dec 2022 11:56:28 +0100
-Subject: [PATCH] fixed compatibility with LibreSSL 3.7.0
-
-Origin: Upstream
-Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/pull/2665/]
-Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
----
- src/libopensc/sc-ossl-compat.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h
-index 8c0f96701c..4425da93f3 100644
---- a/src/libopensc/sc-ossl-compat.h
-+++ b/src/libopensc/sc-ossl-compat.h
-@@ -54,9 +54,11 @@ extern "C" {
- #define EVP_sha3_256() (NULL)
- #define EVP_sha3_384() (NULL)
- #define EVP_sha3_512() (NULL)
-+#if LIBRESSL_VERSION_NUMBER < 0x3070000fL
- #define EVP_PKEY_new_raw_public_key(t, e, p, l) (NULL)
- #define EVP_PKEY_get_raw_public_key(p, pu, l) (0)
- #endif
-+#endif
-
- /* OpenSSL 1.1.1 has FIPS_mode function */
- #if OPENSSL_VERSION_NUMBER >= 0x30000000L
diff --git
a/crypto/opensc/patches/0002-fixed-compatibility-with-LibreSSL-3.7.0.patch
b/crypto/opensc/patches/0002-fixed-compatibility-with-LibreSSL-3.7.0.patch
new file mode 100644
index 0000000..dd73002
--- /dev/null
+++ b/crypto/opensc/patches/0002-fixed-compatibility-with-LibreSSL-3.7.0.patch
@@ -0,0 +1,28 @@
+From 8d80c2b7902445399f011b3f430095c74da0e39f Mon Sep 17 00:00:00 2001
+From: Frank Morgner <frankmorgner AT gmail.com>
+Date: Fri, 16 Dec 2022 11:56:28 +0100
+Subject: [PATCH 2/4] fixed compatibility with LibreSSL 3.7.0
+
+Origin: Upstream
+Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/pull/2665/]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/libopensc/sc-ossl-compat.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h
+index 8c0f96701c..4425da93f3 100644
+--- a/src/libopensc/sc-ossl-compat.h
++++ b/src/libopensc/sc-ossl-compat.h
+@@ -53,9 +53,11 @@ extern "C" {
+ #define EVP_sha3_256() (NULL)
+ #define EVP_sha3_384() (NULL)
+ #define EVP_sha3_512() (NULL)
++#if LIBRESSL_VERSION_NUMBER < 0x3070000fL
+ #define EVP_PKEY_new_raw_public_key(t, e, p, l) (NULL)
+ #define EVP_PKEY_get_raw_public_key(p, pu, l) (0)
+ #endif
++#endif
+
+ /* OpenSSL 1.1.1 has FIPS_mode function */
+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
diff --git
a/crypto/opensc/patches/0003-LibreSSL-does-provide-EVP_sha3_-after-3.7.3.patch

b/crypto/opensc/patches/0003-LibreSSL-does-provide-EVP_sha3_-after-3.7.3.patch
new file mode 100644
index 0000000..1afc776
--- /dev/null
+++
b/crypto/opensc/patches/0003-LibreSSL-does-provide-EVP_sha3_-after-3.7.3.patch
@@ -0,0 +1,36 @@
+From e015242590ad9131e124232cc5a2fd02d525ef2c Mon Sep 17 00:00:00 2001
+From: Klemens Nanni <kn AT openbsd.org>
+Date: Thu, 29 Jun 2023 02:41:43 +0300
+Subject: [PATCH 3/4] LibreSSL does provide EVP_sha3_*() after 3.7.3
+
+Support was added in 16.04.2023.
+
+Compile- and run-tested on OpenBSD/amd64 7.3-current.
+
+Origin: Upstream
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/libopensc/sc-ossl-compat.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h
+index df0cebbce2f6..8012cd4c0fa4 100644
+--- a/src/libopensc/sc-ossl-compat.h
++++ b/src/libopensc/sc-ossl-compat.h
+@@ -50,10 +50,12 @@ extern "C" {
+ #if LIBRESSL_VERSION_NUMBER < 0x30500000L
+ #define FIPS_mode() (0)
+ #endif
++#ifndef EVP_sha3_224
+ #define EVP_sha3_224() (NULL)
+ #define EVP_sha3_256() (NULL)
+ #define EVP_sha3_384() (NULL)
+ #define EVP_sha3_512() (NULL)
++#endif
+ #if LIBRESSL_VERSION_NUMBER < 0x3070000fL
+ #define EVP_PKEY_new_raw_public_key(t, e, p, l) (NULL)
+ #define EVP_PKEY_get_raw_public_key(p, pu, l) (0)
+--
+2.41.0
+
diff --git
a/crypto/opensc/patches/0004-fixed-detection-of-SHA3-compatibility.patch
b/crypto/opensc/patches/0004-fixed-detection-of-SHA3-compatibility.patch
new file mode 100644
index 0000000..e679763
--- /dev/null
+++ b/crypto/opensc/patches/0004-fixed-detection-of-SHA3-compatibility.patch
@@ -0,0 +1,30 @@
+From 89f07eb90f9570f1e5022bd1b5f8426e9fea695a Mon Sep 17 00:00:00 2001
+From: Frank Morgner <frankmorgner AT gmail.com>
+Date: Tue, 15 Aug 2023 17:58:21 +0200
+Subject: [PATCH 4/4] fixed detection of SHA3 compatibility
+
+Fixes: https://github.com/OpenSC/OpenSC/issues/2836
+Origin: Upstream
+Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/pull/2837]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/libopensc/sc-ossl-compat.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/libopensc/sc-ossl-compat.h b/src/libopensc/sc-ossl-compat.h
+index 8012cd4c0fa4..96ec4bd7360d 100644
+--- a/src/libopensc/sc-ossl-compat.h
++++ b/src/libopensc/sc-ossl-compat.h
+@@ -50,7 +50,8 @@ extern "C" {
+ #if LIBRESSL_VERSION_NUMBER < 0x30500000L
+ #define FIPS_mode() (0)
+ #endif
+-#ifndef EVP_sha3_224
++/* OpenSSL 1.1.1 has EVP_sha3_* */
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <
0x30800000L
+ #define EVP_sha3_224() (NULL)
+ #define EVP_sha3_256() (NULL)
+ #define EVP_sha3_384() (NULL)
+--
+2.41.0
+



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (db0ca84bc5bd6bcf2b4373145d4bb8d61beb858f), Ismael Luceno, 08/15/2023

Archive powered by MHonArc 2.6.24.

Top of Page