X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fsslserver.h;h=8e91ddd317c7fa6f965e7458de85c5bbb9ee6893;hb=d030c159599a22c9023b8f0d34909d3277707f52;hp=2e18aa1c4705090010e11ec931938d965953d370;hpb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;p=quassel.git diff --git a/src/core/sslserver.h b/src/core/sslserver.h index 2e18aa1c..8e91ddd3 100644 --- a/src/core/sslserver.h +++ b/src/core/sslserver.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,24 +22,24 @@ #ifdef HAVE_SSL -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include class SslServer : public QTcpServer { Q_OBJECT public: - SslServer(QObject *parent = nullptr); + SslServer(QObject* parent = nullptr); bool hasPendingConnections() const override { return !_pendingConnections.isEmpty(); } - QTcpSocket *nextPendingConnection() override; + QTcpSocket* nextPendingConnection() override; - const QSslCertificate &certificate() const { return _cert; } - const QSslKey &key() const { return _key; } + const QSslCertificate& certificate() const { return _cert; } + const QSslKey& key() const { return _key; } bool isCertValid() const { return _isCertValid; } /** @@ -55,7 +55,7 @@ public: protected: void incomingConnection(qintptr socketDescriptor) override; - bool setCertificate(const QString &path, const QString &keyPath); + bool setCertificate(const QString& path, const QString& keyPath); private: /** @@ -67,18 +67,17 @@ private: * @return True if certificates loaded successfully, otherwise false. */ bool loadCerts(); - QSslKey loadKey(QFile *keyFile); + QSslKey loadKey(QFile* keyFile); - QLinkedList _pendingConnections; + QLinkedList _pendingConnections; QSslCertificate _cert; QSslKey _key; QList _ca; - bool _isCertValid; + bool _isCertValid{false}; // Used when reloading certificates later - QString _sslCertPath; /// Path to the certificate file - QString _sslKeyPath; /// Path to the private key file (may be in same file as above) + QString _sslCertPath; /// Path to the certificate file + QString _sslKeyPath; /// Path to the private key file (may be in same file as above) }; - -#endif //HAVE_SSL +#endif // HAVE_SSL