Yubico / libfido2

Provides library functionality for FIDO2, including communication with a device over USB or NFC.
Other
590 stars 152 forks source link

Add PC/SC support on Linux #716

Closed mlpformat closed 1 year ago

mlpformat commented 1 year ago

This may allow additional NFC hardware to be used on Linux and others. I'm unable to test with NFC, but it works with a Cryptnox FIDO Card in a contact reader.

LDVG commented 1 year ago

Hi,

We rely on pkg-config to set the appropriate -I flag. See e.g. our cmake output

...
-- PCSC_INCLUDE_DIRS: /usr/include/PCSC
-- PCSC_LIBRARIES: pcsclite
-- PCSC_LIBRARY_DIRS: /usr/lib
-- PCSC_VERSION: 1.9.9
...

and the output of a call to make

...
[ 15%] Building C object src/CMakeFiles/fido2_shared.dir/pcsc.c.o
cd /__w/libfido2/libfido2/build-Debug/src && /usr/bin/gcc <snip> -I/usr/include/PCSC <snip> 
...

(additional compiler flags omitted for brevity)

The current choice of using the #else branch for Linux should therefore be correct and I'll be closing this with no action. Let us know if there's something we're missing.

Thanks!