<div dir="ltr"><div><div>I also can confirm that using the OS X Forge PIV tokend it does show the NEO PIV applet as a keychain. I tried in CCID mode and CCID with other modes enabled, doesn&#39;t make a difference.<br></div><div><br></div><div>There is an open source OpenSC tokend project - <a href="https://github.com/OpenSC/OpenSC.tokend">https://github.com/OpenSC/OpenSC.tokend</a></div><div>I have a NEO-n and when in CCID mode the OpenSC tokend will show it as the PIV­_II keychain. The NEO PIV applet doesn&#39;t even need to contain certificates, it will show the keychain for the container, just empty. So there is nothing you need to do to the NEO out of the box besides enable CCID mode to make it show up as a keychain using the OpenSC tokend.</div><div><br></div><div>I know that doesn’t help resolve the issue with leveraging the PIV.tokend with the NEO PIV applet, but might help narrow down the problem space.</div></div><div><br></div><div>Ridley DiSiena</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 2, 2015 at 5:31 PM, Blumenthal, Uri - 0558 - MITLL <span dir="ltr">&lt;<a href="mailto:uri@ll.mit.edu" target="_blank">uri@ll.mit.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px"><span class=""><span style="font-family:Calibri,sans-serif"><blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5"><div><div><div><font><span style="font-size:10pt"><div>I assume this is all on some MacOS. </div></span></font></div></div></div></blockquote></span><div style="font-family:Calibri,sans-serif"><br></div></span><div style="font-family:Calibri,sans-serif">I don’t know, probably not.</div><span class=""><div style="font-family:Calibri,sans-serif"><br></div><span style="font-family:Calibri,sans-serif"><blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5"><div><div><div><font><span style="font-size:10pt"><div>Which version are you using? </div></span></font></div></div></div></blockquote></span><div style="font-family:Calibri,sans-serif"><br></div></span><div style="font-family:Calibri,sans-serif">I’m using Mavericks 10.9.5. Can’t move to Yosemite yet due so certain incompatibilities and code signing issues it sports.</div><span class=""><div style="font-family:Calibri,sans-serif"><br></div><span style="font-family:Calibri,sans-serif"><blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5"><div><div><div><font><span style="font-size:10pt"><div>IIUC support for Yubikey was officially added in Yosemite.  I didn’t mention it because I thought Thomas was using Yosemite, but I see it’s Maverics. Oops.</div></span></font></div></div></div></blockquote></span><div style="font-family:Calibri,sans-serif"><br></div></span><div style="font-family:Calibri,sans-serif">:-)</div><div style="font-family:Calibri,sans-serif"><br></div><div style="font-family:Calibri,sans-serif">As I said, tools such as “piv-tool” do find the card and can talk to it. But Keychain doesn’t/cannot, nor can Apple Mail…</div><span class=""><div style="font-family:Calibri,sans-serif"><br></div><span style="font-family:Calibri,sans-serif"><blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5"><div><div><div><font><span style="font-size:10pt"><div><span style="font-size:10pt">Prior to that you need to manually add the Yubikey to the whitelist for the smart card stuff to work. It appears the relevant plist hasn’t changed in a long time. Here’s the patch file I got for, I think, Snow Leopard.</span></div></span></font></div></div></div></blockquote></span><div style="font-family:Calibri,sans-serif"><br></div></span><div style="font-family:Calibri,sans-serif">It looks like my copy of that Info.plist whitelists all the Yubikey configurations:</div><div style="font-family:Calibri,sans-serif"><br></div><div><font face="Courier">…..</font></div><div><div><font face="Courier"><span style="white-space:pre-wrap">        </span>&lt;key&gt;ifdVendorID&lt;/key&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">        </span>&lt;array&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x1050&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x1050&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x1050&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x1050&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x08E6&lt;/string&gt;</font></div></div><div><font face="Courier">……</font></div><div><div><font face="Courier"><span style="white-space:pre-wrap">        </span>&lt;key&gt;ifdProductID&lt;/key&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">        </span>&lt;array&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x0116&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x0115&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x0112&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x0111&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;0x2202&lt;/string&gt;</font></div></div><div><font face="Courier">……</font></div><div><div><font face="Courier"><span style="white-space:pre-wrap">        </span>&lt;key&gt;ifdFriendlyName&lt;/key&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">        </span>&lt;array&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;Yubico Yubikey NEO OTP+U2F+CCID&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;Yubico Yubikey NEO U2F+CCID&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;Yubico Yubikey NEO CCID&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;Yubico Yubikey NEO OTP+CCID&lt;/string&gt;</font></div><div><font face="Courier"><span style="white-space:pre-wrap">                </span>&lt;string&gt;Gemplus Gem e-Seal Pro&lt;/string&gt;</font></div></div><div><font face="Courier">……</font></div><div><div class="h5"><div style="font-family:Calibri,sans-serif"><br></div><div style="font-family:Calibri,sans-serif"><br></div><div style="font-family:Calibri,sans-serif"><br></div><span style="font-family:Calibri,sans-serif"><blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5"><div><div><div><font><span style="font-size:10pt"><div><span style="font-size:10pt">On Feb 26, 2015, at 12:45 PM, Blumenthal, Uri - 0558 - MITLL &lt;</span><a href="mailto:uri@ll.mit.edu" style="font-size:10pt" target="_blank">uri@ll.mit.edu</a><span style="font-size:10pt">&gt; wrote:</span></div></span></font></div><div><font><span style="font-size:10pt"><div><br>
&gt; I can add that I seem to have a fully-configured Yubikey NEO card with<br>
&gt; both OpenPGP and PIV applets loaded and provisioned - and Keychain refuses<br>
&gt; to detect/recognize it.<br>
&gt; <br>
&gt; Here’s some output from OpenSC tools (I’d be happy to provide more if<br>
&gt; needed, of course):<br>
&gt; <br>
&gt; $ piv-tool -vn<br>
&gt; Using reader with a card: Yubico Yubikey NEO OTP+U2F+CCID 00 00<br>
&gt; Connecting to card in reader Yubico Yubikey NEO OTP+U2F+CCID 00 00...<br>
&gt; Using card driver PIV-II  for multiple cards.<br>
&gt; Card name: PIV-II card<br>
&gt; $ pkcs15-tool --list-certificates<br>
&gt; Using reader with a card: Yubico Yubikey NEO OTP+U2F+CCID 00 00<br>
&gt; X.509 Certificate [Certificate for Digital Signature]<br>
&gt;        Object Flags   : [0x0]<br>
&gt;        Authority      : no<br>
&gt;        Path           :<br>
&gt;        ID             : 02<br>
&gt;        Encoded serial : 02 02 06C9<br>
&gt; X.509 Certificate [Certificate for Key Management]<br>
&gt;        Object Flags   : [0x0]<br>
&gt;        Authority      : no<br>
&gt;        Path           :<br>
&gt;        ID             : 03<br>
&gt;        Encoded serial : 02 02 06C8<br>
&gt; $<br>
&gt; <br>
&gt; <br>
&gt; Firefox was able to see the NEO, and the certs on it.<br>
&gt; <br>
&gt; P.S. My setup works fine with CAC.<br>
&gt; -- <br>
&gt; Regards,<br>
&gt; Uri Blumenthal                               Voice: <a href="tel:%28781%29%20981-1638" value="+17819811638" target="_blank">(781) 981-1638</a><br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On 2/26/15, 14:43 , &quot;Henry B (Hank) Hotz, CISSP&quot; &lt;<a href="mailto:hotz@2ndquadrant.com" target="_blank">hotz@2ndquadrant.com</a>&gt;<br>
&gt; wrote:<br>
&gt; <br>
&gt;&gt; Hmmm. I was hoping someone else would take this one. My experiments<br>
&gt;&gt; didn’t go about it the “official way” like yours, and it was an older<br>
&gt;&gt; version of the applet to boot.<br>
&gt;&gt; <br>
&gt;&gt; Before I say “real” debugging is needed, can you try 1) reading it on a<br>
&gt;&gt; Debian Linux system, and 2) maybe loading the key/cert with the piv-tool<br>
&gt;&gt; from opensc?<br>
&gt;&gt; <br>
&gt;&gt; If you need to go farther, there are tools for dumping the USB messages,<br>
&gt;&gt; and it would probably be more productive if you went back to Yubico for<br>
&gt;&gt; support. The guy who wrote the PIV applet for them is Klas Lindfors, I<br>
&gt;&gt; believe. (I can give you his direct email and an introduction if needed.)<br>
&gt;&gt; Please keep me, or this list posted on how you get this resolved.<br>
&gt;&gt; <br>
&gt;&gt; On Feb 17, 2015, at 12:41 PM, Thomas Westfeld &lt;<a href="mailto:westfeld@mac.com" target="_blank">westfeld@mac.com</a>&gt; wrote:<br>
&gt;&gt; <br>
&gt;&gt;&gt;&gt; On Feb 1, 2015, at 1:50 PM, Thomas Westfeld &lt;<a href="mailto:westfeld@mac.com" target="_blank">westfeld@mac.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; Hello everyone,<br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; I am proud owner of a new Yubikey NEO firmare 3.3.0, with CCID mode<br>
&gt;&gt;&gt;&gt;&gt; enabled.<br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; I am having problems getting it to work, e.g. showing the<br>
&gt;&gt;&gt;&gt;&gt; certificates of the yubikey in my keychain. I have installed the<br>
&gt;&gt;&gt;&gt;&gt; latest Smartcard services for Mac OS 10.9. on my MacBookAir with PIV<br>
&gt;&gt;&gt;&gt;&gt; tokend installed. I am currently running 10.9.5. on it.<br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; First of all, wenn I attach the yubikey, my console shows the<br>
&gt;&gt;&gt;&gt;&gt; following:<br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; 01.02.15 22:44:08,127 UserEventAgent[11]: assertion failed: 13F34:<br>
&gt;&gt;&gt;&gt;&gt; com.apple.telemetry + 16493 [AE0C3032-1747-317E-9871-E26B5B6B0120]:<br>
&gt;&gt;&gt;&gt;&gt; 0xffffffffe00002ed<br>
&gt;&gt;&gt;&gt;&gt; 01.02.15 22:44:08,803 com.apple.SecurityServer[15]: Token reader<br>
&gt;&gt;&gt;&gt;&gt; Yubico Yubikey NEO OTP+CCID 00 00 inserted into system<br>
&gt;&gt;&gt;&gt;&gt; 01.02.15 22:44:09,207 com.apple.SecurityServer[15]: token in reader<br>
&gt;&gt;&gt;&gt;&gt; Yubico Yubikey NEO OTP+CCID 00 00 cannot be used (error 229)<br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; That does not sound too well. I then restarted the pcscd with the<br>
&gt;&gt;&gt;&gt;&gt; —debug and —apdu flag and reattached the yubikey. this is the lengthy<br>
&gt;&gt;&gt;&gt;&gt; output shown at the end of the post.<br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; Now my noob question: what can I do next? It does not seem to work or<br>
&gt;&gt;&gt;&gt;&gt; am I missing something here?<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Without spending some time with 800-73, I can’t interpret the detailed<br>
&gt;&gt;&gt;&gt; dump. <br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Let me ask you this: Have you actually gone through the<br>
&gt;&gt;&gt;&gt; initialization/provisioning steps to create a PIV container on the<br>
&gt;&gt;&gt;&gt; Yubikey? I assume it still comes blank from the factory, so there would<br>
&gt;&gt;&gt;&gt; not be any “token&quot; in the “reader&quot; for the software to connect with<br>
&gt;&gt;&gt;&gt; until you create one. They have some free utilities for the purpose,<br>
&gt;&gt;&gt;&gt; and there should have been a cheat-sheet in the box telling you how to<br>
&gt;&gt;&gt;&gt; do it.<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; Henry B. (Hank) Hotz, CISSP   <a href="http://www.2ndQuadrant.com/" target="_blank">http://www.2ndQuadrant.com/</a><br>
&gt;&gt;&gt;&gt; PostgreSQL Development, 24x7 Support, Training &amp; Services<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Am 09.02.2015 um 03:15 schrieb Henry B (Hank) Hotz, CISSP<br>
&gt;&gt;&gt; &lt;<a href="mailto:hotz@2ndquadrant.com" target="_blank">hotz@2ndquadrant.com</a>&gt;:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; First of all, thanks for your reply. It took me some time to have a<br>
&gt;&gt;&gt; look in more detail. First I used the yubikey NEO manager to activate<br>
&gt;&gt;&gt; the PIV applet on the NEO. I then took the following steps:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; 1. generate private key and selt-signed certificate using openssl:<br>
&gt;&gt;&gt; # openssl req -x509 -node -newkey rsa:2048 -keyout key.pem -out<br>
&gt;&gt;&gt; cert.pem -days 365<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; 2. convert key and cert into p12 file<br>
&gt;&gt;&gt; # openssl pkcs12 -export -out cert.p12 -inkey key.pem -in cert.pem<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; 3. use homebrew to install yubikey-piv-tool and opensc<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; 4. use the yubikey-piv-tool to load the private key and the cert into<br>
&gt;&gt;&gt; the NEO<br>
&gt;&gt;&gt; # yubico-piv-tool -s 9c -i cert.p12 -K PKCS12 -p 123 -a set-chuid -a<br>
&gt;&gt;&gt; import-key -a import-cert<br>
&gt;&gt;&gt; Successfully set new CHUID.<br>
&gt;&gt;&gt; Successfully imported a new private key.<br>
&gt;&gt;&gt; Successfully imported a new certificate.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; This at first sounds promising, however I get the very same error<br>
&gt;&gt;&gt; messages and the yubikey PIV module does not appear in Keychain.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Am I missing anything ?<br>
&gt;&gt;&gt; Thanks in advance.<br>
&gt;&gt; <br>
&gt;&gt; --<br>
&gt;&gt; Henry B. (Hank) Hotz, CISSP   <a href="http://www.2ndQuadrant.com/" target="_blank">http://www.2ndQuadrant.com/</a><br>
&gt;&gt; PostgreSQL Development, 24x7 Support, Training &amp; Services<br>
&gt;&gt; <br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; SmartcardServices-Users mailing list<br>
&gt;&gt; <a href="mailto:SmartcardServices-Users@lists.macosforge.org" target="_blank">SmartcardServices-Users@lists.macosforge.org</a><br>
&gt;&gt; <a href="https://lists.macosforge.org/mailman/listinfo/smartcardservices-users" target="_blank">
https://lists.macosforge.org/mailman/listinfo/smartcardservices-users</a><br>
&gt; _______________________________________________<br>
&gt; SmartcardServices-Users mailing list<br>
&gt; <a href="mailto:SmartcardServices-Users@lists.macosforge.org" target="_blank">SmartcardServices-Users@lists.macosforge.org</a><br>
&gt; <a href="https://lists.macosforge.org/mailman/listinfo/smartcardservices-users" target="_blank">
https://lists.macosforge.org/mailman/listinfo/smartcardservices-users</a><br><br>
--<br>
Henry B. (Hank) Hotz, CISSP   <a href="http://www.2ndQuadrant.com/" target="_blank">http://www.2ndQuadrant.com/</a><br>
PostgreSQL Development, 24x7 Support, Training &amp; Services<br><br></div></span></font></div></div></div></blockquote></span></div></div></div>
<br>_______________________________________________<br>
SmartcardServices-Users mailing list<br>
<a href="mailto:SmartcardServices-Users@lists.macosforge.org">SmartcardServices-Users@lists.macosforge.org</a><br>
<a href="https://lists.macosforge.org/mailman/listinfo/smartcardservices-users" target="_blank">https://lists.macosforge.org/mailman/listinfo/smartcardservices-users</a><br>
<br></blockquote></div><br></div>