<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=26&amp;t=1663" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2014-12-17T15:29:47+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=26&amp;t=1663</id>
<entry>
<author><name><![CDATA[Klas]]></name></author>
<updated>2014-12-17T15:29:47+01:00</updated>
<published>2014-12-17T15:29:47+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6557#p6557</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6557#p6557"/>
<title type="html"><![CDATA[Re: [QUESTION] OS X: Token-locked Keychain]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6557#p6557"><![CDATA[
Haven't tried this exact use-case.<br />What might be helpful for you is to edit the opensc config file (/Library/OpenSC/etc/opensc.conf if you installed their binary package) and set debug to 9 and point at a debug_file, it might contain interesting things after a run like this.<br /><br />/klas<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2019">Klas</a> — Wed Dec 17, 2014 3:29 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[darco]]></name></author>
<updated>2014-12-17T00:38:47+01:00</updated>
<published>2014-12-17T00:38:47+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6533#p6533</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6533#p6533"/>
<title type="html"><![CDATA[Re: [QUESTION] OS X: Token-locked Keychain]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6533#p6533"><![CDATA[
By the way, the specific error code I'm getting for the keychain problem is:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">Error: 0xFFFEF7FC -67588 A device failure has occurred.</div><br />Wonderfully descriptive. This turns out to be errSecDeviceFailed.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3288">darco</a> — Wed Dec 17, 2014 12:38 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[darco]]></name></author>
<updated>2014-12-16T20:26:05+01:00</updated>
<published>2014-12-16T20:26:05+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6529#p6529</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6529#p6529"/>
<title type="html"><![CDATA[[QUESTION] OS X: Token-locked Keychain]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1663&amp;p=6529#p6529"><![CDATA[
I'm trying to do some advanced fancy stuff on OS X with respect to the OS X keychain, as well as some stuff with encrypted disk images.<br /><br />I've got a &quot;PIVAUTH&quot; (0x9a) and a &quot;SIGN&quot; (0x9c) certificate on my YKNeo. The &quot;SIGN&quot; cert came from startssl.com, and the &quot;PIVAUTH&quot; cert came from my own CA. Both CAs are trusted. I have OpenSC installed (with the magic tokend), so I see the certs in the keychain. Both are green. Both CA roots are trusted in the system keychain.<br /><br />The &quot;PIVAUTH&quot; key has a non-critical &quot;keyUsage&quot; set to &quot;Digital Signature, Key Encipherment, Key Agreement&quot;. It has a non-critical &quot;extendedKeyUsage&quot; of &quot;Client Authentication&quot;. It is unexpired, and has my name as the commonName.<br /><br />The &quot;SIGN&quot; key has a non-critical &quot;keyUsage&quot; set to &quot;Digital Signature, Key Encipherment, Data Encipherment&quot;. It has a non-critical &quot;extendedKeyUsage&quot; of &quot;Client Authentication&quot; and &quot;Email Protection&quot;. It is unexpired, and has my email address as the commonName.<br /><br />I can use both keys for SSL authentication from my web browser. A window pops up asking me for my pin number when logging in. It is fantastic.<br /><br />I can use the &quot;SIGN&quot; key for signing email in Apple Mail. It is fantastic. HOWEVER, I cannot read encrypted emails in Apple Mail. (I can, however, read encrypted emails if I use thunderbird, which uses the OpenSC pkcs11 module and doesn't use the OS X keychain)<br /><br /><strong>Token-Protected Keychain</strong><br /><br />The OS X keychain internally supports the idea of having a keychain be encrypted by a public key who's private key is stored in another keychain---which can be a smart card. It's pretty easy to set up.<br /><br />First, you connect your token. Then you run &quot;sc_auth hash&quot;. Note the first key in the list: this is the key that will be used. Then run &quot;systemkeychain -T Library/keychain/token_secured.keychain&quot; to create a keychain that is protected with that public key instead of being protected by a password.<br /><br />When I try to unlock the keychain, I get the PIN entry box, but after typing in my pin it never unlocks the keychain and I cannot read any of the protected information in the keychain.<br /><br />Anyone have any idea what might be wrong?<br /><br /><strong>Token-Encrypted Disk Images</strong><br /><br />I recently found this nifty capability to create a disk image which is encrypted with a private key using &quot;hdiutil&quot;. First, you use &quot;sc_auth&quot; to get a list of the key hashes:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">$ sc_auth hash<br />92FE4542132D972011569F758B00704E8E851ADC PIV AUTH key<br />1BC7E41912A1EADAC87E9EB8F3FB2EEA361DF772 SIGN key<br />4C283767C7F2A2BA178C2FD8B9FA6980D7342BDE com.apple.systemdefault<br />98A10C7D2772EDBBD5632B4AA9126F94EFBC8993 com.apple.kerberos.kdc<br />4C283767C7F2A2BA178C2FD8B9FA6980D7342BDE com.apple.systemdefault<br />98A10C7D2772EDBBD5632B4AA9126F94EFBC8993 com.apple.kerberos.kdc<br /></div><br /><br />You can then pass that hash into hdiutil when creating an encrypted disk image:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">hdiutil create -encryption -size 50m e.dmg -fs HFS+J -pubkey 1BC7E41912A1EADAC87E9EB8F3FB2EEA361DF772<br /></div><br /><br />This *almost* works. Whenever I try to mount the drive, I get a popup window which says &quot;authentication error&quot;. Any ideas what might be wrong?<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3288">darco</a> — Tue Dec 16, 2014 8:26 pm</p><hr />
]]></content>
</entry>
</feed>