keepassxc/src/cli
Christoph Honal 6d1fc31e96
Implement support for Yubikeys and potential other tokens via wireless NFC using smartcard readers (Rebase) (#6895)
* Support NFC readers for hardware tokens using PC/SC

This requires a new library dependency: PCSC.
The PCSC library provides methods to access smartcards. On Linux, the third-party pcsc-lite package is used. On Windows, the native Windows API (Winscard.dll) is used. On Mac OSX, the native OSX API (framework-PCSC) is used.

* Split hardware key access into multiple classes to handle different methods of communicating with the keys.

* Since the Yubikey can now be a wireless token as well, the verb "plug in" was replaced with a more
generic "interface with". This shall indicate that the user has to present their token to the reader, or plug it in via USB.

* Add PC/SC interface for YubiKey challenge-response

This new interface uses the PC/SC protocol and API
instead of the USB protocol via ykpers. Many YubiKeys expose their functionality as a CCID device, which can be interfaced with using PC/SC. This is especially useful for NFC-only or NFC-capable Yubikeys, when they are used together with a PC/SC compliant NFC reader device.

Although many (not all) Yubikeys expose their CCID functionality over their own USB connection as well, the HMAC-SHA1 functionality is often locked in this mode, as it requires eg. a touch on the gold button. When accessing the CCID functionality wirelessly via NFC (like this code can do using a reader), then the user interaction is to present the key to the reader.

This implementation has been tested on Linux using pcsc-lite, Windows using the native Winscard.dll library, and Mac OSX using the native PCSC-framework library.

* Remove PC/SC ATR whitelist, instead scan for AIDs

Before, a whitelist of ATR codes (answer to reset, hardware-specific)
was used to scan for compatible (Yubi)Keys.
Now, every connected smartcard is scanned for AIDs (applet identifier),
which are known to implement the HMAC-SHA1 protocol.

This enables the support of currently unknown or unreleased hardware.

Co-authored-by: Jonathan White <support@dmapps.us>
2021-10-01 10:39:07 -04:00
..
Add.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Add.h Cleanup CLI includes across all components 2021-04-25 07:38:21 -04:00
AddGroup.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
AddGroup.h CLI: Add group commands 2019-09-22 21:13:50 -04:00
Analyze.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Analyze.h Cleanup CLI includes across all components 2021-04-25 07:38:21 -04:00
Clip.cpp CLI: Replace locate command with search 2021-08-22 19:23:16 -04:00
Clip.h Add a best option to CLI command clip (#4489) 2020-08-31 23:06:27 -04:00
Close.cpp Cleanup CLI includes across all components 2021-04-25 07:38:21 -04:00
Close.h Optimize includes across code base 2021-07-13 22:08:33 -04:00
CMakeLists.txt Add support for Microsoft Visual Studio buildchain 2021-09-19 17:16:45 -04:00
Command.cpp CLI: Replace locate command with search 2021-08-22 19:23:16 -04:00
Command.h Optimize includes across code base 2021-07-13 22:08:33 -04:00
Create.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Create.h Add keyfile option to keepassxc cli import cmd (#5402) 2020-10-09 20:31:29 -04:00
DatabaseCommand.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
DatabaseCommand.h Cleanup CLI includes across all components 2021-04-25 07:38:21 -04:00
Diceware.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Diceware.h Clean up code (#3431) 2019-08-19 21:19:32 +02:00
Edit.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Edit.h Clean up code (#3431) 2019-08-19 21:19:32 +02:00
Estimate.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Estimate.h Clean up code (#3431) 2019-08-19 21:19:32 +02:00
Exit.cpp Cleanup CLI includes across all components 2021-04-25 07:38:21 -04:00
Exit.h Optimize includes across code base 2021-07-13 22:08:33 -04:00
Export.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Export.h CLI: Export database as CSV 2019-09-22 12:42:53 -04:00
Generate.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Generate.h Optimize includes across code base 2021-07-13 22:08:33 -04:00
Help.cpp Cleanup CLI includes across all components 2021-04-25 07:38:21 -04:00
Help.h CLI: Add interactive session mode command open 2019-09-28 11:24:42 -04:00
Import.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Import.h CLI: Add Import XML command (#3572) 2019-10-15 22:10:45 -04:00
Info.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Info.h Adding db-info CLI command. (#4231) 2020-01-26 23:44:31 -05:00
keepassxc-cli.cpp Abort CLI open on error 2021-08-16 01:13:51 -04:00
List.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
List.h Clean up code (#3431) 2019-08-19 21:19:32 +02:00
Merge.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Merge.h CLI: Add Yubikey unlock support 2019-09-22 18:11:40 -04:00
Move.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Move.h CLI: Add group commands 2019-09-22 21:13:50 -04:00
Open.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Open.h CLI: Add interactive session mode command open 2019-09-28 11:24:42 -04:00
Remove.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Remove.h Clean up code (#3431) 2019-08-19 21:19:32 +02:00
RemoveGroup.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
RemoveGroup.h CLI: Add group commands 2019-09-22 21:13:50 -04:00
Search.cpp CLI: Replace locate command with search 2021-08-22 19:23:16 -04:00
Search.h CLI: Replace locate command with search 2021-08-22 19:23:16 -04:00
Show.cpp Optimize includes across code base 2021-07-13 22:08:33 -04:00
Show.h CLI: do not display protected fields by default. 2019-11-01 22:53:54 -04:00
TextStream.cpp Add support for Microsoft Visual Studio buildchain 2021-09-19 17:16:45 -04:00
TextStream.h CLI: Fix XML encoding when export database 2020-01-29 20:51:53 -05:00
Utils.cpp Implement support for Yubikeys and potential other tokens via wireless NFC using smartcard readers (Rebase) (#6895) 2021-10-01 10:39:07 -04:00
Utils.h Cleanup CLI includes across all components 2021-04-25 07:38:21 -04:00