<?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=1984" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2015-07-29T13:21:00+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=26&amp;t=1984</id>
<entry>
<author><name><![CDATA[syzzer]]></name></author>
<updated>2015-07-29T13:21:00+01:00</updated>
<published>2015-07-29T13:21:00+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1984&amp;p=7658#p7658</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1984&amp;p=7658#p7658"/>
<title type="html"><![CDATA[Re: yubico-piv-tool refuses to read previously exported pubk]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1984&amp;p=7658#p7658"><![CDATA[
Ah, there we go. Obvious as soon as I noticed it. yubico-piv-tool want a *pubkey* not a *certificate* (containing a pubkey).<br /><br />For future reference: to extract a pubkey from the cert, use:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">openssl x509 -pubkey -in testkey.crt &gt; testkey.pub</div><br /><br />.. and use `-i testkey.pub`, instead of `-i testkey.crt`.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3391">syzzer</a> — Wed Jul 29, 2015 1:21 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[syzzer]]></name></author>
<updated>2015-07-29T12:54:27+01:00</updated>
<published>2015-07-29T12:54:27+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1984&amp;p=7657#p7657</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1984&amp;p=7657#p7657"/>
<title type="html"><![CDATA[yubico-piv-tool refuses to read previously exported pubkey]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1984&amp;p=7657#p7657"><![CDATA[
Hi,<br /><br />I'm trying to generate a CSR, following the instructions in <!-- m --><a class="postlink" href="https://www.yubico.com/wp-content/uploads/2015/04/Yubico-PIV-Management-Tools_v1.0.pdf">https://www.yubico.com/wp-content/uploa ... s_v1.0.pdf</a><!-- m -->.<br /><br />I generated a key before, using the YubiKey PIV Manager gui thingy. I then used both the gui, and the yubico-piv-tool (1.0.1) to export a pubkey:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">yubico-piv-tool -a read-certificate -s 9c -o testkey.crt</div><br /><br />OpenSSL happily parses the testkey.crt with -inform pem. However, yubico-piv-tool refuses to load the pubkey when trying to create a CSR:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">$ yubico-piv-tool -a verify-pin -P 123456 -s 9c -a request-certificate -S &quot;/CN=testkey/O=testorg/&quot; -i testkey.crt -o testkey.csr --verbose=9<br />using reader 'Yubico Yubikey NEO OTP+U2F+CCID 00 00' matching 'Yubikey'.<br />&gt; 00 a4 04 00 05 a0 00 00 03 08 <br />&lt; 61 11 4f 06 00 00 10 00 01 00 79 07 4f 05 a0 00 00 03 08 90 00 <br />Action 'verify-pin' does not need authentication.<br />Action 'request-certificate' does not need authentication.<br />Now processing for action 'verify-pin'.<br />&gt; 00 20 00 80 08 31 32 33 34 35 36 ff ff <br />&lt; 90 00 <br />Successfully verified PIN.<br />Now processing for action 'request-certificate'.<br />Failed loading public key for request.</div><br /><br />I peeked into the yubico-piv-tool sources, but don't see an immediate reason why loading the pubkey would fail. Any clues?<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3391">syzzer</a> — Wed Jul 29, 2015 12:54 pm</p><hr />
]]></content>
</entry>
</feed>