mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-29 21:33:13 -08:00
Fix detection of hardware keys in keepassxc-cli
* Split calls to finding hardware keys into sync and async methods. This has the side effect of simplifying the code. * Check for keys before performing challenge/response if no keys have been found previously. * Correct timeout of user interaction message to interact with the hardware key. * Correct error in TestCli::testYubiKeyOption
This commit is contained in:
1 parent
7d7c635423
commit
48a3fd8e3c
15 files changed
+203
-220
No files matched your search
+3
-3
@@ -167,14 +167,14 @@ namespace Utils
|
||||
}
|
||||
}
|
||||
|
||||
auto conn = QObject::connect(YubiKey::instance(), &YubiKey::userInteractionRequest, [&] {
|
||||
err << QObject::tr("Please present or touch your YubiKey to continue…") << "\n\n" << flush;
|
||||
QObject::connect(YubiKey::instance(), &YubiKey::userInteractionRequest, [&] {
|
||||
err << QObject::tr("Please present or touch your YubiKey to continue.") << "\n\n" << flush;
|
||||
});
|
||||
|
||||
auto key = QSharedPointer<ChallengeResponseKey>(new ChallengeResponseKey({serial, slot}));
|
||||
compositeKey->addChallengeResponseKey(key);
|
||||
|
||||
QObject::disconnect(conn);
|
||||
YubiKey::instance()->findValidKeys();
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(yubiKeySlot);
|
||||
|
||||
Reference in new issue
Block a user