File indexing completed on 2024-11-24 04:44:44
0001 /* 0002 SPDX-FileCopyrightText: 2013 Christian Mollekopf <mollekopf@kolabsys.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QSslSocket> 0010 #include <QTcpServer> 0011 0012 class SslServer : public QTcpServer 0013 { 0014 Q_OBJECT 0015 public: 0016 SslServer(QSsl::SslProtocol, bool waitForStartTls); 0017 void incomingConnection(qintptr handle) override; 0018 0019 private Q_SLOTS: 0020 void sslErrors(const QList<QSslError> &errors); 0021 void error(QAbstractSocket::SocketError); 0022 0023 private: 0024 QSsl::SslProtocol mProtocol; 0025 QSslSocket mSocket; 0026 bool mWaitForStartTls = false; 0027 };