diff --git a/ipmitool/2020-02-13-c3939dac2c060651361fc71516806f9ab8c38901.patch b/ipmitool/2020-02-13-c3939dac2c060651361fc71516806f9ab8c38901.patch new file mode 100644 index 00000000..dae1c328 --- /dev/null +++ b/ipmitool/2020-02-13-c3939dac2c060651361fc71516806f9ab8c38901.patch @@ -0,0 +1,90 @@ +From b64f73955e22975e92ead9f3427ead30928cfbac Mon Sep 17 00:00:00 2001 +From: Juliusz Sosinowicz +Date: Tue, 4 Jun 2024 15:33:36 +0200 +Subject: [PATCH] Patch for wolfSSL + +Compile wolfSSL with: + ./configure --enable-all + make + make install + +Compile pam-ipmi with: + patch -p1 < + autoreconf -if + ./configure --with-wolfssl=/usr/local + make +--- + configure.ac | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +diff --git a/configure.ac b/configure.ac +index adf9bd7..21b9c61 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -176,6 +176,54 @@ AC_ARG_ENABLE([internal-md5], + [xenable_internal_md5=$enableval], + [xenable_internal_md5=no]) + ++AC_ARG_WITH([wolfssl], ++ [AS_HELP_STRING([--with-wolfssl=PATH],[wolfSSL prefix])], ++ [WOLFSSL_PREFIX=$withval], ++ [WOLFSSL_PREFIX="no"]) ++ ++if test "x$WOLFSSL_PREFIX" != "xno"; then ++ ++CFLAGS="$CFLAGS -I$WOLFSSL_PREFIX/include -I$WOLFSSL_PREFIX/include/wolfssl -DEXTERNAL_OPTS_OPENVPN" ++AC_SUBST(CFLAGS) ++ ++AC_CHECK_LIB([wolfssl], [wolfSSL_EVP_aes_128_cbc], ++ [if test "x$xenable_internal_md5" != "xyes"; then ++ have_crypto=yes; LIBS="$LIBS -lwolfssl" ++ fi], ++ [have_crypto=no], [-lwolfssl]) ++ ++AC_CHECK_LIB([wolfssl], [wolfSSL_EVP_sha256], ++ [if test "x$xenable_internal_sha256" != "xyes"; then ++ if test "x$have_crypto" != "xyes"; then ++ LIBS="$LIBS -lwolfssl" ++ have_sha256=yes ++ fi ++ AC_DEFINE(HAVE_CRYPTO_SHA256, [1], [Define to 1 if wolfSSL supports SHA256.]) ++ fi], ++ [], [-lwolfssl]) ++ ++AC_CHECK_LIB([wolfssl], [wolfSSL_MD5_Init], ++ [if test "x$xenable_internal_md5" != "xyes"; then ++ if test "x$have_crypto" != "xyes"; then ++ LIBS="$LIBS -lwolfssl" ++ have_md5=yes ++ fi ++ AC_DEFINE(HAVE_CRYPTO_MD5, [1], [Define to 1 if wolfSSL supports MD5.]) ++ fi], ++ [], [-lwolfssl]) ++ ++AC_CHECK_LIB([wolfssl], [wolfSSL_MD2_Init], ++ [if test "x$xenable_internal_md5" != "xyes"; then ++ if test "x$have_crypto" != "xyes" && test "x$have_md5" != "xyes"; then ++ LIBS="$LIBS -lwolfssl" ++ have_md2=yes ++ fi ++ AC_DEFINE(HAVE_CRYPTO_MD2, [1], [Define to 1 if wolfSSL supports MD2.]) ++ fi], ++ [], [-lwolfssl]) ++ ++else dnl fallback on openssl ++ + AC_CHECK_LIB([crypto], [EVP_aes_128_cbc], + [if test "x$xenable_internal_md5" != "xyes"; then + have_crypto=yes; LIBS="$LIBS -lcrypto" +@@ -212,6 +260,8 @@ AC_CHECK_LIB([crypto], [MD2_Init], + fi], + [], [-lcrypto]) + ++fi ++ + dnl check for libsystemd in case dbus-intf is requested + AC_CHECK_LIB([systemd], [sd_bus_default], + [ +-- +2.34.1 + diff --git a/ipmitool/README b/ipmitool/README new file mode 100644 index 00000000..dd70dbe4 --- /dev/null +++ b/ipmitool/README @@ -0,0 +1,8 @@ +This folder contains patches for ipmitool to work with wolfSSL. Patches make it +easier to add support for newer versions of a target library. The format of +the patch names is: + ---.patch +The date in the patch name corresponds to the date of the commit that the +patch was implemented and tested on to make choosing the appropriate patch +easier. Instructions for applying each patch are included in the patch commit +message.