fix: local-fingerprint generation - #8408
Conversation
|
Ah, oops, yeah I see the bug on master: |
this is what it fixes. |
I know :) Simply documenting the bug for posterity since you didn't link it to a bug report. I noticed that the fingerprint is generated twice. That seems unintentional and an indication of flawed logic. Edit: It's already in FYI I changed the code on my local branch a bit to improve the debug logging, up to you if you want to use it: diff --git a/src/lib/gui/tls/TlsCertificate.cpp b/src/lib/gui/tls/TlsCertificate.cpp
index 1fa0b4fa5..2113f468a 100644
--- a/src/lib/gui/tls/TlsCertificate.cpp
+++ b/src/lib/gui/tls/TlsCertificate.cpp
@@ -55,9 +55,10 @@ bool TlsCertificate::generateFingerprint(const QString &certificateFilename)
deskflow::FingerprintDatabase db;
db.addTrusted(deskflow::pemFileCertFingerprint(certPath, deskflow::FingerprintType::SHA1));
db.addTrusted(deskflow::pemFileCertFingerprint(certPath, deskflow::FingerprintType::SHA256));
- db.write(Settings::tlsLocalDb().toStdString());
- qDebug("tls fingerprint generated");
+ const auto path = Settings::tlsLocalDb();
+ db.write(path.toStdString());
+ qDebug().noquote() << "tls fingerprint generated:" << path;
return true;
} catch (const std::exception &e) {
qCritical() << "failed to find tls fingerprint: " << e.what(); |
tls/local-fingerprintspath was not correct fixed that to generate the file correctly