From 2ff8ac9aa22e3b58964ddf8e37db4100d45a6f77 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 11 Feb 2020 02:42:38 -0500 Subject: d/p/build-with-wolfssl.patch: Allow the use of WolfSSL's OpenSSL compat layer. --- debian/patches/build-with-wolfssl.patch | 51 +++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 52 insertions(+) create mode 100644 debian/patches/build-with-wolfssl.patch create mode 100644 debian/patches/series diff --git a/debian/patches/build-with-wolfssl.patch b/debian/patches/build-with-wolfssl.patch new file mode 100644 index 0000000..6e80cad --- /dev/null +++ b/debian/patches/build-with-wolfssl.patch @@ -0,0 +1,51 @@ +Description: Allow the use of WolfSSL's OpenSSL compat layer. +Author: Unit 193 +Last-Update: 2019-09-14 + +--- a/configure.ac ++++ b/configure.ac +@@ -33,6 +33,12 @@ AX_ARG_ENABLE_ASSERT + AX_ARG_ENABLE_WARNINGS + AX_ARG_ENABLE_EFENCE + ++AC_CHECK_HEADERS([wolfssl/openssl/ssl.h],[ ++ AC_SEARCH_LIBS([wolfSSL_CTX_new], [wolfssl]) ++ AC_DEFINE([HAVE_LIBCRYPTO],[1]) ++ AC_DEFINE([HAVE_WOLFSSL], 1, [Define if you have WolfSSL.]) ++ AC_MSG_NOTICE([Falling back to WolfSSL])]) ++ + AC_CHECK_FUNCS(strlcpy strlcat) + + AC_CONFIG_FILES(Makefile doc/Makefile src/Makefile src/libopm/Makefile src/libopm/src/Makefile) +--- a/src/libopm/src/libopm.c ++++ b/src/libopm/src/libopm.c +@@ -31,7 +31,13 @@ + #include + #include + #ifdef HAVE_LIBCRYPTO ++#ifdef HAVE_WOLFSSL ++#include ++#include ++#include ++#else + #include ++#endif + #endif + + #include "config.h" +--- a/src/libopm/src/proxy.c ++++ b/src/libopm/src/proxy.c +@@ -26,7 +26,13 @@ + #include + #include + #ifdef HAVE_LIBCRYPTO ++#ifdef HAVE_WOLFSSL ++#include ++#include ++#include ++#else + #include ++#endif + #endif + + #include "config.h" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..c493120 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +build-with-wolfssl.patch -- cgit v1.2.3