mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-10 02:25:38 -04:00
YubiKey: Clean-up master seed challenge
* Tweak the logic so it more closely resembles other code (i.e. trasnformKey()). Matches existing style better. * Save the challengeResponseKey in the database structure so that it can be referred to later (i.e. database unlocking). Signed-off-by: Kyle Manna <kyle@kylemanna.com>
This commit is contained in:
parent
62190d79be
commit
77cc99acd3
4 changed files with 14 additions and 9 deletions
|
@ -113,15 +113,14 @@ Database* KeePass2Reader::readDatabase(QIODevice* device, const CompositeKey& ke
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
QByteArray challengeResult;
|
||||
if (m_db->challengeMasterSeed(m_masterSeed, challengeResult) == false) {
|
||||
if (m_db->challengeMasterSeed(m_masterSeed) == false) {
|
||||
raiseError(tr("Unable to issue challenge-response."));
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
|
||||
CryptoHash hash(CryptoHash::Sha256);
|
||||
hash.addData(m_masterSeed);
|
||||
hash.addData(challengeResult);
|
||||
hash.addData(m_db->challengeResponseKey());
|
||||
hash.addData(m_db->transformedMasterKey());
|
||||
QByteArray finalKey = hash.result();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue