--- CTRLSvr.cpp.orig	2010-02-26 04:33:44.000000000 +0100
+++ CTRLSvr.cpp	2010-05-01 08:11:23.000000000 +0200
@@ -26,8 +26,10 @@
 #include "ShBlocks.h"
 #include "SList.h"
 #include "BuffSock.h"
+#ifdef WITH_SSL
 #include "SSLBind.h"
 #include "SSLConfig.h"
+#endif
 #include "ResLocks.h"
 #include "MiscUtils.h"
 #include "MD5.h"
@@ -300,6 +302,7 @@
 	return ERR_BAD_CTRL_LOGIN;
 }
 
+#ifdef WITH_SSL
 static int CTRLSslEnvCB(void *pPrivate, int iID, void const *pData)
 {
 	SslBindEnv *pSslE = (SslBindEnv *) pPrivate;
@@ -311,6 +314,7 @@
 
 	return 0;
 }
+#endif
 
 static int CTRLLogin(CTRLConfig *pCTRLCfg, BSOCK_HANDLE hBSock,
 		     char const *pszTimeStamp, SYS_INET_ADDR const &PeerInfo)
@@ -321,6 +325,7 @@
 	    MscCmdStringCheck(szLogin) < 0)
 		return ErrGetErrorCode();
 
+#ifdef WITH_SSL
 	if (strcmp(szLogin, CTRL_TLS_INIT_STR) == 0) {
 		int iError;
 		SslServerBind SSLB;
@@ -357,6 +362,7 @@
 		    MscCmdStringCheck(szLogin) < 0)
 			return ErrGetErrorCode();
 	}
+#endif
 
 	char **ppszTokens = StrGetTabLineStrings(szLogin);
 
@@ -2513,6 +2519,7 @@
 		return ErrorPop();
 	}
 
+#ifdef WITH_SSL
 	/*
 	 * Do we need to switch to TLS?
 	 */
@@ -2545,6 +2552,7 @@
 		SysFree(SslE.pszIssuer);
 		SysFree(SslE.pszSubject);
 	}
+#endif
 	/* Check IP permission */
 	if (CTRLCheckPeerIP(pThCtx->SockFD) < 0) {
 		ErrorPush();
