refactor: use const for tlsDb expected size
This commit is contained in:
parent
d8e311fe59
commit
5288546231
2 changed files with 3 additions and 2 deletions
|
|
@ -168,7 +168,7 @@ MainWindow::MainWindow(ConfigScopes &configScopes, AppConfig &appConfig)
|
||||||
|
|
||||||
deskflow::FingerprintDatabase db;
|
deskflow::FingerprintDatabase db;
|
||||||
db.read(localPath);
|
db.read(localPath);
|
||||||
if (db.fingerprints().size() != 2) {
|
if (db.fingerprints().size() != kTlsDbSize) {
|
||||||
regenerateLocalFingerprints();
|
regenerateLocalFingerprints();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -495,7 +495,7 @@ void MainWindow::showMyFingerprint()
|
||||||
|
|
||||||
deskflow::FingerprintDatabase db;
|
deskflow::FingerprintDatabase db;
|
||||||
db.read(localPath);
|
db.read(localPath);
|
||||||
if (db.fingerprints().size() != 2) {
|
if (db.fingerprints().size() != kTlsDbSize) {
|
||||||
if (regenerateLocalFingerprints())
|
if (regenerateLocalFingerprints())
|
||||||
showMyFingerprint();
|
showMyFingerprint();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ const auto kDebugBuild = false;
|
||||||
|
|
||||||
|
|
||||||
const auto kSslDir = "tls";
|
const auto kSslDir = "tls";
|
||||||
|
const auto kTlsDbSize = 2;
|
||||||
const auto kCertificateFilename = "@CMAKE_PROJECT_NAME@.pem";
|
const auto kCertificateFilename = "@CMAKE_PROJECT_NAME@.pem";
|
||||||
const auto kFingerprintLocalFilename = "local-fingerprint";
|
const auto kFingerprintLocalFilename = "local-fingerprint";
|
||||||
const auto kFingerprintTrustedServersFilename = "trusted-servers";
|
const auto kFingerprintTrustedServersFilename = "trusted-servers";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue