mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-12 21:40:54 -04:00
Fix challenge-response key data after Botan
* Fix #6420 * Refactor Challenge-Response key files to be more streamlined. Added a test to confirm raw key data is accurate.
This commit is contained in:
parent
60adcacaaa
commit
fd0bdaae80
14 changed files with 65 additions and 108 deletions
|
@ -27,9 +27,9 @@
|
|||
#include "gui/Icons.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/MessageBox.h"
|
||||
#include "keys/ChallengeResponseKey.h"
|
||||
#include "keys/FileKey.h"
|
||||
#include "keys/PasswordKey.h"
|
||||
#include "keys/YkChallengeResponseKey.h"
|
||||
#include "touchid/TouchID.h"
|
||||
|
||||
#include "config-keepassx.h"
|
||||
|
@ -337,7 +337,7 @@ QSharedPointer<CompositeKey> DatabaseOpenWidget::buildDatabaseKey()
|
|||
int selectionIndex = m_ui->challengeResponseCombo->currentIndex();
|
||||
if (selectionIndex > 0) {
|
||||
auto slot = m_ui->challengeResponseCombo->itemData(selectionIndex).value<YubiKeySlot>();
|
||||
auto crKey = QSharedPointer<YkChallengeResponseKey>(new YkChallengeResponseKey(slot));
|
||||
auto crKey = QSharedPointer<ChallengeResponseKey>(new ChallengeResponseKey(slot));
|
||||
databaseKey->addChallengeResponseKey(crKey);
|
||||
|
||||
// Qt doesn't read custom types in settings so stuff into a QString
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
#include "config-keepassx.h"
|
||||
#include "core/AsyncTask.h"
|
||||
#include "keys/ChallengeResponseKey.h"
|
||||
#include "keys/CompositeKey.h"
|
||||
#include "keys/YkChallengeResponseKey.h"
|
||||
|
||||
YubiKeyEditWidget::YubiKeyEditWidget(QWidget* parent)
|
||||
: KeyComponentWidget(parent)
|
||||
|
@ -45,7 +45,7 @@ bool YubiKeyEditWidget::addToCompositeKey(QSharedPointer<CompositeKey> key)
|
|||
|
||||
int selectionIndex = m_compUi->comboChallengeResponse->currentIndex();
|
||||
auto slot = m_compUi->comboChallengeResponse->itemData(selectionIndex).value<YubiKeySlot>();
|
||||
key->addChallengeResponseKey(QSharedPointer<YkChallengeResponseKey>::create(slot));
|
||||
key->addChallengeResponseKey(QSharedPointer<ChallengeResponseKey>::create(slot));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Ui
|
|||
class YubiKeyEditWidget;
|
||||
}
|
||||
|
||||
class YkChallengeResponseKey;
|
||||
class ChallengeResponseKey;
|
||||
|
||||
class YubiKeyEditWidget : public KeyComponentWidget
|
||||
{
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#include "gui/databasekey/KeyFileEditWidget.h"
|
||||
#include "gui/databasekey/PasswordEditWidget.h"
|
||||
#include "gui/databasekey/YubiKeyEditWidget.h"
|
||||
#include "keys/ChallengeResponseKey.h"
|
||||
#include "keys/FileKey.h"
|
||||
#include "keys/PasswordKey.h"
|
||||
#include "keys/YkChallengeResponseKey.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QSpacerItem>
|
||||
|
@ -91,7 +91,7 @@ void DatabaseSettingsWidgetDatabaseKey::load(QSharedPointer<Database> db)
|
|||
|
||||
#ifdef WITH_XC_YUBIKEY
|
||||
for (const auto& key : m_db->key()->challengeResponseKeys()) {
|
||||
if (key->uuid() == YkChallengeResponseKey::UUID) {
|
||||
if (key->uuid() == ChallengeResponseKey::UUID) {
|
||||
m_yubiKeyEditWidget->setComponentAdded(true);
|
||||
hasAdditionalKeys = true;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ bool DatabaseSettingsWidgetDatabaseKey::save()
|
|||
}
|
||||
|
||||
for (const auto& key : m_db->key()->challengeResponseKeys()) {
|
||||
if (key->uuid() == YkChallengeResponseKey::UUID) {
|
||||
if (key->uuid() == ChallengeResponseKey::UUID) {
|
||||
oldChallengeResponse = key;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue