Show YubiKey message from MainWindow to ensure it's always shown when a challenge is generated

This commit is contained in:
Janek Bevendorff 2017-02-24 17:27:27 +01:00
parent d6c48a5cf1
commit b10cb1c83c
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
7 changed files with 17 additions and 32 deletions

View file

@ -214,8 +214,6 @@ 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
@ -266,18 +264,6 @@ 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);