Blame patches/icecast-2.4.4.local.patch

852a5b
diff -ru icecast-2.4.4.orig/src/connection.c icecast-2.4.4/src/connection.c
852a5b
--- icecast-2.4.4.orig/src/connection.c	2018-10-31 18:52:49.000000000 +0100
852a5b
+++ icecast-2.4.4/src/connection.c	2020-06-18 11:41:12.024581686 +0200
852a5b
@@ -112,9 +112,7 @@
852a5b
 static volatile client_queue_t *_req_queue = NULL, **_req_queue_tail = &_req_queue;
852a5b
 static volatile client_queue_t *_con_queue = NULL, **_con_queue_tail = &_con_queue;
852a5b
 static int ssl_ok;
852a5b
-#ifdef HAVE_OPENSSL
852a5b
 static SSL_CTX *ssl_ctx;
852a5b
-#endif
852a5b
 
852a5b
 /* filtering client connection based on IP */
852a5b
 static cache_file_contents banned_ip, allowed_ip;
852a5b
@@ -165,9 +163,7 @@
852a5b
 {
852a5b
     if (!_initialized) return;
852a5b
     
852a5b
-#ifdef HAVE_OPENSSL
852a5b
     SSL_CTX_free (ssl_ctx);
852a5b
-#endif
852a5b
     if (banned_ip.contents)  avl_tree_free (banned_ip.contents, free_filtered_ip);
852a5b
     if (allowed_ip.contents) avl_tree_free (allowed_ip.contents, free_filtered_ip);
852a5b
  
852a5b
@@ -190,8 +186,7 @@
852a5b
     return id;
852a5b
 }
852a5b
 
852a5b
-
852a5b
-#ifdef HAVE_OPENSSL
852a5b
+#if 1
852a5b
 static void get_ssl_certificate (ice_config_t *config)
852a5b
 {
852a5b
 #if OPENSSL_VERSION_NUMBER < 0x1000114fL
852a5b
@@ -439,13 +434,11 @@
852a5b
  */
852a5b
 void connection_uses_ssl (connection_t *con)
852a5b
 {
852a5b
-#ifdef HAVE_OPENSSL
852a5b
     con->read = connection_read_ssl;
852a5b
     con->send = connection_send_ssl;
852a5b
     con->ssl = SSL_new (ssl_ctx);
852a5b
     SSL_set_accept_state (con->ssl);
852a5b
     SSL_set_fd (con->ssl, con->sock);
852a5b
-#endif
852a5b
 }
852a5b
 
852a5b
 static sock_t wait_for_serversock(int timeout)
852a5b
@@ -1496,8 +1489,6 @@
852a5b
     sock_close(con->sock);
852a5b
     if (con->ip) free(con->ip);
852a5b
     if (con->host) free(con->host);
852a5b
-#ifdef HAVE_OPENSSL
852a5b
     if (con->ssl) { SSL_shutdown (con->ssl); SSL_free (con->ssl); }
852a5b
-#endif
852a5b
     free(con);
852a5b
 }
852a5b
diff -ru icecast-2.4.4.orig/src/connection.h icecast-2.4.4/src/connection.h
852a5b
--- icecast-2.4.4.orig/src/connection.h	2018-10-31 18:52:49.000000000 +0100
852a5b
+++ icecast-2.4.4/src/connection.h	2020-06-18 11:38:37.752586516 +0200
852a5b
@@ -15,10 +15,10 @@
852a5b
 
852a5b
 #include <sys/types.h>
852a5b
 #include <time.h>
852a5b
-#ifdef HAVE_OPENSSL
852a5b
-#include <openssl/ssl.h>
852a5b
-#include <openssl/err.h>
852a5b
-#endif
852a5b
+#include <wolfssl/options.h>
852a5b
+#include <wolfssl/ssl.h>
852a5b
+#include <wolfssl/openssl/ssl.h>
852a5b
+#include <wolfssl/openssl/err.h>
852a5b
 
852a5b
 #include "compat.h"
852a5b
 #include "httpp/httpp.h"
852a5b
@@ -41,9 +41,7 @@
852a5b
     sock_t serversock;
852a5b
     int error;
852a5b
 
852a5b
-#ifdef HAVE_OPENSSL
852a5b
     SSL *ssl;   /* SSL handler */
852a5b
-#endif
852a5b
     int (*send)(struct connection_tag *handle, const void *buf, size_t len);
852a5b
     int (*read)(struct connection_tag *handle, void *buf, size_t len);
852a5b