Configure HTTPS certificate via wizard
This commit is contained in:
parent
669923dbb6
commit
c811b06d6b
|
@ -665,6 +665,7 @@ void Connection::addConfigFromWizard(const Data::SyncthingConfig &config)
|
||||||
primary.password.clear();
|
primary.password.clear();
|
||||||
primary.apiKey = apiKey;
|
primary.apiKey = apiKey;
|
||||||
primary.autoConnect = true; // ensure the connection is actually established when applying
|
primary.autoConnect = true; // ensure the connection is actually established when applying
|
||||||
|
primary.httpsCertPath = Data::SyncthingConfig::locateHttpsCertificate();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Settings
|
} // namespace Settings
|
||||||
|
|
|
@ -64,8 +64,12 @@ void SetupDetection::restoreConfig()
|
||||||
|
|
||||||
void SetupDetection::initConnection()
|
void SetupDetection::initConnection()
|
||||||
{
|
{
|
||||||
connection.setSyncthingUrl(config.syncthingUrl());
|
auto settings = Data::SyncthingConnectionSettings();
|
||||||
connection.setApiKey(config.guiApiKey.toLocal8Bit());
|
settings.syncthingUrl = config.syncthingUrl();
|
||||||
|
settings.apiKey = config.guiApiKey.toLocal8Bit();
|
||||||
|
settings.httpsCertPath = certPath;
|
||||||
|
settings.loadHttpsCert();
|
||||||
|
connection.applySettings(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SetupDetection::hasConfig() const
|
bool SetupDetection::hasConfig() const
|
||||||
|
|
Loading…
Reference in New Issue