italia / cie-nis-cpp-sdk

SDK for reading the NIS code from an Italian Electronic Identity Card (CIE) using C++
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

MacOS X support #2

Open alranel opened 7 years ago

alranel commented 7 years ago

This library should target MacOS X as well, in both low-level mode (i.e. sending APDU commands like it does now) and PKCS#11 mode.

Example code for PKCS#11 can be found here.

alranel commented 6 years ago

pcsc-lite can be installed on Mac OS X with the following command:

brew install pcsc-lite

automake and libtool are also needed:

brew install automake
brew install autoconf

Then, ./configure can be invoked as follows:

./configure PKG_CONFIG_PATH=/usr/local/opt/pcsc-lite/lib/pkgconfig CPPFLAGS="-I/usr/local/opt/pcsc-lite/include/PCSC" LDFLAGS="-L/usr/local/opt/pcsc-lite/lib"
alranel commented 6 years ago

As of now, this library compiles on OS X. I haven't tested whether it reads the NIS code correctly, though.

We should also check whether the pcsc-lite dependency should removed on OS X. The pcsc-lite website states the following:

Apple reimplemented PC/SC above their own CryptoTokenKit API. You should not need to build pcsc-lite on macOS.

Reminder: we should enable TravisCI for OS X too.

alranel commented 6 years ago

I was able to compile and run the test programs (I needed to manually run /usr/local/opt/pcsc-lite/sbin/pcscd but I get a Segmentation fault.

Also, my reader (Cherry TC 1200) doesn't seem to be recognized by MacOS X as pcsctest is stuck on "Please insert a working reader". This needs further investigation.

dadalicious commented 3 years ago

Any updates here? @alranel were you able to solve the problem. For me pcsctest is also stuck at "Please insert a working reader".

P.S. Your pcstest link is dead.