M1 Mac - Monterey - Signing operation fails - OpenSC fails with SCARD_E_NO_SERVICE (0x8010001d)
Sasi Palaka via Opensc-devel <[email protected]> Thu, 27 Oct 2022 15:07:31 -0700
| Newsgroups | gmane.comp.encryption.opensc.devel |
|---|---|
| Message-ID | <CAFKLxSTHK5b3E9oJH77=AkMbd8_KYpaK+7Bdpp0xjSJ_wb5BVQ@mail.gmail.com> |
--===============6445989396541678978== Content-Type: multipart/alternative; boundary="000000000000c683ce05ec0b5e62" --000000000000c683ce05ec0b5e62 Content-Type: text/plain; charset="UTF-8" Hi, We have been using OpenSC 0.22.0 latest build on our company Macs. We have integration with Yubikey. On the new M1s, signing operations frequently fail with the following error. === P:5819; T:0x8672658944 12:49:26.341 [opensc-pkcs11] framework-pkcs15.c:4143:pkcs15_prkey_sign: Initiating signing operation, mechanism 0x1041. P:5819; T:0x8672658944 12:49:26.341 [opensc-pkcs11] card.c:471:sc_lock: called P:5819; T:0x8672658944 12:49:26.341 [opensc-pkcs11] card.c:476:sc_lock: mutex obtained, lock_count: 0 P:5819; T:0x8672658944 12:49:26.341 [opensc-pkcs11] reader-pcsc.c:688:pcsc_lock: called P:5819; T:0x8672658944 12:49:26.343 [opensc-pkcs11] reader-pcsc.c:695:pcsc_lock: Yubico YubiKey OTP+FIDO+CCID:SCardBeginTransaction status: : 0x8010001d P:5819; T:0x8672658944 12:49:26.343 [opensc-pkcs11] reader-pcsc.c:698:pcsc_lock: Yubico YubiKey OTP+FIDO+CCID:SCardBeginTransaction returned: 0x8010001d P:5819; T:0x8672658944 12:49:26.343 [opensc-pkcs11] reader-pcsc.c:728:pcsc_lock: Yubico YubiKey OTP+FIDO+CCID:SCardBeginTransaction failed: 0x8010001d P:5819; T:0x8672658944 12:49:26.343 [opensc-pkcs11] card.c:522:sc_lock: returning with: -1101 (No readers found) === Non-M1 macs are working fine. Any pointers on how to debug this further? What makes the reader lose connection and error with "The smart card resource manager is not running". What should I look for? is that resource manager is something that can be restarted externally through code? We gather Apple has implemented PCSC.framework with CryptoTokenKit library. When the error happens, we only see one copy of /System/Library/Frameworks/PCSC.framework/Versions/A/XPCServices/com.apple.ctkpcscd.xpc/Contents/MacOS/com.apple.ctkpcscd running in the background. When it works we usually see two processes of ctkpcscd running in the background. So, I am guessing, the forked process is somehow dying in the background, and OpenSC is erroring out afterwards. Thanks, Sasi. --000000000000c683ce05ec0b5e62 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi,<div><br></div><div>We have been using OpenSC 0.22.0 la= test build on our company Macs. We have integration=C2=A0with Yubikey.=C2= =A0<br><br>On the new M1s, signing operations frequently fail with the foll= owing error.=C2=A0</div><div><br></div><div>=3D=3D=3D</div><div>P:5819; T:0= x8672658944 12:49:26.341 [opensc-pkcs11] framework-pkcs15.c:4143:pkcs15_prk= ey_sign: Initiating signing operation, mechanism 0x1041.<br>P:5819; T:0x867= 2658944 12:49:26.341 [opensc-pkcs11] card.c:471:sc_lock: called<br>P:5819; = T:0x8672658944 12:49:26.341 [opensc-pkcs11] card.c:476:sc_lock: mutex obtai= ned, lock_count: 0<br>P:5819; T:0x8672658944 12:49:26.341 [opensc-pkcs11] r= eader-pcsc.c:688:pcsc_lock: called<br>P:5819; T:0x8672658944 12:49:26.343 [= opensc-pkcs11] reader-pcsc.c:695:pcsc_lock: Yubico YubiKey OTP+FIDO+CCID:SC= ardBeginTransaction status: : 0x8010001d<br>P:5819; T:0x8672658944 12:49:26= .343 [opensc-pkcs11] reader-pcsc.c:698:pcsc_lock: Yubico YubiKey OTP+FIDO+C= CID:SCardBeginTransaction returned: 0x8010001d<br>P:5819; T:0x8672658944 12= :49:26.343 [opensc-pkcs11] reader-pcsc.c:728:pcsc_lock: Yubico YubiKey OTP+= FIDO+CCID:SCardBeginTransaction failed: 0x8010001d<br>P:5819; T:0x867265894= 4 12:49:26.343 [opensc-pkcs11] card.c:522:sc_lock: returning with: -1101 (N= o readers found)<br></div><div>=3D=3D=3D</div><div><br></div><div>Non-M1 ma= cs are working fine.</div><div><br></div><div>Any pointers on how to debug = this further? What makes the reader lose connection and error with "Th= e smart card resource manager is not running". What should I look for?= is that resource manager is something that can be restarted externally thr= ough code?</div><div><br></div><div>We gather Apple has implemented PCSC.fr= amework with CryptoTokenKit library. When the error happens, we only see on= e copy of=C2=A0</div><div><br></div><div>/System/Library/Frameworks/PCSC.fr= amework/Versions/A/XPCServices/com.apple.ctkpcscd.xpc/Contents/MacOS/com.ap= ple.ctkpcscd<br></div><div><br></div><div>running in the background. When i= t works we usually see two processes of ctkpcscd running in the background.= So, I am guessing, the forked process is somehow dying in the background, = and OpenSC is erroring out afterwards.=C2=A0</div><div><br></div><div><br><= /div><div>Thanks,</div><div>Sasi.</div></div> --000000000000c683ce05ec0b5e62-- --===============6445989396541678978== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============6445989396541678978== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Opensc-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensc-devel --===============6445989396541678978==--