From b58cae86e52d1f34c8e007e04f2dbc28650d8789 Mon Sep 17 00:00:00 2001 From: bju Date: Thu, 23 Jan 2014 22:05:58 +0100 Subject: - Giving VDRMANAGER_USE_{SSL,GZIP,ZLIB}=0 (default is 1) to the make call SSL support and the compression methods can be disabled. This eliminates the compile time and also the runtime dependencies. - The Gentoo ebuils uses the USE flags "ssl", "gzip" and "zlib" to control the SSL and compress features. --- vdr-vdrmanager/serversock.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vdr-vdrmanager/serversock.cpp') diff --git a/vdr-vdrmanager/serversock.cpp b/vdr-vdrmanager/serversock.cpp index 927a788..e118b0b 100644 --- a/vdr-vdrmanager/serversock.cpp +++ b/vdr-vdrmanager/serversock.cpp @@ -3,7 +3,11 @@ */ #include #include + +#if VDRMANAGER_USE_SSL #include +#endif + #include "serversock.h" #include "helpers.h" #include "compressor.h" @@ -19,8 +23,10 @@ cVdrmanagerServerSocket::cVdrmanagerServerSocket() : cVdrmanagerSocket() { } cVdrmanagerServerSocket::~cVdrmanagerServerSocket() { +#if VDRMANAGER_USE_SSL if (sslCtx) SSL_CTX_free(sslCtx); +#endif } bool cVdrmanagerServerSocket::Create(int port, const char * password, bool forceCheckSvrp, int compressionMode, @@ -68,6 +74,8 @@ bool cVdrmanagerServerSocket::Create(int port, const char * password, bool force return false; } +#if VDRMANAGER_USE_SSL + if (certFile) { isyslog("[vdrmanager] initialize SSL"); @@ -104,6 +112,7 @@ bool cVdrmanagerServerSocket::Create(int port, const char * password, bool force SSL_CTX_set_mode(sslCtx, SSL_MODE_ENABLE_PARTIAL_WRITE); } +#endif return true; } -- cgit v1.2.3