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.apiKey = apiKey;
|
||||
primary.autoConnect = true; // ensure the connection is actually established when applying
|
||||
primary.httpsCertPath = Data::SyncthingConfig::locateHttpsCertificate();
|
||||
}
|
||||
|
||||
} // namespace Settings
|
||||
|
|
|
@ -64,8 +64,12 @@ void SetupDetection::restoreConfig()
|
|||
|
||||
void SetupDetection::initConnection()
|
||||
{
|
||||
connection.setSyncthingUrl(config.syncthingUrl());
|
||||
connection.setApiKey(config.guiApiKey.toLocal8Bit());
|
||||
auto settings = Data::SyncthingConnectionSettings();
|
||||
settings.syncthingUrl = config.syncthingUrl();
|
||||
settings.apiKey = config.guiApiKey.toLocal8Bit();
|
||||
settings.httpsCertPath = certPath;
|
||||
settings.loadHttpsCert();
|
||||
connection.applySettings(settings);
|
||||
}
|
||||
|
||||
bool SetupDetection::hasConfig() const
|
||||
|
|
Loading…
Reference in New Issue