/***************************************************************************
- * Copyright (C) 2005-2020 by the Quassel Project *
+ * Copyright (C) 2005-2022 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#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"
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);
if (socket()) {
if (isLocal())
return true;
-#ifdef HAVE_SSL
auto* sslSocket = qobject_cast<QSslSocket*>(socket());
if (sslSocket && sslSocket->isEncrypted())
return true;
-#endif
}
return false;
}