ssl: Remove fallback code for missing SSL support
authorJanne Koschinski <janne@kuschku.de>
Mon, 5 Aug 2019 17:34:45 +0000 (19:34 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 11 Jun 2020 11:57:32 +0000 (13:57 +0200)
34 files changed:
src/client/client.cpp
src/client/clientauthhandler.cpp
src/client/clientauthhandler.h
src/client/clientidentity.cpp
src/client/clientidentity.h
src/client/clientsettings.cpp
src/client/coreconnection.cpp
src/client/coreconnection.h
src/common/identity.h
src/common/quassel.cpp
src/common/remotepeer.cpp
src/common/signalproxy.cpp
src/core/core.cpp
src/core/core.h
src/core/coreauthhandler.cpp
src/core/coreauthhandler.h
src/core/coreidentity.cpp
src/core/coreidentity.h
src/core/corenetwork.cpp
src/core/corenetwork.h
src/core/coresession.cpp
src/core/coresessioneventprocessor.cpp
src/core/postgresqlstorage.cpp
src/core/sqlitestorage.cpp
src/core/sslserver.cpp
src/core/sslserver.h
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/settingspages/identitiessettingspage.cpp
src/qtui/settingspages/identitiessettingspage.h
src/qtui/settingspages/identityeditwidget.cpp
src/qtui/settingspages/identityeditwidget.h
src/qtui/settingspages/networkssettingspage.cpp
src/qtui/settingspages/networkssettingspage.h

index df30c89..c409218 100644 (file)
@@ -241,10 +241,8 @@ const Identity* Client::identity(IdentityId id)
 void Client::createIdentity(const CertIdentity& id)
 {
     QVariantMap additional;
-#ifdef HAVE_SSL
     additional["KeyPem"] = id.sslKey().toPem();
     additional["CertPem"] = id.sslCert().toPem();
-#endif
     emit instance()->requestCreateIdentity(id, additional);
 }
 
index d278b89..44743ae 100644 (file)
 #include "clientauthhandler.h"
 
 #include <QtEndian>
-
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-#else
-#    include <QTcpSocket>
-#endif
+#include <QSslSocket>
 
 #include "client.h"
 #include "clientsettings.h"
@@ -51,24 +46,9 @@ void ClientAuthHandler::connectToCore()
 {
     CoreAccountSettings s;
 
-#ifdef HAVE_SSL
     auto* socket = new QSslSocket(this);
     // make sure the warning is shown if we happen to connect without SSL support later
     s.setAccountValue("ShowNoClientSslWarning", true);
-#else
-    if (_account.useSsl()) {
-        if (s.accountValue("ShowNoClientSslWarning", true).toBool()) {
-            bool accepted = false;
-            emit handleNoSslInClient(&accepted);
-            if (!accepted) {
-                emit errorMessage(tr("Unencrypted connection canceled"));
-                return;
-            }
-            s.setAccountValue("ShowNoClientSslWarning", false);
-        }
-    }
-    QTcpSocket* socket = new QTcpSocket(this);
-#endif
 
 #ifndef QT_NO_NETWORKPROXY
     QNetworkProxy proxy;
@@ -179,10 +159,8 @@ void ClientAuthHandler::onSocketConnected()
         stream.setVersion(QDataStream::Qt_4_2);
 
         quint32 magic = Protocol::magic;
-#ifdef HAVE_SSL
         if (_account.useSsl())
             magic |= Protocol::Encryption;
-#endif
         magic |= Protocol::Compression;
 
         stream << magic;
@@ -288,9 +266,7 @@ void ClientAuthHandler::startRegistration()
 
     // useSsl will be ignored by non-legacy peers
     bool useSsl = false;
-#ifdef HAVE_SSL
     useSsl = _account.useSsl();
-#endif
 
     _peer->dispatch(Protocol::RegisterClient(Quassel::Features{}, Quassel::buildInfo().fancyVersionString, Quassel::buildInfo().commitDate, useSsl));
 }
@@ -403,9 +379,6 @@ void ClientAuthHandler::handle(const Protocol::SessionState& msg)
 
 void ClientAuthHandler::checkAndEnableSsl(bool coreSupportsSsl)
 {
-#ifndef HAVE_SSL
-    Q_UNUSED(coreSupportsSsl);
-#else
     CoreAccountSettings s;
     if (coreSupportsSsl && _account.useSsl()) {
         // Make sure the warning is shown next time we don't have SSL in the core
@@ -436,10 +409,8 @@ void ClientAuthHandler::checkAndEnableSsl(bool coreSupportsSsl)
         else
             startRegistration();
     }
-#endif
 }
 
-#ifdef HAVE_SSL
 
 void ClientAuthHandler::onSslSocketEncrypted()
 {
@@ -512,5 +483,3 @@ void ClientAuthHandler::onSslErrors()
 
     socket->ignoreSslErrors();
 }
-
-#endif /* HAVE_SSL */
index 4107cb6..b02c0c8 100644 (file)
@@ -67,9 +67,7 @@ signals:
     void userAuthenticationRequired(CoreAccount* account, bool* valid, const QString& errorMessage = QString());
     void handleNoSslInClient(bool* accepted);
     void handleNoSslInCore(bool* accepted);
-#ifdef HAVE_SSL
     void handleSslErrors(const QSslSocket* socket, bool* accepted, bool* permanently);
-#endif
 
     void encrypted(bool isEncrypted = true);
     void startCoreSetup(const QVariantList& backendInfo, const QVariantList& authenticatorInfo);
@@ -98,10 +96,8 @@ private slots:
     void onSocketDisconnected() override;
     void onReadyRead();
 
-#ifdef HAVE_SSL
     void onSslSocketEncrypted();
     void onSslErrors();
-#endif
 
     void onProtocolVersionMismatch(int actual, int expected);
 
index 45b8176..6e63ac4 100644 (file)
@@ -33,14 +33,11 @@ CertIdentity::CertIdentity(const Identity& other, QObject* parent)
 
 CertIdentity::CertIdentity(const CertIdentity& other, QObject* parent)
     : Identity(other, parent)
-#ifdef HAVE_SSL
     , _isDirty(other._isDirty)
     , _sslKey(other._sslKey)
     , _sslCert(other._sslCert)
-#endif
 {}
 
-#ifdef HAVE_SSL
 void CertIdentity::enableEditSsl(bool enable)
 {
     if (!enable || _certManager)
@@ -101,5 +98,3 @@ void ClientCertManager::setSslCert(const QByteArray& encoded)
 {
     _certIdentity->setSslCert(QSslCertificate(encoded));
 }
-
-#endif  // HAVE_SSL
index 7a166b3..864538f 100644 (file)
@@ -35,13 +35,8 @@ public:
     CertIdentity(const Identity& other, QObject* parent = nullptr);
     CertIdentity(const CertIdentity& other, QObject* parent = nullptr);
 
-#ifdef HAVE_SSL
     inline bool isDirty() const { return _isDirty; }
-#else
-    inline bool isDirty() const { return false; }
-#endif
 
-#ifdef HAVE_SSL
     void enableEditSsl(bool enable = true);
     inline const QSslKey& sslKey() const { return _sslKey; }
     inline const QSslCertificate& sslCert() const { return _sslCert; }
@@ -63,13 +58,11 @@ private:
     bool _isDirty{false};
     QSslKey _sslKey;
     QSslCertificate _sslCert;
-#endif  // HAVE_SSL
 };
 
 // ========================================
 //  ClientCertManager
 // ========================================
-#ifdef HAVE_SSL
 
 class ClientCertManager : public CertManager
 {
@@ -92,4 +85,3 @@ private:
     CertIdentity* _certIdentity;
 };
 
-#endif  // HAVE_SSL
index d44ad6a..17c65f2 100644 (file)
 #include <utility>
 
 #include <QHostAddress>
+#include <QSslSocket>
 #include <QStringList>
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-#endif
 
 #include "client.h"
 #include "quassel.h"
index 2d33a30..d48b5c8 100644 (file)
@@ -381,9 +381,7 @@ void CoreConnection::connectToCurrentAccount()
     connect(_authHandler, &ClientAuthHandler::userAuthenticationRequired, this, &CoreConnection::userAuthenticationRequired);
     connect(_authHandler, &ClientAuthHandler::handleNoSslInClient, this, &CoreConnection::handleNoSslInClient);
     connect(_authHandler, &ClientAuthHandler::handleNoSslInCore, this, &CoreConnection::handleNoSslInCore);
-#ifdef HAVE_SSL
     connect(_authHandler, &ClientAuthHandler::handleSslErrors, this, &CoreConnection::handleSslErrors);
-#endif
     connect(_authHandler, &ClientAuthHandler::loginSuccessful, this, &CoreConnection::onLoginSuccessful);
     connect(_authHandler, &ClientAuthHandler::handshakeComplete, this, &CoreConnection::onHandshakeComplete);
 
index 8fb074a..cff2fe0 100644 (file)
 
 #include <QNetworkConfigurationManager>
 #include <QPointer>
+#include <QSslSocket>
 #include <QTimer>
 
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-#else
-#    include <QTcpSocket>
-#endif
-
 #include "coreaccount.h"
 #include "remotepeer.h"
 #include "types.h"
@@ -111,9 +106,7 @@ signals:
     void userAuthenticationRequired(CoreAccount*, bool* valid, const QString& errorMessage = QString());
     void handleNoSslInClient(bool* accepted);
     void handleNoSslInCore(bool* accepted);
-#ifdef HAVE_SSL
     void handleSslErrors(const QSslSocket* socket, bool* accepted, bool* permanently);
-#endif
 
 private slots:
     void connectToCurrentAccount();
index 6deb916..08fdcd6 100644 (file)
@@ -25,6 +25,8 @@
 #include <QByteArray>
 #include <QDataStream>
 #include <QMetaType>
+#include <QSslCertificate>
+#include <QSslKey>
 #include <QString>
 #include <QStringList>
 
@@ -160,10 +162,6 @@ QDataStream& operator>>(QDataStream& in, Identity& identity);
 
 Q_DECLARE_METATYPE(Identity)
 
-#ifdef HAVE_SSL
-#    include <QSslCertificate>
-#    include <QSslKey>
-
 class COMMON_EXPORT CertManager : public SyncableObject
 {
     Q_OBJECT
@@ -186,5 +184,3 @@ public slots:
     inline virtual void setSslKey(const QByteArray& encoded) { SYNC(ARG(encoded)) }
     inline virtual void setSslCert(const QByteArray& encoded) { SYNC(ARG(encoded)) }
 };
-
-#endif  // HAVE_SSL
index 00600c0..dd08bd5 100644 (file)
@@ -363,14 +363,12 @@ void Quassel::setupCliParser()
             {"oidentd", tr("Enable oidentd integration. In most cases you should also enable --strict-ident.")},
             {"oidentd-conffile", tr("Set path to oidentd configuration file."), tr("file")},
             {"proxy-cidr", tr("Set IP range from which proxy protocol definitions are allowed"), tr("<address>[,...]"), "::1,127.0.0.1"},
-#ifdef HAVE_SSL
             {"require-ssl", tr("Require SSL for remote (non-loopback) client connections.")},
             {"ssl-cert", tr("Specify the path to the SSL certificate."), tr("path"), "configdir/quasselCert.pem"},
             {"ssl-key", tr("Specify the path to the SSL key."), tr("path"), "ssl-cert-path"},
             {"metrics-daemon", tr("Enable metrics API.")},
             {"metrics-port", tr("The port quasselcore will listen at for metrics requests. Only meaningful with --metrics-daemon."), tr("port"), "9558"},
             {"metrics-listen", tr("The address(es) quasselcore will listen on for metrics requests. Same format as --listen."), tr("<address>[,...]"), "::1,127.0.0.1"}
-#endif
         };
     }
 
index d234a73..78a746d 100644 (file)
 #include <QtEndian>
 
 #include <QHostAddress>
+#include <QSslSocket>
 #include <QTimer>
 
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-#else
-#    include <QTcpSocket>
-#endif
-
 #include "proxyline.h"
 #include "remotepeer.h"
 #include "util.h"
@@ -57,12 +52,10 @@ RemotePeer::RemotePeer(::AuthHandler* authHandler, QTcpSocket* socket, Compresso
     connect(socket, selectOverload<QAbstractSocket::SocketError>(&QAbstractSocket::error), this, &RemotePeer::onSocketError);
     connect(socket, &QAbstractSocket::disconnected, this, &Peer::disconnected);
 
-#ifdef HAVE_SSL
     auto* sslSocket = qobject_cast<QSslSocket*>(socket);
     if (sslSocket) {
         connect(sslSocket, &QSslSocket::encrypted, this, [this]() { emit secureStateChanged(true); });
     }
-#endif
 
     connect(_compressor, &Compressor::readyRead, this, &RemotePeer::onReadyRead);
     connect(_compressor, &Compressor::error, this, &RemotePeer::onCompressionError);
@@ -181,11 +174,9 @@ bool RemotePeer::isSecure() const
     if (socket()) {
         if (isLocal())
             return true;
-#ifdef HAVE_SSL
         auto* sslSocket = qobject_cast<QSslSocket*>(socket());
         if (sslSocket && sslSocket->isEncrypted())
             return true;
-#endif
     }
     return false;
 }
index bfaa78e..963092c 100644 (file)
 #include <QHostAddress>
 #include <QMetaMethod>
 #include <QMetaProperty>
+#include <QSslSocket>
 #include <QThread>
 
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-#endif
-
 #include "peer.h"
 #include "protocol.h"
 #include "signalproxy.h"
index a2b7283..66e2e62 100644 (file)
@@ -215,10 +215,8 @@ void Core::init()
 
         if (Quassel::isOptionSet("metrics-daemon")) {
             _metricsServer = new MetricsServer(this);
-#ifdef HAVE_SSL
             _server.setMetricsServer(_metricsServer);
             _v6server.setMetricsServer(_metricsServer);
-#endif
         }
 
         Quassel::registerReloadHandler([]() {
@@ -574,17 +572,12 @@ bool Core::initAuthenticator(
 
 bool Core::sslSupported()
 {
-#ifdef HAVE_SSL
     auto* sslServer = qobject_cast<SslServer*>(&instance()->_server);
     return sslServer && sslServer->isCertValid();
-#else
-    return false;
-#endif
 }
 
 bool Core::reloadCerts()
 {
-#ifdef HAVE_SSL
     auto* sslServerv4 = qobject_cast<SslServer*>(&_server);
     bool retv4 = sslServerv4->reloadCerts();
 
@@ -592,10 +585,6 @@ bool Core::reloadCerts()
     bool retv6 = sslServerv6->reloadCerts();
 
     return retv4 && retv6;
-#else
-    // SSL not supported, don't mark configuration reload as failed
-    return true;
-#endif
 }
 
 void Core::cacheSysIdent()
index d2b8092..4428f02 100644 (file)
 
 #include <QDateTime>
 #include <QPointer>
+#include <QSslSocket>
 #include <QString>
 #include <QTimer>
 #include <QVariant>
 
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-
-#    include "sslserver.h"
-#else
-#    include <QTcpServer>
-#    include <QTcpSocket>
-#endif
-
 #include "authenticator.h"
 #include "bufferinfo.h"
 #include "deferredptr.h"
@@ -49,6 +41,7 @@
 #include "oidentdconfiggenerator.h"
 #include "sessionthread.h"
 #include "singleton.h"
+#include "sslserver.h"
 #include "storage.h"
 #include "types.h"
 
@@ -781,11 +774,7 @@ private:
 
     QTimer _storageSyncTimer;
 
-#ifdef HAVE_SSL
     SslServer _server, _v6server;
-#else
-    QTcpServer _server, _v6server;
-#endif
 
     OidentdConfigGenerator* _oidentdConfigGenerator{nullptr};
 
index 8d39d06..872c6d1 100644 (file)
@@ -22,9 +22,7 @@
 
 #include <QtEndian>
 
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-#endif
+#include <QSslSocket>
 
 #include "core.h"
 
@@ -336,7 +334,6 @@ bool CoreAuthHandler::isLocal() const
 
 void CoreAuthHandler::startSsl()
 {
-#ifdef HAVE_SSL
     auto* sslSocket = qobject_cast<QSslSocket*>(socket());
     Q_ASSERT(sslSocket);
 
@@ -344,14 +341,11 @@ void CoreAuthHandler::startSsl()
     connect(sslSocket, selectOverload<const QList<QSslError>&>(&QSslSocket::sslErrors), this, &CoreAuthHandler::onSslErrors);
     sslSocket->flush();  // ensure that the write cache is flushed before we switch to ssl (bug 682)
     sslSocket->startServerEncryption();
-#endif /* HAVE_SSL */
 }
 
-#ifdef HAVE_SSL
 void CoreAuthHandler::onSslErrors()
 {
     auto* sslSocket = qobject_cast<QSslSocket*>(socket());
     Q_ASSERT(sslSocket);
     sslSocket->ignoreSslErrors();
 }
-#endif
index db54bec..6471a3e 100644 (file)
@@ -56,9 +56,7 @@ private:
 private slots:
     void onReadyRead();
 
-#ifdef HAVE_SSL
     void onSslErrors();
-#endif
 
     // only in legacy mode
     void onProtocolVersionMismatch(int actual, int expected);
index e567c90..a508d4b 100644 (file)
 
 CoreIdentity::CoreIdentity(IdentityId id, QObject* parent)
     : Identity(id, parent)
-#ifdef HAVE_SSL
     , _certManager(this)
-#endif
 {
-#ifdef HAVE_SSL
     connect(this, &Identity::idSet, &_certManager, &CoreCertManager::setId);
     connect(&_certManager, &SyncableObject::updated, this, &SyncableObject::updated);
-#endif
 }
 
 CoreIdentity::CoreIdentity(const Identity& other, QObject* parent)
     : Identity(other, parent)
-#ifdef HAVE_SSL
     , _certManager(this)
-#endif
 {
-#ifdef HAVE_SSL
     connect(this, &Identity::idSet, &_certManager, &CoreCertManager::setId);
     connect(&_certManager, &SyncableObject::updated, this, &SyncableObject::updated);
-#endif
 }
 
 CoreIdentity::CoreIdentity(const CoreIdentity& other, QObject* parent)
     : Identity(other, parent)
-#ifdef HAVE_SSL
     , _sslKey(other._sslKey)
     , _sslCert(other._sslCert)
     , _certManager(this)
-#endif
 {
-#ifdef HAVE_SSL
     connect(this, &Identity::idSet, &_certManager, &CoreCertManager::setId);
     connect(&_certManager, &SyncableObject::updated, this, &SyncableObject::updated);
-#endif
 }
 
 void CoreIdentity::synchronize(SignalProxy* proxy)
 {
     proxy->synchronize(this);
-#ifdef HAVE_SSL
     proxy->synchronize(&_certManager);
-#endif
 }
 
-#ifdef HAVE_SSL
 void CoreIdentity::setSslKey(const QByteArray& encoded)
 {
     QSslKey key(encoded, QSsl::Rsa);
@@ -84,9 +69,6 @@ void CoreIdentity::setSslCert(const QByteArray& encoded)
     setSslCert(QSslCertificate(encoded));
 }
 
-#endif
-
-#ifdef HAVE_SSL
 // ========================================
 //  CoreCertManager
 // ========================================
@@ -114,5 +96,3 @@ void CoreCertManager::setSslCert(const QByteArray& encoded)
     _identity->setSslCert(encoded);
     CertManager::setSslCert(encoded);
 }
-
-#endif  // HAVE_SSL
index 0265881..b2ba09f 100644 (file)
 
 #include "identity.h"
 
-#ifdef HAVE_SSL
-#    include <QSslCertificate>
-#    include <QSslKey>
-#endif  // HAVE_SSL
+#include <QSslCertificate>
+#include <QSslKey>
 
 class SignalProxy;
 
 // ========================================
 //  CoreCertManager
 // ========================================
-#ifdef HAVE_SSL
 class CoreIdentity;
 class CORE_EXPORT CoreCertManager : public CertManager
 {
@@ -43,14 +40,12 @@ class CORE_EXPORT CoreCertManager : public CertManager
 public:
     CoreCertManager(CoreIdentity* identity);
 
-#    ifdef HAVE_SSL
     const QSslKey& sslKey() const override;
     const QSslCertificate& sslCert() const override;
 
 public slots:
     void setSslKey(const QByteArray& encoded) override;
     void setSslCert(const QByteArray& encoded) override;
-#    endif
 
     void setId(IdentityId id);
 
@@ -58,8 +53,6 @@ private:
     CoreIdentity* _identity{nullptr};
 };
 
-#endif  // HAVE_SSL
-
 // =========================================
 //  CoreIdentity
 // =========================================
@@ -74,25 +67,20 @@ public:
 
     void synchronize(SignalProxy* proxy);
 
-#ifdef HAVE_SSL
     inline const QSslKey& sslKey() const { return _sslKey; }
     inline void setSslKey(const QSslKey& key) { _sslKey = key; }
     void setSslKey(const QByteArray& encoded);
     inline const QSslCertificate& sslCert() const { return _sslCert; }
     inline void setSslCert(const QSslCertificate& cert) { _sslCert = cert; }
     void setSslCert(const QByteArray& encoded);
-#endif /* HAVE_SSL */
 
 private:
-#ifdef HAVE_SSL
     QSslKey _sslKey;
     QSslCertificate _sslCert;
 
     CoreCertManager _certManager;
-#endif
 };
 
-#ifdef HAVE_SSL
 inline const QSslKey& CoreCertManager::sslKey() const
 {
     return _identity->sslKey();
@@ -102,5 +90,3 @@ inline const QSslCertificate& CoreCertManager::sslCert() const
 {
     return _identity->sslCert();
 }
-
-#endif
index 0dfb33b..9a8c636 100644 (file)
@@ -84,10 +84,8 @@ CoreNetwork::CoreNetwork(const NetworkId& networkid, CoreSession* session)
     connect(&socket, selectOverload<QAbstractSocket::SocketError>(&QAbstractSocket::error), this, &CoreNetwork::onSocketError);
     connect(&socket, &QAbstractSocket::stateChanged, this, &CoreNetwork::onSocketStateChanged);
     connect(&socket, &QIODevice::readyRead, this, &CoreNetwork::onSocketHasData);
-#ifdef HAVE_SSL
     connect(&socket, &QSslSocket::encrypted, this, &CoreNetwork::onSocketInitialized);
     connect(&socket, selectOverload<const QList<QSslError>&>(&QSslSocket::sslErrors), this, &CoreNetwork::onSslErrors);
-#endif
     connect(this, &CoreNetwork::newEvent, coreSession()->eventManager(), &EventManager::postEvent);
 
     // Custom rate limiting
@@ -268,7 +266,6 @@ void CoreNetwork::connectToIrc(bool reconnecting)
         // hostname of the server. Qt's DNS cache also isn't used by the proxy so we don't need to refresh the entry.
         QHostInfo::fromName(server.host);
     }
-#ifdef HAVE_SSL
     if (server.useSsl) {
         CoreIdentity* identity = identityPtr();
         if (identity) {
@@ -280,9 +277,6 @@ void CoreNetwork::connectToIrc(bool reconnecting)
     else {
         socket.connectToHost(server.host, server.port);
     }
-#else
-    socket.connectToHost(server.host, server.port);
-#endif
 }
 
 void CoreNetwork::disconnectFromIrc(bool requested, const QString& reason, bool withReconnect)
@@ -563,7 +557,6 @@ void CoreNetwork::onSocketInitialized()
 
     Server server = usedServer();
 
-#ifdef HAVE_SSL
     // Non-SSL connections enter here only once, always emit socketInitialized(...) in these cases
     // SSL connections call socketInitialized() twice, only emit socketInitialized(...) on the first (not yet encrypted) run
     if (!server.useSsl || !socket.isEncrypted()) {
@@ -574,9 +567,6 @@ void CoreNetwork::onSocketInitialized()
         // We'll finish setup once we're encrypted, and called again
         return;
     }
-#else
-    emit socketInitialized(identity, localAddress(), localPort(), peerAddress(), peerPort(), _socketId);
-#endif
 
     socket.setSocketOption(QAbstractSocket::KeepAliveOption, true);
 
@@ -1114,7 +1104,6 @@ void CoreNetwork::serverCapAcknowledged(const QString& capability)
         // If SASL mechanisms specified, limit to what's accepted for authentication
         // if the current identity has a cert set, use SASL EXTERNAL
         // FIXME use event
-#ifdef HAVE_SSL
         if (!identityPtr()->sslCert().isNull()) {
             if (saslMaybeSupports(IrcCap::SaslMech::EXTERNAL)) {
                 // EXTERNAL authentication supported, send request
@@ -1131,7 +1120,6 @@ void CoreNetwork::serverCapAcknowledged(const QString& capability)
             }
         }
         else {
-#endif
             if (saslMaybeSupports(IrcCap::SaslMech::PLAIN)) {
                 // PLAIN authentication supported, send request
                 // Only working with PLAIN atm, blowfish later
@@ -1146,9 +1134,7 @@ void CoreNetwork::serverCapAcknowledged(const QString& capability)
                 ));
                 sendNextCap();
             }
-#ifdef HAVE_SSL
         }
-#endif
     }
 }
 
@@ -1476,7 +1462,6 @@ void CoreNetwork::sendAutoWho()
     }
 }
 
-#ifdef HAVE_SSL
 void CoreNetwork::onSslErrors(const QList<QSslError>& sslErrors)
 {
     Server server = usedServer();
@@ -1519,8 +1504,6 @@ void CoreNetwork::onSslErrors(const QList<QSslError>& sslErrors)
     }
 }
 
-#endif  // HAVE_SSL
-
 void CoreNetwork::checkTokenBucket()
 {
     if (_skipMessageRates) {
index 510b5fb..456f847 100644 (file)
 
 #include <functional>
 
+#include <QSslError>
+#include <QSslSocket>
 #include <QTimer>
 
-#ifdef HAVE_SSL
-#    include <QSslError>
-#    include <QSslSocket>
-#else
-#    include <QTcpSocket>
-#endif
-
 #ifdef HAVE_QCA2
 #    include "cipher.h"
 #endif
@@ -476,9 +471,7 @@ private slots:
     void sendAutoWho();
     void startAutoWhoCycle();
 
-#ifdef HAVE_SSL
     void onSslErrors(const QList<QSslError>& errors);
-#endif
 
     /**
      * Check the message token bucket
@@ -513,11 +506,7 @@ private:
     bool _debugLogRawIrc;      ///< If true, include raw IRC socket messages in the debug log
     qint32 _debugLogRawNetId;  ///< Network ID for logging raw IRC socket messages, or -1 for all
 
-#ifdef HAVE_SSL
     QSslSocket socket;
-#else
-    QTcpSocket socket;
-#endif
     qint64 _socketId{0};
 
     CoreUserInputHandler* _userInputHandler;
index 3c485f7..6c85605 100644 (file)
@@ -529,17 +529,11 @@ Protocol::SessionState CoreSession::sessionState() const
 /*** Identity Handling ***/
 void CoreSession::createIdentity(const Identity& identity, const QVariantMap& additional)
 {
-#ifndef HAVE_SSL
-    Q_UNUSED(additional)
-#endif
-
     CoreIdentity coreIdentity(identity);
-#ifdef HAVE_SSL
     if (additional.contains("KeyPem"))
         coreIdentity.setSslKey(additional["KeyPem"].toByteArray());
     if (additional.contains("CertPem"))
         coreIdentity.setSslCert(additional["CertPem"].toByteArray());
-#endif
     qDebug() << Q_FUNC_INFO;
     IdentityId id = Core::createIdentity(user(), coreIdentity);
     if (!id.isValid())
index 3bc7811..ec988ff 100644 (file)
@@ -134,9 +134,7 @@ void CoreSessionEventProcessor::processIrcEventAuthenticate(IrcEvent* e)
 
     CoreNetwork* net = coreNetwork(e);
 
-#ifdef HAVE_SSL
     if (net->identityPtr()->sslCert().isNull()) {
-#endif
         QString construct = net->saslAccount();
         construct.append(QChar(QChar::Null));
         construct.append(net->saslAccount());
@@ -145,12 +143,10 @@ void CoreSessionEventProcessor::processIrcEventAuthenticate(IrcEvent* e)
         QByteArray saslData = QByteArray(construct.toLatin1().toBase64());
         saslData.prepend("AUTHENTICATE ");
         net->putRawLine(saslData);
-#ifdef HAVE_SSL
     }
     else {
         net->putRawLine("AUTHENTICATE +");
     }
-#endif
 }
 
 void CoreSessionEventProcessor::processIrcEventCap(IrcEvent* e)
index 90b0fdb..88bc86c 100644 (file)
@@ -527,13 +527,8 @@ IdentityId PostgreSqlStorage::createIdentity(UserId user, CoreIdentity& identity
     query.bindValue(":kickreason", identity.kickReason());
     query.bindValue(":partreason", identity.partReason());
     query.bindValue(":quitreason", identity.quitReason());
-#ifdef HAVE_SSL
     query.bindValue(":sslcert", identity.sslCert().toPem());
     query.bindValue(":sslkey", identity.sslKey().toPem());
-#else
-    query.bindValue(":sslcert", QByteArray());
-    query.bindValue(":sslkey", QByteArray());
-#endif
     safeExec(query);
     if (!watchQuery(query)) {
         db.rollback();
@@ -610,13 +605,8 @@ bool PostgreSqlStorage::updateIdentity(UserId user, const CoreIdentity& identity
     query.bindValue(":kickreason", identity.kickReason());
     query.bindValue(":partreason", identity.partReason());
     query.bindValue(":quitreason", identity.quitReason());
-#ifdef HAVE_SSL
     query.bindValue(":sslcert", identity.sslCert().toPem());
     query.bindValue(":sslkey", identity.sslKey().toPem());
-#else
-    query.bindValue(":sslcert", QByteArray());
-    query.bindValue(":sslkey", QByteArray());
-#endif
     query.bindValue(":identityid", identity.id().toInt());
 
     safeExec(query);
@@ -717,10 +707,8 @@ std::vector<CoreIdentity> PostgreSqlStorage::identities(UserId user)
         identity.setKickReason(query.value(15).toString());
         identity.setPartReason(query.value(16).toString());
         identity.setQuitReason(query.value(17).toString());
-#ifdef HAVE_SSL
         identity.setSslCert(query.value(18).toByteArray());
         identity.setSslKey(query.value(19).toByteArray());
-#endif
 
         nickQuery.bindValue(":identityid", identity.id().toInt());
         QList<QString> nicks;
index dc5b546..9455a61 100644 (file)
@@ -503,13 +503,8 @@ IdentityId SqliteStorage::createIdentity(UserId user, CoreIdentity& identity)
         query.bindValue(":kickreason", identity.kickReason());
         query.bindValue(":partreason", identity.partReason());
         query.bindValue(":quitreason", identity.quitReason());
-#ifdef HAVE_SSL
         query.bindValue(":sslcert", identity.sslCert().toPem());
         query.bindValue(":sslkey", identity.sslKey().toPem());
-#else
-        query.bindValue(":sslcert", QByteArray());
-        query.bindValue(":sslkey", QByteArray());
-#endif
 
         lockForWrite();
         safeExec(query);
@@ -581,13 +576,8 @@ bool SqliteStorage::updateIdentity(UserId user, const CoreIdentity& identity)
         query.bindValue(":kickreason", identity.kickReason());
         query.bindValue(":partreason", identity.partReason());
         query.bindValue(":quitreason", identity.quitReason());
-#ifdef HAVE_SSL
         query.bindValue(":sslcert", identity.sslCert().toPem());
         query.bindValue(":sslkey", identity.sslKey().toPem());
-#else
-        query.bindValue(":sslcert", QByteArray());
-        query.bindValue(":sslkey", QByteArray());
-#endif
         query.bindValue(":identityid", identity.id().toInt());
         safeExec(query);
         watchQuery(query);
@@ -687,10 +677,8 @@ std::vector<CoreIdentity> SqliteStorage::identities(UserId user)
             identity.setKickReason(query.value(15).toString());
             identity.setPartReason(query.value(16).toString());
             identity.setQuitReason(query.value(17).toString());
-#ifdef HAVE_SSL
             identity.setSslCert(query.value(18).toByteArray());
             identity.setSslKey(query.value(19).toByteArray());
-#endif
 
             nickQuery.bindValue(":identityid", identity.id().toInt());
             QList<QString> nicks;
index 92ac6fe..9fceddd 100644 (file)
 
 #include "sslserver.h"
 
-#ifdef HAVE_SSL
-#    include <QSslSocket>
-#endif
-
 #include <QDateTime>
+#include <QSslSocket>
 
 #include "core.h"
 #include "quassel.h"
 
-#ifdef HAVE_SSL
-
 SslServer::SslServer(QObject* parent)
     : QTcpServer(parent)
 {
@@ -235,5 +230,3 @@ void SslServer::setMetricsServer(MetricsServer* metricsServer) {
         _metricsServer->setCertificateExpires(_certificateExpires);
     }
 }
-
-#endif  // HAVE_SSL
index 7449754..d91f28c 100644 (file)
 
 #pragma once
 
-#ifdef HAVE_SSL
+#include <QFile>
+#include <QLinkedList>
+#include <QSslCertificate>
+#include <QSslKey>
+#include <QTcpServer>
 
-#    include <QFile>
-#    include <QLinkedList>
-#    include <QSslCertificate>
-#    include <QSslKey>
-#    include <QTcpServer>
-
-#    include "metricsserver.h"
+#include "metricsserver.h"
 
 class SslServer : public QTcpServer
 {
@@ -87,5 +85,3 @@ private:
 
     QDateTime _certificateExpires;
 };
-
-#endif  // HAVE_SSL
index 5800ea7..dae5029 100644 (file)
@@ -91,6 +91,7 @@
 #include "resourcetreedlg.h"
 #include "settingsdlg.h"
 #include "settingspagedlg.h"
+#include "sslinfodlg.h"
 #include "statusnotifieritem.h"
 #include "toolbaractionprovider.h"
 #include "topicwidget.h"
 #    include "snorenotificationbackend.h"
 #endif
 
-#ifdef HAVE_SSL
-#    include "sslinfodlg.h"
-#endif
-
 #ifdef HAVE_NOTIFICATION_CENTER
 #    include "osxnotificationbackend.h"
 #endif
 #    include "dockmanagernotificationbackend.h"
 #endif
 
-#include <settingspages/corehighlightsettingspage.h>
-
 #include "settingspages/aliasessettingspage.h"
 #include "settingspages/appearancesettingspage.h"
 #include "settingspages/backlogsettingspage.h"
 #include "settingspages/connectionsettingspage.h"
 #include "settingspages/coreaccountsettingspage.h"
 #include "settingspages/coreconnectionsettingspage.h"
+#include "settingspages/corehighlightsettingspage.h"
 #include "settingspages/dccsettingspage.h"
 #include "settingspages/highlightsettingspage.h"
 #include "settingspages/identitiessettingspage.h"
@@ -202,9 +198,7 @@ void MainWin::init()
     connect(Client::coreConnection(), &CoreConnection::userAuthenticationRequired, this, &MainWin::userAuthenticationRequired);
     connect(Client::coreConnection(), &CoreConnection::handleNoSslInClient, this, &MainWin::handleNoSslInClient);
     connect(Client::coreConnection(), &CoreConnection::handleNoSslInCore, this, &MainWin::handleNoSslInCore);
-#ifdef HAVE_SSL
     connect(Client::coreConnection(), &CoreConnection::handleSslErrors, this, &MainWin::handleSslErrors);
-#endif
 
     // Setup Dock Areas
     setDockNestingEnabled(true);
@@ -1380,8 +1374,6 @@ void MainWin::handleNoSslInCore(bool* accepted)
     *accepted = (box.exec() == QMessageBox::Ignore);
 }
 
-#ifdef HAVE_SSL
-
 void MainWin::handleSslErrors(const QSslSocket* socket, bool* accepted, bool* permanently)
 {
     QString errorString = "<ul>";
@@ -1420,8 +1412,6 @@ void MainWin::handleSslErrors(const QSslSocket* socket, bool* accepted, bool* pe
     }
 }
 
-#endif /* HAVE_SSL */
-
 void MainWin::handleCoreConnectionError(const QString& error)
 {
     QMessageBox::critical(this, tr("Core Connection Error"), error, QMessageBox::Ok);
index 314b72e..fbcd553 100644 (file)
@@ -148,9 +148,7 @@ private slots:
     void userAuthenticationRequired(CoreAccount*, bool* valid, const QString& errorMessage);
     void handleNoSslInClient(bool* accepted);
     void handleNoSslInCore(bool* accepted);
-#ifdef HAVE_SSL
     void handleSslErrors(const QSslSocket* socket, bool* accepted, bool* permanently);
-#endif
 
     void onConfigureNetworksTriggered();
     void onConfigureViewsTriggered();
index 140d6cd..b5589dc 100644 (file)
@@ -44,9 +44,7 @@ IdentitiesSettingsPage::IdentitiesSettingsPage(QWidget* parent)
     connect(Client::instance(), &Client::identityRemoved, this, &IdentitiesSettingsPage::clientIdentityRemoved);
 
     connect(ui.identityEditor, &IdentityEditWidget::widgetHasChanged, this, &IdentitiesSettingsPage::widgetHasChanged);
-#ifdef HAVE_SSL
     connect(ui.identityEditor, &IdentityEditWidget::requestEditSsl, this, &IdentitiesSettingsPage::continueUnsecured);
-#endif
 
     currentId = 0;
 }
@@ -55,7 +53,6 @@ void IdentitiesSettingsPage::coreConnectionStateChanged(bool connected)
 {
     setEnabled(connected);
     if (connected) {
-#ifdef HAVE_SSL
         if (Client::signalProxy()->isSecure()) {
             ui.identityEditor->setSslState(IdentityEditWidget::AllowSsl);
             _editSsl = true;
@@ -64,9 +61,6 @@ void IdentitiesSettingsPage::coreConnectionStateChanged(bool connected)
             ui.identityEditor->setSslState(IdentityEditWidget::UnsecureSsl);
             _editSsl = false;
         }
-#else
-        ui.identityEditor->setSslState(IdentityEditWidget::NoSsl);
-#endif
         load();
     }
     else {
@@ -75,7 +69,6 @@ void IdentitiesSettingsPage::coreConnectionStateChanged(bool connected)
     }
 }
 
-#ifdef HAVE_SSL
 void IdentitiesSettingsPage::continueUnsecured()
 {
     _editSsl = true;
@@ -88,8 +81,6 @@ void IdentitiesSettingsPage::continueUnsecured()
     ui.identityEditor->setSslState(IdentityEditWidget::AllowSsl);
 }
 
-#endif
-
 void IdentitiesSettingsPage::save()
 {
     setEnabled(false);
@@ -169,12 +160,10 @@ bool IdentitiesSettingsPage::testHasChanged()
         if (currentId != 0) {
             changedIdentities.removeAll(currentId);
             CertIdentity temp(currentId, this);
-#ifdef HAVE_SSL
             // we need to set the cert and key manually, as they aren't synced
             CertIdentity* old = identities[currentId];
             temp.setSslKey(old->sslKey());
             temp.setSslCert(old->sslCert());
-#endif
             ui.identityEditor->saveToIdentity(&temp);
             temp.setIdentityName(identities[currentId]->identityName());
             if (temp != *Client::identity(currentId) || temp.isDirty())
@@ -217,13 +206,9 @@ bool IdentitiesSettingsPage::aboutToSave()
 void IdentitiesSettingsPage::clientIdentityCreated(IdentityId id)
 {
     auto* identity = new CertIdentity(*Client::identity(id), this);
-#ifdef HAVE_SSL
     identity->enableEditSsl(_editSsl);
-#endif
     insertIdentity(identity);
-#ifdef HAVE_SSL
     connect(identity, &CertIdentity::sslSettingsUpdated, this, &IdentitiesSettingsPage::clientIdentityUpdated);
-#endif
     connect(Client::identity(id), &SyncableObject::updatedRemotely, this, &IdentitiesSettingsPage::clientIdentityUpdated);
 }
 
@@ -329,9 +314,7 @@ void IdentitiesSettingsPage::on_addIdentity_clicked()
         }
         id = -id.toInt();
         auto* newId = new CertIdentity(id, this);
-#ifdef HAVE_SSL
         newId->enableEditSsl(_editSsl);
-#endif
         if (dlg.duplicateId() != 0) {
             // duplicate
             newId->copyFrom(*identities[dlg.duplicateId()]);
@@ -440,9 +423,7 @@ SaveIdentitiesDlg::SaveIdentitiesDlg(const QList<CertIdentity*>& toCreate,
             }
             connect(cid, &SyncableObject::updatedRemotely, this, &SaveIdentitiesDlg::clientEvent);
             Client::updateIdentity(id->id(), id->toVariantMap());
-#ifdef HAVE_SSL
             id->requestUpdateSslSettings();
-#endif
         }
         foreach (IdentityId id, toRemove) {
             Client::removeIdentity(id);
index 3786aa4..11f4e43 100644 (file)
@@ -57,9 +57,7 @@ private slots:
     void on_deleteIdentity_clicked();
     void on_renameIdentity_clicked();
 
-#ifdef HAVE_SSL
     void continueUnsecured();
-#endif
     void widgetHasChanged();
     void setWidgetStates();
 
@@ -78,12 +76,10 @@ private:
     void removeIdentity(Identity* identity);
     void renameIdentity(IdentityId id, const QString& newName);
 
-#ifdef HAVE_SSL
     QSslKey keyByFilename(const QString& filename);
     void showKeyState(const QSslKey& key);
     QSslCertificate certByFilename(const QString& filename);
     void showCertState(const QSslCertificate& cert);
-#endif
 
     bool testHasChanged();
 };
index 31c8758..dadb09c 100644 (file)
@@ -75,12 +75,10 @@ IdentityEditWidget::IdentityEditWidget(QWidget* parent)
 
     ui.detachAwayEnabled->setVisible(!Client::internalCore());
 
-#ifdef HAVE_SSL
     ui.sslKeyGroupBox->setAcceptDrops(true);
     ui.sslKeyGroupBox->installEventFilter(this);
     ui.sslCertGroupBox->setAcceptDrops(true);
     ui.sslCertGroupBox->installEventFilter(this);
-#endif
 
     if (Client::isCoreFeatureEnabled(Quassel::Feature::AwayFormatTimestamp)) {
         // Core allows formatting %%timestamp%% messages in away strings.  Update tooltips.
@@ -172,10 +170,8 @@ void IdentityEditWidget::displayIdentity(CertIdentity* id, CertIdentity* saveId)
     ui.kickReason->setText(id->kickReason());
     ui.partReason->setText(id->partReason());
     ui.quitReason->setText(id->quitReason());
-#ifdef HAVE_SSL
     showKeyState(id->sslKey());
     showCertState(id->sslCert());
-#endif
 }
 
 void IdentityEditWidget::saveToIdentity(CertIdentity* id)
@@ -202,11 +198,9 @@ void IdentityEditWidget::saveToIdentity(CertIdentity* id)
     id->setKickReason(ui.kickReason->text().remove(linebreaks));
     id->setPartReason(ui.partReason->text().remove(linebreaks));
     id->setQuitReason(ui.quitReason->text().remove(linebreaks));
-#ifdef HAVE_SSL
     id->setSslKey(
         QSslKey(ui.keyTypeLabel->property("sslKey").toByteArray(), (QSsl::KeyAlgorithm)(ui.keyTypeLabel->property("sslKeyType").toInt())));
     id->setSslCert(QSslCertificate(ui.certOrgLabel->property("sslCert").toByteArray()));
-#endif
 }
 
 void IdentityEditWidget::on_addNick_clicked()
@@ -304,7 +298,6 @@ void IdentityEditWidget::setSslState(SslState state)
     }
 }
 
-#ifdef HAVE_SSL
 bool IdentityEditWidget::eventFilter(QObject* watched, QEvent* event)
 {
     bool isCert = (watched == ui.sslCertGroupBox);
@@ -464,5 +457,3 @@ void IdentityEditWidget::showCertState(const QSslCertificate& cert)
     }
     ui.certOrgLabel->setProperty("sslCert", cert.toPem());
 }
-
-#endif  // HAVE_SSL
index f61a522..684bdd4 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef IDENTITYEDITWIDGET_H
-#define IDENTITYEDITWIDGET_H
+#pragma once
 
-#include "ui_identityeditwidget.h"
-#include "ui_nickeditdlg.h"
-
-#ifdef HAVE_SSL
-#    include <QSslCertificate>
-#    include <QSslKey>
-#endif
+#include <QSslCertificate>
+#include <QSslKey>
 
 #include "clientidentity.h"
 
+#include "ui_identityeditwidget.h"
+#include "ui_nickeditdlg.h"
+
 class IdentityEditWidget : public QWidget
 {
     Q_OBJECT
@@ -53,9 +50,7 @@ public slots:
     void showAdvanced(bool advanced);
 
 protected:
-#ifdef HAVE_SSL
     bool eventFilter(QObject* watched, QEvent* event) override;
-#endif
 
 signals:
     void requestEditSsl();
@@ -68,27 +63,21 @@ private slots:
     void on_nickUp_clicked();
     void on_nickDown_clicked();
 
-#ifdef HAVE_SSL
     void on_clearOrLoadKeyButton_clicked();
     void on_clearOrLoadCertButton_clicked();
-#endif
     void setWidgetStates();
 
-#ifdef HAVE_SSL
     void sslDragEnterEvent(QDragEnterEvent* event);
     void sslDropEvent(QDropEvent* event, bool isCert);
-#endif
 
 private:
     Ui::IdentityEditWidget ui;
     bool _editSsl;
 
-#ifdef HAVE_SSL
     QSslKey keyByFilename(const QString& filename);
     void showKeyState(const QSslKey& key);
     QSslCertificate certByFilename(const QString& filename);
     void showCertState(const QSslCertificate& cert);
-#endif
 
     bool testHasChanged();
 };
@@ -111,5 +100,3 @@ private:
     QString oldNick;
     QStringList existing;
 };
-
-#endif  // IDENTITYEDITWIDGET_H
index 592c197..6a36d0e 100644 (file)
@@ -50,9 +50,6 @@ NetworksSettingsPage::NetworksSettingsPage(QWidget* parent)
         ui.sasl->hide();
     if (!Client::isCoreFeatureEnabled(Quassel::Feature::SaslExternal))
         ui.saslExtInfo->hide();
-#ifndef HAVE_SSL
-    ui.saslExtInfo->hide();
-#endif
 
     // set up icons
     ui.renameNetwork->setIcon(icon::get("edit-rename"));
@@ -180,11 +177,9 @@ void NetworksSettingsPage::load()
                                                         "modify message rate limits.")));
     }
 
-#ifdef HAVE_SSL
     // Hide the SASL EXTERNAL notice until a network's shown.  Stops it from showing while loading
     // backlog from the core.
     sslUpdated();
-#endif
 
     // Reset network capability status in case no valid networks get selected (a rare situation)
     resetNetworkCapStates();
@@ -575,7 +570,6 @@ void NetworksSettingsPage::displayNetwork(NetworkId id)
     if (id != 0) {
         NetworkInfo info = networkInfos[id];
 
-#ifdef HAVE_SSL
         // this is only needed when the core supports SASL EXTERNAL
         if (Client::isCoreFeatureEnabled(Quassel::Feature::SaslExternal)) {
             if (_cid) {
@@ -586,7 +580,6 @@ void NetworksSettingsPage::displayNetwork(NetworkId id)
             _cid->enableEditSsl(true);
             connect(_cid, &CertIdentity::sslSettingsUpdated, this, &NetworksSettingsPage::sslUpdated);
         }
-#endif
 
         ui.identityList->setCurrentIndex(ui.identityList->findData(info.identity.toInt()));
         ui.serverList->clear();
@@ -635,12 +628,10 @@ void NetworksSettingsPage::displayNetwork(NetworkId id)
     }
     else {
         // just clear widgets
-#ifdef HAVE_SSL
         if (_cid) {
             disconnect(_cid, &CertIdentity::sslSettingsUpdated, this, &NetworksSettingsPage::sslUpdated);
             delete _cid;
         }
-#endif
         ui.identityList->setCurrentIndex(-1);
         ui.serverList->clear();
         ui.performEdit->clear();
@@ -737,7 +728,6 @@ void NetworksSettingsPage::setSASLStatus(const CapSupportStatus saslStatus)
     }
 }
 
-#ifdef HAVE_SSL
 void NetworksSettingsPage::sslUpdated()
 {
     if (_cid && !_cid->sslKey().isNull()) {
@@ -760,7 +750,6 @@ void NetworksSettingsPage::sslUpdated()
         ui.saslExtInfo->setHidden(true);
     }
 }
-#endif
 
 /*** Network list ***/
 
index 1deee26..33e474c 100644 (file)
@@ -92,9 +92,7 @@ private slots:
      */
     void clientNetworkCapsUpdated();
 
-#ifdef HAVE_SSL
     void sslUpdated();
-#endif
 
     void on_networkList_itemSelectionChanged();
     void on_addNetwork_clicked();
@@ -134,9 +132,7 @@ private:
     NetworkId currentId;
     QHash<NetworkId, NetworkInfo> networkInfos;
     bool _ignoreWidgetChanges{false};
-#ifdef HAVE_SSL
     CertIdentity* _cid{nullptr};
-#endif
 
     QIcon connectedIcon, connectingIcon, disconnectedIcon;