diff --git a/src/quickunlock/QuickUnlockInterface.cpp b/src/quickunlock/QuickUnlockInterface.cpp index 4b46f7797..2e55dd41f 100644 --- a/src/quickunlock/QuickUnlockInterface.cpp +++ b/src/quickunlock/QuickUnlockInterface.cpp @@ -42,7 +42,7 @@ QuickUnlockManager::QuickUnlockManager() { // Create the native interface based on the platform #if defined(Q_OS_MACOS) - m_nativeInterface.reset(new TouchId()); + m_nativeInterface.reset(new TouchID()); #elif defined(Q_CC_MSVC) m_nativeInterface.reset(new WindowsHello()); #elif defined(Q_OS_LINUX) diff --git a/src/quickunlock/QuickUnlockInterface.h b/src/quickunlock/QuickUnlockInterface.h index 7908f2e59..df55c01a8 100644 --- a/src/quickunlock/QuickUnlockInterface.h +++ b/src/quickunlock/QuickUnlockInterface.h @@ -23,7 +23,7 @@ class QuickUnlockInterface { - Q_DISABLE_COPY_MOVE(QuickUnlockInterface) + Q_DISABLE_COPY(QuickUnlockInterface) public: QuickUnlockInterface() = default; @@ -44,7 +44,7 @@ public: class QuickUnlockManager final { - Q_DISABLE_COPY_MOVE(QuickUnlockManager) + Q_DISABLE_COPY(QuickUnlockManager) public: QuickUnlockManager(); diff --git a/src/quickunlock/TouchID.mm b/src/quickunlock/TouchID.mm index 0e5d6cc6f..44be213aa 100644 --- a/src/quickunlock/TouchID.mm +++ b/src/quickunlock/TouchID.mm @@ -85,6 +85,7 @@ QString TouchID::errorString() const void TouchID::reset() { + // TODO: Clear all credentials associated with KeePassXC m_encryptedMasterKeys.clear(); } @@ -177,17 +178,15 @@ bool TouchID::setKey(const QUuid& dbUuid, const QByteArray& key, const bool igno CFRelease(sacObject); CFRelease(attributes); - - // Cleanse the key information from the memory - Botan::secure_scrub_memory(randomKey.data(), randomKey.size()); - Botan::secure_scrub_memory(randomIV.data(), randomIV.size()); + // Cleanse the key information from the memory if (status != errSecSuccess) { return false; } // 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!"); return true; }