Fixup macos

This commit is contained in:
Jonathan White 2024-12-09 00:19:44 -05:00
parent 8e4cba3e9b
commit 3766f17455
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01
3 changed files with 7 additions and 8 deletions

View File

@ -42,7 +42,7 @@ QuickUnlockManager::QuickUnlockManager()
{ {
// Create the native interface based on the platform // Create the native interface based on the platform
#if defined(Q_OS_MACOS) #if defined(Q_OS_MACOS)
m_nativeInterface.reset(new TouchId()); m_nativeInterface.reset(new TouchID());
#elif defined(Q_CC_MSVC) #elif defined(Q_CC_MSVC)
m_nativeInterface.reset(new WindowsHello()); m_nativeInterface.reset(new WindowsHello());
#elif defined(Q_OS_LINUX) #elif defined(Q_OS_LINUX)

View File

@ -23,7 +23,7 @@
class QuickUnlockInterface class QuickUnlockInterface
{ {
Q_DISABLE_COPY_MOVE(QuickUnlockInterface) Q_DISABLE_COPY(QuickUnlockInterface)
public: public:
QuickUnlockInterface() = default; QuickUnlockInterface() = default;
@ -44,7 +44,7 @@ public:
class QuickUnlockManager final class QuickUnlockManager final
{ {
Q_DISABLE_COPY_MOVE(QuickUnlockManager) Q_DISABLE_COPY(QuickUnlockManager)
public: public:
QuickUnlockManager(); QuickUnlockManager();

View File

@ -85,6 +85,7 @@ QString TouchID::errorString() const
void TouchID::reset() void TouchID::reset()
{ {
// TODO: Clear all credentials associated with KeePassXC
m_encryptedMasterKeys.clear(); m_encryptedMasterKeys.clear();
} }
@ -179,15 +180,13 @@ bool TouchID::setKey(const QUuid& dbUuid, const QByteArray& key, const bool igno
CFRelease(attributes); CFRelease(attributes);
// Cleanse the key information from the memory // Cleanse the key information from the memory
Botan::secure_scrub_memory(randomKey.data(), randomKey.size());
Botan::secure_scrub_memory(randomIV.data(), randomIV.size());
if (status != errSecSuccess) { if (status != errSecSuccess) {
return false; return false;
} }
// memorize which database the stored key is for // memorize which database the stored key is for
m_encryptedMasterKeys.insert(dbUuid, encryptedMasterKey); // TODO: Do we need to store the db uuid's to do a full reset later?
//m_encryptedMasterKeys.insert(dbUuid, encryptedMasterKey);
debug("TouchID::setKey - Success!"); debug("TouchID::setKey - Success!");
return true; return true;
} }