mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-31 08:10:30 -05:00
CLI: Add Yubikey unlock support
This commit is contained in:
parent
77fcde875e
commit
964478e78f
19 changed files with 816 additions and 529 deletions
|
|
@ -43,6 +43,9 @@ const QCommandLineOption Merge::DryRunOption =
|
|||
QCommandLineOption(QStringList() << "dry-run",
|
||||
QObject::tr("Only print the changes detected by the merge operation."));
|
||||
|
||||
const QCommandLineOption Merge::YubiKeyFromOption(QStringList() << "yubikey-from",
|
||||
QObject::tr("Yubikey slot for the second database."),
|
||||
QObject::tr("slot"));
|
||||
Merge::Merge()
|
||||
{
|
||||
name = QString("merge");
|
||||
|
|
@ -51,6 +54,9 @@ Merge::Merge()
|
|||
options.append(Merge::KeyFileFromOption);
|
||||
options.append(Merge::NoPasswordFromOption);
|
||||
options.append(Merge::DryRunOption);
|
||||
#ifdef WITH_XC_YUBIKEY
|
||||
options.append(Merge::YubiKeyFromOption);
|
||||
#endif
|
||||
positionalArguments.append({QString("database2"), QObject::tr("Path of the database to merge from."), QString("")});
|
||||
}
|
||||
|
||||
|
|
@ -70,6 +76,7 @@ int Merge::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer
|
|||
db2 = Utils::unlockDatabase(fromDatabasePath,
|
||||
!parser->isSet(Merge::NoPasswordFromOption),
|
||||
parser->value(Merge::KeyFileFromOption),
|
||||
parser->value(Merge::YubiKeyFromOption),
|
||||
parser->isSet(Command::QuietOption) ? Utils::DEVNULL : Utils::STDOUT,
|
||||
Utils::STDERR);
|
||||
if (!db2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue