Skip to content

Rebased 2FA code by Kyle Manna#119

Closed
johseg wants to merge 1 commit intokeepassxreboot:developfrom
johseg:develop
Closed

Rebased 2FA code by Kyle Manna#119
johseg wants to merge 1 commit intokeepassxreboot:developfrom
johseg:develop

Conversation

@johseg
Copy link
Copy Markdown

@johseg johseg commented Nov 28, 2016

Description

This just just keepassx/keepassx#52 rebased against keepassxc. All glory belongs to Kyle Manna

Motivation and Context

Adds 2FA with yubikeys to keepassxc
#26

How Has This Been Tested?

I've been using his fork for a while. This here is pretty much untested, I use it since today ...

Screenshots (if appropriate):

Types of changes

  • ❎ Bug fix (non-breaking change which fixes an issue)
  • ✅ New feature (non-breaking change which adds functionality)
  • ❎ Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ❎ My code follows the code style of this project. (I just used the existing code)
  • ✅ All new and existing tests passed. [REQUIRED]
  • ✅: My change requires a change to the documentation.
  • ❎ I have updated the documentation accordingly.
  • ✅: I have added tests to cover my changes.

keepassx/keepassx#52

@TheZ3ro
Copy link
Copy Markdown
Contributor

TheZ3ro commented Nov 28, 2016

Wow, I was thinking to rebase this just today and this PR pops out, nice!

Related to #26

Edit: I'm testing this and I think it should be good if when waiting for the Yubico challenge-response a MessageBox appear to tell the user to insert the Yubico and press it instead of failing the challenge-response.

clear();

for (const Key* subKey : asConst(key.m_keys)) {
Q_FOREACH (const Key* subKey, key.m_keys) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a normal for and not a Q_FOREACH, the latter will be deprecated soon.
Is there a reason to roll back to Q_FOREACH?

addKey(*subKey);
}

Q_FOREACH (const ChallengeResponseKey* subKey, key.m_challengeResponseKeys) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this is the same as above


CryptoHash cryptoHash(CryptoHash::Sha256);

Q_FOREACH (ChallengeResponseKey* key, m_challengeResponseKeys) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This

*
* This operation could block if the YubiKey requires a touch to trigger.
*
* TODO: Signal to the UI that the system is waiting for challenge response
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this todo must be implemented before merging.

find_package(Qt5X11Extras 5.2)
if(PRINT_SUMMARY)
add_feature_info(libXi X11_Xi_FOUND "The X11 Xi Protocol library is required for auto-type")
add_feature_info(libXtst X11_XTest_FOUND "The X11 XTEST Protocol library is required for auto-type")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is NOT a typo... it should be libXtst

@droidmonkey
Copy link
Copy Markdown
Member

droidmonkey commented Dec 3, 2016

The travis build needs to be updated to include downloading the yubikey libraries so that the tests run. Likewise, the readme needs to be updated (or wiki) for building with Yubikey.

Also, if yubikey is not compiled in recommend hiding the "challenge response" entry in the database unlock widget instead of just disabling it. May cause confusion.

@TheZ3ro
Copy link
Copy Markdown
Contributor

TheZ3ro commented Dec 13, 2016

Ping @johseg.
If you can't work on it I will fork your repo, fix it and repull.

@johseg
Copy link
Copy Markdown
Author

johseg commented Dec 13, 2016

I'm sorry for the delay, I'll be after Christmas that I'll find time for it. So feel free to clone away

@droidmonkey
Copy link
Copy Markdown
Member

@TheZ3ro recommend just pushing a copy of his branch work into the keepassxc repo directly so we can all tweak it.

@TheZ3ro TheZ3ro closed this Dec 24, 2016
kylemanna added a commit to kylemanna/keepassxc that referenced this pull request Jan 9, 2017
* Use the C++11 range based loop as recommended from
  keepassxreboot#119

Signed-off-by: Kyle Manna <[email protected]>
kylemanna added a commit to kylemanna/keepassxc that referenced this pull request Jan 9, 2017
* Use the C++11 range based loop as recommended from
  keepassxreboot#119

Signed-off-by: Kyle Manna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants