summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--groups/241.native_packages_inet.group5
-rw-r--r--patches/icecast-2.4.4.local.patch84
2 files changed, 87 insertions, 2 deletions
diff --git a/groups/241.native_packages_inet.group b/groups/241.native_packages_inet.group
index 5af722cd..5aa635e3 100644
--- a/groups/241.native_packages_inet.group
+++ b/groups/241.native_packages_inet.group
@@ -75,12 +75,13 @@ pacman proxytunnel rsync socat thttpd w3m weechat wget whois")";
: ${PKG_HTTPD_CONFIGURE_ARGS_EXTRA:="--with-pcre=${PREFIX_NATIVE}/bin/pcre-config --with-apr=${PREFIX_NATIVE}/bin/${DEFAULT_TARGET}-apr-1-config --with-apr-util=${PREFIX_NATIVE}/bin/apu-1-config"};
: ${PKG_HTTPD_ENV_VARS_EXTRA:="PCRE_LIBS=-L${PREFIX_NATIVE}/lib -lpcre"};
: ${PKG_HTTPD_DISABLED:=1};
-: ${PKG_ICECAST_DEPENDS:="curl expat libressl libvorbis libxml2 libxslt"};
+: ${PKG_ICECAST_DEPENDS:="curl expat libvorbis libxml2 libxslt wolfssl"};
: ${PKG_ICECAST_SHA256SUM:=49b5979f9f614140b6a38046154203ee28218d8fc549888596a683ad604e4d44};
: ${PKG_ICECAST_VERSION:=2.4.4};
: ${PKG_ICECAST_URL:=http://downloads.xiph.org/releases/icecast/icecast-${PKG_ICECAST_VERSION}.tar.gz};
: ${PKG_ICECAST_CFLAGS_CONFIGURE_EXTRA:="-I${PREFIX_NATIVE}/include/libxml2"};
-: ${PKG_ICECAST_CONFIGURE_ARGS_EXTRA:="--with-curl=${PREFIX_NATIVE} --with-ogg=${PREFIX_NATIVE} --with-openssl=${PREFIX_NATIVE} --with-theora=${PREFIX_NATIVE} --with-vorbis=${PREFIX_NATIVE} --with-xslt-config=${PREFIX}/bin/xslt-config --without-speex"};
+: ${PKG_ICECAST_LDFLAGS_CONFIGURE_EXTRA:="-lwolfssl"};
+: ${PKG_ICECAST_CONFIGURE_ARGS_EXTRA:="--with-curl=${PREFIX_NATIVE} --with-ogg=${PREFIX_NATIVE} --with-theora=${PREFIX_NATIVE} --with-vorbis=${PREFIX_NATIVE} --with-xslt-config=${PREFIX}/bin/xslt-config --without-speex"};
: ${PKG_INETUTILS_DEPENDS:="ncurses"};
: ${PKG_INETUTILS_SHA256SUM:=849d96f136effdef69548a940e3e0ec0624fc0c81265296987986a0dd36ded37};
: ${PKG_INETUTILS_VERSION:=1.9.4};
diff --git a/patches/icecast-2.4.4.local.patch b/patches/icecast-2.4.4.local.patch
new file mode 100644
index 00000000..7e7ce8a0
--- /dev/null
+++ b/patches/icecast-2.4.4.local.patch
@@ -0,0 +1,84 @@
+diff -ru icecast-2.4.4.orig/src/connection.c icecast-2.4.4/src/connection.c
+--- icecast-2.4.4.orig/src/connection.c 2018-10-31 18:52:49.000000000 +0100
++++ icecast-2.4.4/src/connection.c 2020-06-18 11:41:12.024581686 +0200
+@@ -112,9 +112,7 @@
+ static volatile client_queue_t *_req_queue = NULL, **_req_queue_tail = &_req_queue;
+ static volatile client_queue_t *_con_queue = NULL, **_con_queue_tail = &_con_queue;
+ static int ssl_ok;
+-#ifdef HAVE_OPENSSL
+ static SSL_CTX *ssl_ctx;
+-#endif
+
+ /* filtering client connection based on IP */
+ static cache_file_contents banned_ip, allowed_ip;
+@@ -165,9 +163,7 @@
+ {
+ if (!_initialized) return;
+
+-#ifdef HAVE_OPENSSL
+ SSL_CTX_free (ssl_ctx);
+-#endif
+ if (banned_ip.contents) avl_tree_free (banned_ip.contents, free_filtered_ip);
+ if (allowed_ip.contents) avl_tree_free (allowed_ip.contents, free_filtered_ip);
+
+@@ -190,8 +186,7 @@
+ return id;
+ }
+
+-
+-#ifdef HAVE_OPENSSL
++#if 1
+ static void get_ssl_certificate (ice_config_t *config)
+ {
+ #if OPENSSL_VERSION_NUMBER < 0x1000114fL
+@@ -439,13 +434,11 @@
+ */
+ void connection_uses_ssl (connection_t *con)
+ {
+-#ifdef HAVE_OPENSSL
+ con->read = connection_read_ssl;
+ con->send = connection_send_ssl;
+ con->ssl = SSL_new (ssl_ctx);
+ SSL_set_accept_state (con->ssl);
+ SSL_set_fd (con->ssl, con->sock);
+-#endif
+ }
+
+ static sock_t wait_for_serversock(int timeout)
+@@ -1496,8 +1489,6 @@
+ sock_close(con->sock);
+ if (con->ip) free(con->ip);
+ if (con->host) free(con->host);
+-#ifdef HAVE_OPENSSL
+ if (con->ssl) { SSL_shutdown (con->ssl); SSL_free (con->ssl); }
+-#endif
+ free(con);
+ }
+diff -ru icecast-2.4.4.orig/src/connection.h icecast-2.4.4/src/connection.h
+--- icecast-2.4.4.orig/src/connection.h 2018-10-31 18:52:49.000000000 +0100
++++ icecast-2.4.4/src/connection.h 2020-06-18 11:38:37.752586516 +0200
+@@ -15,10 +15,10 @@
+
+ #include <sys/types.h>
+ #include <time.h>
+-#ifdef HAVE_OPENSSL
+-#include <openssl/ssl.h>
+-#include <openssl/err.h>
+-#endif
++#include <wolfssl/options.h>
++#include <wolfssl/ssl.h>
++#include <wolfssl/openssl/ssl.h>
++#include <wolfssl/openssl/err.h>
+
+ #include "compat.h"
+ #include "httpp/httpp.h"
+@@ -41,9 +41,7 @@
+ sock_t serversock;
+ int error;
+
+-#ifdef HAVE_OPENSSL
+ SSL *ssl; /* SSL handler */
+-#endif
+ int (*send)(struct connection_tag *handle, const void *buf, size_t len);
+ int (*read)(struct connection_tag *handle, void *buf, size_t len);
+