-
Notifications
You must be signed in to change notification settings - Fork 712
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
CKR_DEVICE_ERROR for Nitro HSM 2 on Sonoma #2887
Comments
I have the same issue on Sonoma M1 Mac, however I have opensc installed via brew. Mine can read slot 0, a yubikey 4 fine, but not slot 1 a Nitro HSM 2
Moving the Nitro HSM 2 to a Ventura Intel Mac does not exhibit this problem, or on the M1 Mac prior to Sonoma upgrade |
Your log shows you are using version 0.23. Can you try the latest 0.24.0-rc1? We got reports for that rc too, but there might be some things fixed already. Could it be an issue in the pcsc-lite or ccid? |
I tried with the latest 0.24.0-rc1, but got the same issue...
|
Same problem with 0.24.0-rc1 |
The card never gets past any attempt to connect to the card as seen in multiple lines in the log like this:
Other Sonoma users are having same problem with more then OpenSC: https://developer.apple.com/forums/thread/732091?page=2 which says: "I installed the CCID Drivers 1.5.2. Now it is working. https://www2.swift.com/3skey/help/mac_support.html " |
Our testing team did some initial testing with estonian card and did not notice any issues. I still need upgrade my development mac to dig deeper. From comments it looks like low level issues, eg. ccid driver or usb. |
Still unable to use the Nitrokey Pro 2 . |
In https://developer.apple.com/forums/thread/732091 update "CCID drivers 1.5.2" worked for some and not others. The problem could be a USB timing, power or configuration issue that may cause the card to reset or USB to be powered off. Have you tried some of the other "fixes":
(I don't have a Mac, but is sounds like the OS upgrade did something.) |
Correct. I would propose to check the PCSC/CCID debug logs if there is a way to get them from Mac and report to the pcsc-lite. I do not think this there is anything we could fix in OpenSC. |
Actually yes, I did this one first. |
You know what, I did run the CCID 1.5.2 installer. # grep -A 1 CFBundleShortVersionString /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist
<key>CFBundleShortVersionString</key>
<string>1.5.1</string> But It appears I'm still using the 1.5.1 . |
@alex-nitrokey Are you following this issue? This OpenSC issue is dealing with the Nitro HSM 2, whereas the apple issue is dealing with many different reader/tokens failing when upgrading the OS. The solutions are to update the MacOS CCID or use a different reader, all of which point at the CCID driver. What reader chip is in Nitro HSM 2? |
@dengert nope, not working for Nitrokey nor using HSM devices for 3 years, I am afraid... |
Nitrokey HSM 2 has the same reader chip as Nitrokey Pro - https://github.com/Nitrokey/nitrokey-pro-hardware they just run different firmware branches https://github.com/Nitrokey/nitrokey-pro-firmware/tree/master for Nitrokey Pro https://github.com/Nitrokey/nitrokey-pro-firmware/tree/ci-hsm for Nitrokey HSM cc @szszszsz (I don't have a Mac either) |
Hi!
Thanks for the ping.
I think that for the HSM the source code is actually under
https://github.com/Nitrokey/nitrokey-pro-firmware/tree/hsm-3
As mentioned, both models share the card reader hardware, but use different
smart cards and firmwares.
wt., 10 paź 2023, 21:33 użytkownik Marcin Cieślak ***@***.***>
napisał:
… What reader chip is in Nitro HSM 2?
Nitrokey HSM 2 has the same reader chip as Nitrokey Pro -
https://github.com/Nitrokey/nitrokey-pro-hardware
they just run different firmware branches
https://github.com/Nitrokey/nitrokey-pro-firmware/tree/master for
Nitrokey Pro
https://github.com/Nitrokey/nitrokey-pro-firmware/tree/ci-hsm for
Nitrokey HSM
cc @szszszsz <https://github.com/szszszsz>
(I don't have a Mac either)
—
Reply to this email directly, view it on GitHub
<#2887 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBXW4QWALJIEGUI73UCWZDX6WPJNAVCNFSM6AAAAAA5RLCLACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWGEYDCNBTGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks - I think the question is rather, do you have any idea why it stopped working on the newest Mac operating system ... |
It could be realated maybe with this |
(I don't have a Mac or a Nitro HSM 2.) Can you capture USB traffic? For example using https://wiki.wireshark.org/CaptureSetup/USB See if it ever sends anything. If you have a usb hub, try the HSM with the hub. Does the HSM token have a light? does it ever go on? https://developer.apple.com/forums/thread/732091 is very active, with some post yesterday. |
I have the same problem, unfortunately this still exists with Sonoma 14.1 |
The Wireshark trace does show USBCCID and USB bulk transfers Using a filter For example Frame 355:
Shows the card ATR "SmartCard-HSM 4K USB-Token (JavaCard)" Between frames 305 and 419 it looks like the ATR and protocols are being setup between host and card reader. Now what you need is someone to look at what is going on. |
Thank you, this put me on the right path to find a solution, at least for me it seems to work (I have not done all tests). The steps I took, come from this link: https://developer.apple.com/forums/thread/732091?page=2 But are as follows:
Hope this solves the problems for others as well. |
Thanks everybody for finding a solution. After installing ccid 1.5.4 my Nitrokey Pro 2 now works again on macOS 14 Sonoma. However moving the
|
I yet have to find time to make this work as I'm using Thanks for the updates, I'll tell you how it goes. |
Our testing team discovered that copying system ccid driver to /usr/local also fixes the problem.
|
Thank you all !! You have ended a sad time using a Linux VM to connect to my company. I followed @metsma last post, and its worked like a charm. Don't forget to reboot after copying the folder. |
I can confirm copying files works on an up-to-date M2 MBP + It feels a bit odd but it's better than no GPG right ? |
Apple seems to have heard the message and switches from their own implementation back to libccid as default driver with 14.1, see https://blog.apdu.fr/posts/2023/11/apple-own-ccid-driver-in-sonoma/ |
Given that this is resolved (outside of opensc), I think we can close this issue, correct? |
Works for me. Thanks! |
After a Sonoma update the libexec folder in /usr/local was deleted. You will need to copy the bundle again. |
Hi everybody,
have had no luck in finding out any specif and updated driver for the reader that obviously was smoothly workin before Sonoma and by chanche I landed here and on Ludovic Rousseau's blog. first of all If I do try to check the status I get the following:
and if I use
why? This said could the Ludovic Rousseau's drivers suite for my specific kind of reader? |
Problem Description
I am using a Nitrokey HSM 2. It used to work perfectly under MacOS 13 Ventura, but under Sonoma, the key is detected by the MacOS, but generates the following error:
~❯ /Library/OpenSC/bin/pkcs11-tool --show-info
Cryptoki version 3.0
Manufacturer OpenSC Project
Library OpenSC smartcard framework (ver 0.23)
error: PKCS11 function C_GetSlotInfo failed: rv = CKR_DEVICE_ERROR (0x30)
Aborting.
~❯ ioreg | grep -i Nitro
| | | | | | | | | +-o Nitrokey HSM@xxxxxxxx <class IOUSBHostDevice, id 0x100072258, registered, matched, active, busy 0 (17 ms), retain 35>
Proposed Resolution
Steps to reproduce
Logs
https://gist.github.com/pradig/c9bef153626030e7131f6fcafffe9174
The text was updated successfully, but these errors were encountered: