aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2020-02-11 02:42:38 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2020-02-11 02:42:38 -0500
commit2ff8ac9aa22e3b58964ddf8e37db4100d45a6f77 (patch)
tree5f464912a16bd8f6a71dff5a61acef1a70e0eebf
parent006ab9607836d93c7a7e19e67c0896c3c12632ee (diff)
downloadhopm-2ff8ac9aa22e3b58964ddf8e37db4100d45a6f77.tar.bz2
hopm-2ff8ac9aa22e3b58964ddf8e37db4100d45a6f77.tar.xz
hopm-2ff8ac9aa22e3b58964ddf8e37db4100d45a6f77.tar.zst
d/p/build-with-wolfssl.patch: Allow the use of WolfSSL's OpenSSL compat layer.
-rw-r--r--debian/patches/build-with-wolfssl.patch51
-rw-r--r--debian/patches/series1
2 files changed, 52 insertions, 0 deletions
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 <unit193@ubuntu.com>
+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 <stdlib.h>
+ #include <poll.h>
+ #ifdef HAVE_LIBCRYPTO
++#ifdef HAVE_WOLFSSL
++#include <wolfssl/options.h>
++#include <wolfssl/ssl.h>
++#include <wolfssl/openssl/ssl.h>
++#else
+ #include <openssl/ssl.h>
++#endif
+ #endif
+
+ #include "config.h"
+--- a/src/libopm/src/proxy.c
++++ b/src/libopm/src/proxy.c
+@@ -26,7 +26,13 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #ifdef HAVE_LIBCRYPTO
++#ifdef HAVE_WOLFSSL
++#include <wolfssl/options.h>
++#include <wolfssl/ssl.h>
++#include <wolfssl/openssl/ssl.h>
++#else
+ #include <openssl/ssl.h>
++#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