domoticz: Fix compilation without deprecated OpenSSL APIs
authorRosen Penev <rosenp@gmail.com>
Thu, 27 Jun 2019 07:28:25 +0000 (00:28 -0700)
committerRosen Penev <rosenp@gmail.com>
Wed, 19 Jan 2022 02:07:49 +0000 (18:07 -0800)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 8c77bcc19f4283813cdbb99842bb1c330fadf124)

utils/domoticz/Makefile
utils/domoticz/patches/020-openssl-deprecated.patch [new file with mode: 0644]

index 7bd2ae06b2c8dd885df9d5cb8128c8fd6c55d3e8..23a8197689046fa31f20e164a9ed439e62378426 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION_MAJOR:=4
 PKG_VERSION_PATCH:=9700
 PKG_COMMIT:=
 PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 ifeq ($(PKG_COMMIT),)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/utils/domoticz/patches/020-openssl-deprecated.patch b/utils/domoticz/patches/020-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..94ca26c
--- /dev/null
@@ -0,0 +1,24 @@
+From 87749eb9b74d82dced807cc16fb011d4e3fb052d Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 13 Jul 2019 17:28:06 -0700
+Subject: [PATCH] WebServerHelper: Fix compilation - deprecated APIs
+
+OpenSSL has initialization deprecated.
+---
+ main/WebServerHelper.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/main/WebServerHelper.cpp b/main/WebServerHelper.cpp
+index 98ebcf7b4..0a028595c 100644
+--- a/main/WebServerHelper.cpp
++++ b/main/WebServerHelper.cpp
+@@ -37,7 +37,9 @@ namespace http {
+                       our_listener_port = web_settings.listening_port;
+ #ifdef WWW_ENABLE_SSL
+                       if (secure_web_settings.is_enabled()) {
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+                               SSL_library_init();
++#endif
+                               secureServer_.reset(new CWebServer());
+                               bRet |= secureServer_->StartServer(secure_web_settings, serverpath, bIgnoreUsernamePassword);
+                               serverCollection.push_back(secureServer_);