refactor: mainwindow force regen of local prints if tls is enabled with a sha256 key
This commit is contained in:
parent
65eed64f04
commit
eb19547b45
1 changed files with 15 additions and 0 deletions
|
|
@ -154,6 +154,21 @@ MainWindow::MainWindow(ConfigScopes &configScopes, AppConfig &appConfig)
|
|||
qDebug().noquote() << "active settings path:" << m_configScopes.activeFilePath();
|
||||
|
||||
updateSize();
|
||||
|
||||
// Force generation of SHA256 for the localhost
|
||||
if (m_appConfig.tlsEnabled()) {
|
||||
auto localPath = QStringLiteral("%1/%2").arg(getTlsPath(), kFingerprintLocalFilename).toStdString();
|
||||
if (!QFile::exists(QString::fromStdString(localPath))) {
|
||||
regenerateLocalFingerprints();
|
||||
return;
|
||||
}
|
||||
|
||||
deskflow::FingerprintDatabase db;
|
||||
db.read(localPath);
|
||||
if (db.fingerprints().size() != 2) {
|
||||
regenerateLocalFingerprints();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
|
|
|||
Loading…
Reference in a new issue