-
Notifications
You must be signed in to change notification settings - Fork 753
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
Slovenian eOI on Mac only exposes the PIN-less applet #2986
Slovenian eOI on Mac only exposes the PIN-less applet #2986
Comments
Currently only one applet at a time can be active. I think this is an OpenSC limitation. To select an active applet, enable/disable the relevant application block in |
I think this is a limitation of OpenSCToken, which expects all keys and certificates to be in the generic card application: Basically, that needs to be extended to the other applications on the card as well, which is similar to what is done in the PKCS#11 library: Lines 347 to 361 in c354501
Interestingly, minidriver.c also only binds the generic application. Could you please check if this problem also occurs on Windows using |
Yes, it's the same on Windows. As I've said before, the solution, or rather workaround, (at least on Windows, I have no experience with Macs) is to enable just the applet you need... |
I added multi-app support into OpenSCToken. Unfortunately, I can only do some basic tests. Would you mind testing the macOS package from here https://github.com/OpenSC/OpenSC/actions/runs/7653681110 ? |
Would someone please test the macOS artifacts linked above? This adds support for all applications on the card, without the need for the mentioned workaround. thank you |
Should this work on Linux? |
@frankmorgner Sorry for the late reply, I have been hit with life as a truck. I tested this and am having issues with basic OpenSC usage. MacOS doesnt detect any smartcards and pkcs11-tool takes a suspiciously long time to list slots. What kind of logs would be useful to you? Here is a log of |
It should... The pinless applet is disabled by default though and when/if enabled it erroneously asks for PIN, although it is not needed. See #2646 (comment) |
Thank you @llogar. I was wondering about this modification @frankmorgner linked, because I was following this support and as I can see there are two features missing as "by desing as of now" in openSC:
|
There are only 2 applets of interest (well, the 3rd one is eMRTD applet, but I think it's irrelevant in this context). If both are enabled there are 3 virtual slots (1 slot for pinless applet and 2 slots for the signature applet (1 for NormPIN and 1 for SigPIN). I prefer to have only one applet enabled at a time, as If I remember correctly, firefox (or perhaps thunderbird) kept nagging me for PIN entry for the unneeded one. But ymmv. |
This modification should allow using all certificates from all applets in OpenSCToken at the same time without modifying the active applet in opensc.conf. To test this, download the build artifact (https://github.com/OpenSC/OpenSC/actions/runs/7653681110/artifacts/1194532843), install the dmg. |
@craftbyte maybe a fix to your problem is just adding:
to app default section of opensc.conf. This is from example opensc.conf and it works for me. |
@llogar , the settings you are referring to are present in There are already tweaks to the PKCS#15 profile in |
Problem Description
The Slovenian eID implementation on Mac seems to only expose the PIN-less applet to the OS. Running
pkcs11-tool --list-slots
works though. Seems like there is something weird between the CryptoTokenKit service (OpenSC.tokend) and OpenSC.Pinging @llogar, since he was the main implementor of this and may have some details.
Proposed Resolution
Expose both applets to the OS. Maybe we need to present all the certificates as one token?
Steps to reproduce
Insert eOI into Mac. Run
security list-smartcards
andsecurity export-smartcard
. The output will only show the PIN-less applet details.Logs
https://gist.github.com/craftbyte/9be5e9c0b9d319880eac7fb6d13ef289
The text was updated successfully, but these errors were encountered: