refactor: use const for tlsDb expected size
This commit is contained in:
@ -168,7 +168,7 @@ MainWindow::MainWindow(ConfigScopes &configScopes, AppConfig &appConfig)
|
||||
|
||||
deskflow::FingerprintDatabase db;
|
||||
db.read(localPath);
|
||||
if (db.fingerprints().size() != 2) {
|
||||
if (db.fingerprints().size() != kTlsDbSize) {
|
||||
regenerateLocalFingerprints();
|
||||
}
|
||||
}
|
||||
@ -495,7 +495,7 @@ void MainWindow::showMyFingerprint()
|
||||
|
||||
deskflow::FingerprintDatabase db;
|
||||
db.read(localPath);
|
||||
if (db.fingerprints().size() != 2) {
|
||||
if (db.fingerprints().size() != kTlsDbSize) {
|
||||
if (regenerateLocalFingerprints())
|
||||
showMyFingerprint();
|
||||
return;
|
||||
|
||||
@ -28,6 +28,7 @@ const auto kDebugBuild = false;
|
||||
|
||||
|
||||
const auto kSslDir = "tls";
|
||||
const auto kTlsDbSize = 2;
|
||||
const auto kCertificateFilename = "@CMAKE_PROJECT_NAME@.pem";
|
||||
const auto kFingerprintLocalFilename = "local-fingerprint";
|
||||
const auto kFingerprintTrustedServersFilename = "trusted-servers";
|
||||
|
||||
Reference in New Issue
Block a user