mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06: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:
@@ -33,6 +33,8 @@
|
||||
#include <QList>
|
||||
#include <QPair>
|
||||
|
||||
class QSslCertificate;
|
||||
class QSslKey;
|
||||
class QString;
|
||||
|
||||
namespace Utils
|
||||
@@ -47,6 +49,12 @@ namespace Utils
|
||||
bool isLoopbackAddress(const QHostAddress &addr);
|
||||
bool isIPInRange(const QHostAddress &addr, const QList<Subnet> &subnets);
|
||||
QString subnetToString(const Subnet &subnet);
|
||||
|
||||
const int MAX_SSL_FILE_SIZE = 1024 * 1024;
|
||||
QList<QSslCertificate> loadSSLCertificate(const QByteArray &data);
|
||||
bool isSSLCertificatesValid(const QByteArray &data);
|
||||
QSslKey loadSSLKey(const QByteArray &data);
|
||||
bool isSSLKeyValid(const QByteArray &data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user