From 1a5c1814a0c52f6f35e65c7033b2f896bf1188e3 Mon Sep 17 00:00:00 2001 From: Janne Koschinski Date: Mon, 5 Aug 2019 19:34:45 +0200 Subject: [PATCH] ssl: Remove fallback code for missing SSL support --- src/client/client.cpp | 2 -- src/client/clientauthhandler.cpp | 33 +------------------ src/client/clientauthhandler.h | 4 --- src/client/clientidentity.cpp | 5 --- src/client/clientidentity.h | 8 ----- src/client/clientsettings.cpp | 4 +-- src/client/coreconnection.cpp | 2 -- src/client/coreconnection.h | 9 +---- src/common/identity.h | 8 ++--- src/common/quassel.cpp | 2 -- src/common/remotepeer.cpp | 11 +------ src/common/signalproxy.cpp | 5 +-- src/core/core.cpp | 11 ------- src/core/core.h | 15 ++------- src/core/coreauthhandler.cpp | 8 +---- src/core/coreauthhandler.h | 2 -- src/core/coreidentity.cpp | 20 ----------- src/core/coreidentity.h | 18 ++-------- src/core/corenetwork.cpp | 17 ---------- src/core/corenetwork.h | 15 ++------- src/core/coresession.cpp | 6 ---- src/core/coresessioneventprocessor.cpp | 4 --- src/core/postgresqlstorage.cpp | 12 ------- src/core/sqlitestorage.cpp | 12 ------- src/core/sslserver.cpp | 9 +---- src/core/sslserver.h | 16 ++++----- src/qtui/mainwin.cpp | 14 ++------ src/qtui/mainwin.h | 2 -- .../settingspages/identitiessettingspage.cpp | 19 ----------- .../settingspages/identitiessettingspage.h | 4 --- src/qtui/settingspages/identityeditwidget.cpp | 9 ----- src/qtui/settingspages/identityeditwidget.h | 25 ++++---------- .../settingspages/networkssettingspage.cpp | 11 ------- src/qtui/settingspages/networkssettingspage.h | 4 --- 34 files changed, 29 insertions(+), 317 deletions(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index df30c895..c409218e 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -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); } diff --git a/src/client/clientauthhandler.cpp b/src/client/clientauthhandler.cpp index d278b890..44743ae8 100644 --- a/src/client/clientauthhandler.cpp +++ b/src/client/clientauthhandler.cpp @@ -21,12 +21,7 @@ #include "clientauthhandler.h" #include - -#ifdef HAVE_SSL -# include -#else -# include -#endif +#include #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 */ diff --git a/src/client/clientauthhandler.h b/src/client/clientauthhandler.h index 4107cb60..b02c0c82 100644 --- a/src/client/clientauthhandler.h +++ b/src/client/clientauthhandler.h @@ -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); diff --git a/src/client/clientidentity.cpp b/src/client/clientidentity.cpp index 45b81765..6e63ac4d 100644 --- a/src/client/clientidentity.cpp +++ b/src/client/clientidentity.cpp @@ -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 diff --git a/src/client/clientidentity.h b/src/client/clientidentity.h index 7a166b36..864538f5 100644 --- a/src/client/clientidentity.h +++ b/src/client/clientidentity.h @@ -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 diff --git a/src/client/clientsettings.cpp b/src/client/clientsettings.cpp index d44ad6a8..17c65f2c 100644 --- a/src/client/clientsettings.cpp +++ b/src/client/clientsettings.cpp @@ -23,10 +23,8 @@ #include #include +#include #include -#ifdef HAVE_SSL -# include -#endif #include "client.h" #include "quassel.h" diff --git a/src/client/coreconnection.cpp b/src/client/coreconnection.cpp index 2d33a300..d48b5c8a 100644 --- a/src/client/coreconnection.cpp +++ b/src/client/coreconnection.cpp @@ -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); diff --git a/src/client/coreconnection.h b/src/client/coreconnection.h index 8fb074a1..cff2fe0d 100644 --- a/src/client/coreconnection.h +++ b/src/client/coreconnection.h @@ -24,14 +24,9 @@ #include #include +#include #include -#ifdef HAVE_SSL -# include -#else -# include -#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(); diff --git a/src/common/identity.h b/src/common/identity.h index 6deb916c..08fdcd62 100644 --- a/src/common/identity.h +++ b/src/common/identity.h @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include @@ -160,10 +162,6 @@ QDataStream& operator>>(QDataStream& in, Identity& identity); Q_DECLARE_METATYPE(Identity) -#ifdef HAVE_SSL -# include -# include - 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 diff --git a/src/common/quassel.cpp b/src/common/quassel.cpp index 00600c05..dd08bd5d 100644 --- a/src/common/quassel.cpp +++ b/src/common/quassel.cpp @@ -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("
[,...]"), "::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("
[,...]"), "::1,127.0.0.1"} -#endif }; } diff --git a/src/common/remotepeer.cpp b/src/common/remotepeer.cpp index d234a733..78a746d5 100644 --- a/src/common/remotepeer.cpp +++ b/src/common/remotepeer.cpp @@ -23,14 +23,9 @@ #include #include +#include #include -#ifdef HAVE_SSL -# include -#else -# include -#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::error), this, &RemotePeer::onSocketError); connect(socket, &QAbstractSocket::disconnected, this, &Peer::disconnected); -#ifdef HAVE_SSL auto* sslSocket = qobject_cast(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(socket()); if (sslSocket && sslSocket->isEncrypted()) return true; -#endif } return false; } diff --git a/src/common/signalproxy.cpp b/src/common/signalproxy.cpp index bfaa78ea..963092c6 100644 --- a/src/common/signalproxy.cpp +++ b/src/common/signalproxy.cpp @@ -25,12 +25,9 @@ #include #include #include +#include #include -#ifdef HAVE_SSL -# include -#endif - #include "peer.h" #include "protocol.h" #include "signalproxy.h" diff --git a/src/core/core.cpp b/src/core/core.cpp index a2b7283e..66e2e62a 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -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(&instance()->_server); return sslServer && sslServer->isCertValid(); -#else - return false; -#endif } bool Core::reloadCerts() { -#ifdef HAVE_SSL auto* sslServerv4 = qobject_cast(&_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() diff --git a/src/core/core.h b/src/core/core.h index d2b8092c..4428f023 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -27,19 +27,11 @@ #include #include +#include #include #include #include -#ifdef HAVE_SSL -# include - -# include "sslserver.h" -#else -# include -# include -#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}; diff --git a/src/core/coreauthhandler.cpp b/src/core/coreauthhandler.cpp index 8d39d06d..872c6d1e 100644 --- a/src/core/coreauthhandler.cpp +++ b/src/core/coreauthhandler.cpp @@ -22,9 +22,7 @@ #include -#ifdef HAVE_SSL -# include -#endif +#include #include "core.h" @@ -336,7 +334,6 @@ bool CoreAuthHandler::isLocal() const void CoreAuthHandler::startSsl() { -#ifdef HAVE_SSL auto* sslSocket = qobject_cast(socket()); Q_ASSERT(sslSocket); @@ -344,14 +341,11 @@ void CoreAuthHandler::startSsl() connect(sslSocket, selectOverload&>(&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(socket()); Q_ASSERT(sslSocket); sslSocket->ignoreSslErrors(); } -#endif diff --git a/src/core/coreauthhandler.h b/src/core/coreauthhandler.h index db54bec1..6471a3e0 100644 --- a/src/core/coreauthhandler.h +++ b/src/core/coreauthhandler.h @@ -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); diff --git a/src/core/coreidentity.cpp b/src/core/coreidentity.cpp index e567c905..a508d4b2 100644 --- a/src/core/coreidentity.cpp +++ b/src/core/coreidentity.cpp @@ -24,51 +24,36 @@ 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 diff --git a/src/core/coreidentity.h b/src/core/coreidentity.h index 0265881c..b2ba09f1 100644 --- a/src/core/coreidentity.h +++ b/src/core/coreidentity.h @@ -24,17 +24,14 @@ #include "identity.h" -#ifdef HAVE_SSL -# include -# include -#endif // HAVE_SSL +#include +#include 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 diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 0dfb33b7..9a8c6361 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -84,10 +84,8 @@ CoreNetwork::CoreNetwork(const NetworkId& networkid, CoreSession* session) connect(&socket, selectOverload(&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&>(&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& sslErrors) { Server server = usedServer(); @@ -1519,8 +1504,6 @@ void CoreNetwork::onSslErrors(const QList& sslErrors) } } -#endif // HAVE_SSL - void CoreNetwork::checkTokenBucket() { if (_skipMessageRates) { diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 510b5fbc..456f8472 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -22,15 +22,10 @@ #include +#include +#include #include -#ifdef HAVE_SSL -# include -# include -#else -# include -#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& 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; diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index 3c485f74..6c856054 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -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()) diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index 3bc78110..ec988ff5 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -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) diff --git a/src/core/postgresqlstorage.cpp b/src/core/postgresqlstorage.cpp index 90b0fdbb..88bc86ce 100644 --- a/src/core/postgresqlstorage.cpp +++ b/src/core/postgresqlstorage.cpp @@ -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 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 nicks; diff --git a/src/core/sqlitestorage.cpp b/src/core/sqlitestorage.cpp index dc5b5467..9455a61c 100644 --- a/src/core/sqlitestorage.cpp +++ b/src/core/sqlitestorage.cpp @@ -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 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 nicks; diff --git a/src/core/sslserver.cpp b/src/core/sslserver.cpp index 92ac6fe7..9fceddd8 100644 --- a/src/core/sslserver.cpp +++ b/src/core/sslserver.cpp @@ -20,17 +20,12 @@ #include "sslserver.h" -#ifdef HAVE_SSL -# include -#endif - #include +#include #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 diff --git a/src/core/sslserver.h b/src/core/sslserver.h index 7449754f..d91f28cf 100644 --- a/src/core/sslserver.h +++ b/src/core/sslserver.h @@ -20,15 +20,13 @@ #pragma once -#ifdef HAVE_SSL +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include - -# include "metricsserver.h" +#include "metricsserver.h" class SslServer : public QTcpServer { @@ -87,5 +85,3 @@ private: QDateTime _certificateExpires; }; - -#endif // HAVE_SSL diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 5800ea79..dae50296 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -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" @@ -112,10 +113,6 @@ # include "snorenotificationbackend.h" #endif -#ifdef HAVE_SSL -# include "sslinfodlg.h" -#endif - #ifdef HAVE_NOTIFICATION_CENTER # include "osxnotificationbackend.h" #endif @@ -124,8 +121,6 @@ # include "dockmanagernotificationbackend.h" #endif -#include - #include "settingspages/aliasessettingspage.h" #include "settingspages/appearancesettingspage.h" #include "settingspages/backlogsettingspage.h" @@ -136,6 +131,7 @@ #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 = "
    "; @@ -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); diff --git a/src/qtui/mainwin.h b/src/qtui/mainwin.h index 314b72e2..fbcd553a 100644 --- a/src/qtui/mainwin.h +++ b/src/qtui/mainwin.h @@ -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(); diff --git a/src/qtui/settingspages/identitiessettingspage.cpp b/src/qtui/settingspages/identitiessettingspage.cpp index 140d6cde..b5589dc9 100644 --- a/src/qtui/settingspages/identitiessettingspage.cpp +++ b/src/qtui/settingspages/identitiessettingspage.cpp @@ -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& 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); diff --git a/src/qtui/settingspages/identitiessettingspage.h b/src/qtui/settingspages/identitiessettingspage.h index 3786aa45..11f4e438 100644 --- a/src/qtui/settingspages/identitiessettingspage.h +++ b/src/qtui/settingspages/identitiessettingspage.h @@ -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(); }; diff --git a/src/qtui/settingspages/identityeditwidget.cpp b/src/qtui/settingspages/identityeditwidget.cpp index 31c87589..dadb09ce 100644 --- a/src/qtui/settingspages/identityeditwidget.cpp +++ b/src/qtui/settingspages/identityeditwidget.cpp @@ -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 diff --git a/src/qtui/settingspages/identityeditwidget.h b/src/qtui/settingspages/identityeditwidget.h index f61a5221..684bdd4c 100644 --- a/src/qtui/settingspages/identityeditwidget.h +++ b/src/qtui/settingspages/identityeditwidget.h @@ -18,19 +18,16 @@ * 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 -# include -#endif +#include +#include #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 diff --git a/src/qtui/settingspages/networkssettingspage.cpp b/src/qtui/settingspages/networkssettingspage.cpp index 592c1978..6a36d0ee 100644 --- a/src/qtui/settingspages/networkssettingspage.cpp +++ b/src/qtui/settingspages/networkssettingspage.cpp @@ -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 ***/ diff --git a/src/qtui/settingspages/networkssettingspage.h b/src/qtui/settingspages/networkssettingspage.h index 1deee26e..33e474cd 100644 --- a/src/qtui/settingspages/networkssettingspage.h +++ b/src/qtui/settingspages/networkssettingspage.h @@ -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 networkInfos; bool _ignoreWidgetChanges{false}; -#ifdef HAVE_SSL CertIdentity* _cid{nullptr}; -#endif QIcon connectedIcon, connectingIcon, disconnectedIcon; -- 2.20.1