mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-24 15:25:31 -04:00
Show message when user needs to touch their YubiKey (still buggy when using multiple databases)
This commit is contained in:
parent
44ac7d152b
commit
d6c48a5cf1
11 changed files with 75 additions and 16 deletions
|
@ -214,6 +214,8 @@ CompositeKey DatabaseOpenWidget::databaseKey()
|
|||
bool blocking = i & true;
|
||||
int slot = i >> 1;
|
||||
auto key = QSharedPointer<YkChallengeResponseKey>(new YkChallengeResponseKey(slot, blocking));
|
||||
connect(key.data(), SIGNAL(userInteractionRequired()), SLOT(showYubiKeyPopup()));
|
||||
connect(key.data(), SIGNAL(userConfirmed()), SLOT(hideYubiKeyPopup()));
|
||||
masterKey.addChallengeResponseKey(key);
|
||||
}
|
||||
#endif
|
||||
|
@ -264,6 +266,18 @@ void DatabaseOpenWidget::pollYubikey()
|
|||
QtConcurrent::run(YubiKey::instance(), &YubiKey::detect);
|
||||
}
|
||||
|
||||
void DatabaseOpenWidget::showYubiKeyPopup()
|
||||
{
|
||||
m_ui->messageWidget->showMessage(tr("Please touch the button on your YubiKey!"), MessageWidget::Information);
|
||||
KEEPASSXC_MAIN_WINDOW->setEnabled(false);
|
||||
}
|
||||
|
||||
void DatabaseOpenWidget::hideYubiKeyPopup()
|
||||
{
|
||||
m_ui->messageWidget->hideMessage();
|
||||
KEEPASSXC_MAIN_WINDOW->setEnabled(true);
|
||||
}
|
||||
|
||||
void DatabaseOpenWidget::yubikeyDetected(int slot, bool blocking)
|
||||
{
|
||||
YkChallengeResponseKey yk(slot, blocking);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue