Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix detection of hardware keys in keepassxc-cli #7593

Merged
merged 2 commits into from
Apr 3, 2022

Conversation

droidmonkey
Copy link
Member

  • Split calls to finding hardware keys into sync and async methods. This has the side effect of simplifying the code.
  • Check for keys before performing challenge/response if no keys have been found previously.
  • Correct timeout of user interaction message to interact with the hardware key.
  • Correct error in TestCli::testYubiKeyOption

While I was at it, I also disabled debug messages in release builds.

Testing strategy

Tested with both GUI and CLI using interaction required and passive modes on YubiKey.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

src/cli/Utils.cpp Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2022

Codecov Report

Merging #7593 (4ec9664) into develop (75e857b) will increase coverage by 0.01%.
The diff coverage is 19.30%.

@@             Coverage Diff             @@
##           develop    #7593      +/-   ##
===========================================
+ Coverage    64.24%   64.25%   +0.01%     
===========================================
  Files          340      340              
  Lines        43463    43444      -19     
===========================================
- Hits         27920    27912       -8     
+ Misses       15543    15532      -11     
Impacted Files Coverage Δ
src/autotype/AutoType.cpp 71.85% <ø> (ø)
src/cli/Utils.cpp 75.11% <0.00%> (ø)
src/core/Merger.cpp 91.08% <ø> (-0.04%) ⬇️
src/gui/DatabaseOpenWidget.cpp 55.75% <0.00%> (ø)
src/keys/drivers/YubiKeyInterface.cpp 30.43% <0.00%> (-6.41%) ⬇️
src/keys/drivers/YubiKeyInterfacePCSC.h 0.00% <ø> (ø)
src/keys/drivers/YubiKeyInterfacePCSC.cpp 5.07% <1.28%> (+0.11%) ⬆️
src/keys/drivers/YubiKeyInterfaceUSB.cpp 20.40% <19.30%> (-1.72%) ⬇️
src/keys/drivers/YubiKey.cpp 40.00% <76.92%> (-5.74%) ⬇️
src/gui/databasekey/YubiKeyEditWidget.cpp 69.23% <100.00%> (+9.89%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75e857b...4ec9664. Read the comment docs.

@droidmonkey droidmonkey force-pushed the hotfix/yubikey-cli branch 2 times, most recently from fad7360 to 4ec9664 Compare March 22, 2022 20:21
Also correct / remove various debug messages
@droidmonkey droidmonkey force-pushed the hotfix/yubikey-cli branch 2 times, most recently from 85166f0 to 000af44 Compare April 3, 2022 12:09
@droidmonkey
Copy link
Member Author

@phoerious ready for final

* Split calls to finding hardware keys into sync and async methods. This has the side effect of simplifying the code.
* Check for keys before performing challenge/response if no keys have been found previously.
* Correct timeout of user interaction message to interact with the hardware key.
* Correct error in TestCli::testYubiKeyOption
@droidmonkey droidmonkey merged commit 48a3fd8 into develop Apr 3, 2022
@droidmonkey droidmonkey deleted the hotfix/yubikey-cli branch April 3, 2022 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants