mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -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
|
@ -60,7 +60,6 @@ class OptionsDialog : public QDialog
|
|||
Q_OBJECT
|
||||
using ThisType = OptionsDialog;
|
||||
|
||||
private:
|
||||
enum Tabs
|
||||
{
|
||||
TAB_UI,
|
||||
|
@ -73,6 +72,12 @@ private:
|
|||
TAB_ADVANCED
|
||||
};
|
||||
|
||||
enum class ShowError
|
||||
{
|
||||
NotShow,
|
||||
Show
|
||||
};
|
||||
|
||||
public:
|
||||
// Constructor / Destructor
|
||||
OptionsDialog(QWidget *parent = nullptr);
|
||||
|
@ -102,10 +107,10 @@ private slots:
|
|||
void on_randomButton_clicked();
|
||||
void on_addScanFolderButton_clicked();
|
||||
void on_removeScanFolderButton_clicked();
|
||||
void on_btnWebUiCrt_clicked();
|
||||
void on_btnWebUiKey_clicked();
|
||||
void on_registerDNSBtn_clicked();
|
||||
void setLocale(const QString &localeStr);
|
||||
void webUIHttpsCertChanged(const QString &path, ShowError showError);
|
||||
void webUIHttpsKeyChanged(const QString &path, ShowError showError);
|
||||
|
||||
private:
|
||||
// Methods
|
||||
|
@ -164,17 +169,14 @@ private:
|
|||
int getMaxActiveDownloads() const;
|
||||
int getMaxActiveUploads() const;
|
||||
int getMaxActiveTorrents() const;
|
||||
// WebUI
|
||||
bool isWebUiEnabled() const;
|
||||
QString webUiUsername() const;
|
||||
QString webUiPassword() const;
|
||||
// WebUI SSL Cert / key
|
||||
bool setSslKey(const QByteArray &key);
|
||||
bool setSslCertificate(const QByteArray &cert);
|
||||
bool schedTimesOk();
|
||||
bool webUIAuthenticationOk();
|
||||
bool isAlternativeWebUIPathValid();
|
||||
|
||||
QByteArray m_sslCert, m_sslKey;
|
||||
bool schedTimesOk();
|
||||
|
||||
Ui::OptionsDialog *m_ui;
|
||||
QAbstractButton *m_applyButton;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue