mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
Load WebUI certificate & key from file path
This allow users to update certificate & key more easily, i.e. without the need to import them into qbt. Closes #6675, #7547, #8315, #8564.
This commit is contained in:
parent
48d358872f
commit
5cdb3b6a2d
12 changed files with 212 additions and 277 deletions
|
@ -31,13 +31,9 @@
|
|||
#ifndef HTTP_SERVER_H
|
||||
#define HTTP_SERVER_H
|
||||
|
||||
#include <QTcpServer>
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
#include <QSslCertificate>
|
||||
#include <QSslCipher>
|
||||
#include <QSslKey>
|
||||
#endif
|
||||
#include <QTcpServer>
|
||||
|
||||
namespace Http
|
||||
{
|
||||
|
@ -50,13 +46,10 @@ namespace Http
|
|||
Q_DISABLE_COPY(Server)
|
||||
|
||||
public:
|
||||
Server(IRequestHandler *requestHandler, QObject *parent = nullptr);
|
||||
~Server();
|
||||
explicit Server(IRequestHandler *requestHandler, QObject *parent = nullptr);
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
bool setupHttps(const QByteArray &certificates, const QByteArray &key);
|
||||
bool setupHttps(const QByteArray &certificates, const QByteArray &privateKey);
|
||||
void disableHttps();
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
void dropTimedOutConnection();
|
||||
|
@ -67,13 +60,9 @@ namespace Http
|
|||
IRequestHandler *m_requestHandler;
|
||||
QList<Connection *> m_connections; // for tracking persistent connections
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
QList<QSslCipher> safeCipherList() const;
|
||||
|
||||
bool m_https;
|
||||
QList<QSslCertificate> m_certificates;
|
||||
QSslKey m_key;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue