mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-22 06:28:52 -04:00
Passkeys: Add support for importing Passkey to entry (#9987)
--------- Co-authored-by: Jonathan White <support@dmapps.us>
This commit is contained in:
parent
013db199cb
commit
13c88e1013
27 changed files with 459 additions and 176 deletions
|
@ -19,6 +19,9 @@
|
|||
#include "browser/BrowserCbor.h"
|
||||
#include "browser/BrowserMessageBuilder.h"
|
||||
#include "browser/BrowserService.h"
|
||||
#include "core/Database.h"
|
||||
#include "core/Entry.h"
|
||||
#include "core/Group.h"
|
||||
#include "crypto/Crypto.h"
|
||||
|
||||
#include <QJsonArray>
|
||||
|
@ -469,3 +472,27 @@ void TestPasskeys::testSetFlags()
|
|||
auto discouragedResult = browserPasskeys()->setFlagsFromJson(discouragedJson);
|
||||
QCOMPARE(discouragedResult, 0x01);
|
||||
}
|
||||
|
||||
void TestPasskeys::testEntry()
|
||||
{
|
||||
Database db;
|
||||
auto* root = db.rootGroup();
|
||||
root->setUuid(QUuid::createUuid());
|
||||
|
||||
auto* group1 = new Group();
|
||||
group1->setUuid(QUuid::createUuid());
|
||||
group1->setParent(root);
|
||||
|
||||
auto* entry = new Entry();
|
||||
entry->setGroup(root);
|
||||
|
||||
browserService()->addPasskeyToEntry(entry,
|
||||
QString("example.com"),
|
||||
QString("example.com"),
|
||||
QString("username"),
|
||||
QString("userId"),
|
||||
QString("userHandle"),
|
||||
QString("privateKey"));
|
||||
|
||||
QVERIFY(entry->hasPasskey());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue