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
#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)

View File

@ -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();

View File

@ -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;
}