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

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2018-01-30T09:26:55+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=5</id>
<entry>
<author><name><![CDATA[Tom2]]></name></author>
<updated>2018-01-30T09:26:55+01:00</updated>
<published>2018-01-30T09:26:55+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2835&amp;p=10136#p10136</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2835&amp;p=10136#p10136"/>
<title type="html"><![CDATA[Server Side Software • [Community] - Forum going read only. New KDB on its way.]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2835&amp;p=10136#p10136"><![CDATA[
For the security and experience of our user community, we have decided to set the forum as read-only and wipe all user account information. All historical posts and announcements will be archived and remain publicly searchable. <br /><br />In 2018, we will be publishing a searchable knowledge-base system that allows the community to provide direct feedback on articles and make suggestions that will be reviewed by Yubico staff. We sincerely appreciate the participation of our user forum over the years and hope to continue serving your for years to come.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3364">Tom2</a> — Tue Jan 30, 2018 9:26 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[patrickherber]]></name></author>
<updated>2017-12-07T09:34:51+01:00</updated>
<published>2017-12-07T09:34:51+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10048#p10048</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10048#p10048"/>
<title type="html"><![CDATA[Server Side Software • Re: [SOLVED] ErrorCode 1 trying to perform device registrati]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10048#p10048"><![CDATA[
Thanks to the support of the Yubico team I could solve this problem:<br /><br />Debugging the class BouncyCastleCrypto I could find out the source of the problem. The following exception was thrown at the line &quot;ecdsaSignature.initVerify(publicKey);&quot;:<br /><br />java.security.InvalidKeyException: No installed provider supports this key: org.bouncycastle.jce.provider.JCEECPublicKey<br /><br />The source of it was a conflict in the version of BouncyCastle used inside the application (we had a dependent library which depended on an older version of BC). Fixing the dependencies solved the problem.<br /><br />Thanks a lot for your precious help and best regards.<br />Patrick<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=5003">patrickherber</a> — Thu Dec 07, 2017 9:34 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[patrickherber]]></name></author>
<updated>2017-12-05T16:50:15+01:00</updated>
<published>2017-12-05T16:50:15+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10045#p10045</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10045#p10045"/>
<title type="html"><![CDATA[Server Side Software • Re: [QUESTION] ErrorCode 1 trying to perform device registra]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10045#p10045"><![CDATA[
Hello, <br />the problem I had yesterday was probably related to my Ubuntu PC.<br />I've tried now using a MacOS and it works fine.<br />However when I try to register in my application (where for the moment I've simply used the sample code provided in your example) I get a &quot;Bad signature&quot; error message during the finishRegistration method:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">com.yubico.u2f.exceptions.U2fBadInputException: Bad signature<br />   at com.yubico.u2f.crypto.BouncyCastleCrypto.checkSignature(BouncyCastleCrypto.java:45)<br />   at com.yubico.u2f.crypto.BouncyCastleCrypto.checkSignature(BouncyCastleCrypto.java:31)<br />   at com.yubico.u2f.data.messages.key.RawRegisterResponse.checkSignature(RawRegisterResponse.java:97)<br />   at com.yubico.u2f.U2fPrimitives.finishRegistration(U2fPrimitives.java:89)<br />   at com.yubico.u2f.U2F.finishRegistration(U2F.java:81)<br />   at com.yubico.u2f.U2F.finishRegistration(U2F.java:67)<br />   at U2FManager.finishRegistration(U2FManager.java:82)<br /></div><br /><br />The RegisterResponse and RegisterRequestData seem correct...<br /><br />What could be the cause of this problem?<br /><br />Thanks and best regards<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=5003">patrickherber</a> — Tue Dec 05, 2017 4:50 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[patrickherber]]></name></author>
<updated>2017-12-04T14:27:41+01:00</updated>
<published>2017-12-04T14:27:41+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10042#p10042</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10042#p10042"/>
<title type="html"><![CDATA[Server Side Software • [QUESTION] ErrorCode 1 trying to perform device registration]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2799&amp;p=10042#p10042"><![CDATA[
Hello<br />I'm trying to integrate U2F authentication in our web application using the sample code you provide. <br />Both on our application than with your u2flib-server-demo application when I try to perform a registration I get following error message:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">{&quot;errorCode&quot;:1,&quot;errorMessage&quot;:&quot;device status code: -200&quot;}<br /></div><br /><br />What could be its reason?<br /><br />I'm performing the tests on Ubuntu 14.04 using Chrome version 63.0.3239.59 and a Yubikey NEO<br /><br />Thanks a lot for your support and best regards<br /><br />Patrick<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=5003">patrickherber</a> — Mon Dec 04, 2017 2:27 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[nitmpez715]]></name></author>
<updated>2017-06-27T21:32:12+01:00</updated>
<published>2017-06-27T21:32:12+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2658&amp;p=9637#p9637</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2658&amp;p=9637#p9637"/>
<title type="html"><![CDATA[Server Side Software • ykval-queue:synclib:Timeout.]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2658&amp;p=9637#p9637"><![CDATA[
I been trying to setup ssl syncing between validation servers and so far have had no luck.<br /><br /><br /><br />I've created certificates for both servers using openssl.  <br />I then added the certificate to the /etc/ssl/certs/ca-certificates.crt for both servers.  This fixed the issue of me calling curl and getting a cert error.  I thought everything would be working now, since I could manually call a sync and get a good status, but logged onto the mysql dabase and saw my queue was full.  I then checked /var/log/syslog and saw the following error:<br />Jun 27 15:22:38 testval1 ykval[3982]: LOG_DEBUG:ykval-queue:synclib:handle indicated to be for <!-- m --><a class="postlink" href="https://testval2/wsapi/2.0/sync">https://testval2/wsapi/2.0/sync</a><!-- m -->.<br />Jun 27 15:22:38 testval2 ykval[3982]: LOG_NOTICE:ykval-queue:synclib:Timeout. Stopping queue resync for server <!-- m --><a class="postlink" href="https://testval2/wsapi/2.0/sync">https://testval2/wsapi/2.0/sync</a><!-- m --><br /><br />If i call curl directly using:<br />curl 'https://testval2/wsapi/2.0/sync?otp=&lt;otpval&gt;&amp;modified=&lt;mod_val&gt;&amp;yk_publicname=&lt;public_id&gt;yk_counter=5&amp;yk_use=5&amp;yk_high=229&amp;yk_low=52183&amp;nonce=&lt;nonce&gt;,local_counter=5&amp;local_use=4'<br /><br />The status comes back as OK.<br /><br />Any help would be appreciated.<br /><br /><br />Update:<br />My current work around until I can get a better fix is to set verifypeer to false in the curl options:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">$baseParams&#91;'__YKVAL_SYNC_CURL_OPTS__'&#93; = array(<br />        CURLOPT_SSL_VERIFYPEER =&gt; false<br />);</div><br /><br /><br />What I found was it appears I'm getting a CURLE_SSL_CACERT error from ykval-queue.  I created a simple test.php to debug this with the following:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&lt;?php<br /><br />$urls = array(<br />   &quot;https://testval2/wsapi/2.0/verify?id=1&amp;nonce=sopxxrlklguqquyvbkwwqthyvofukjzc&amp;otp=llkddjeccccckgvidcnbhhjvbvuicbdjnhblitfhvlfr&amp;timestamp=1&quot;,<br />   &quot;http://testval2/wsapi/2.0/verify?id=1&amp;nonce=sopxxrlklguqquyvbkwwqthyvofukjzd&amp;otp=llkddjeccccckgvidcnbhhjvbvuicbdjnhblitfhvlfr&amp;timestamp=1&quot;<br />);<br /><br />$mh = curl_multi_init();<br /><br />var_dump('start');<br />foreach ($urls as $i =&gt; $url) {<br />    $conn&#91;$i&#93; = curl_init($url);<br />    curl_setopt($conn&#91;$i&#93;, CURLOPT_RETURNTRANSFER, 1);<br />//    curl_setopt($conn&#91;$i&#93;, CURLOPT_CAPATH, &quot;/etc/ssl/certs/&quot;);<br />//    curl_setopt($conn&#91;$i&#93;, CURLOPT_CAINFO, &quot;/etc/ssl/certs/ca-certificates.crt&quot;);<br />    curl_setopt($conn&#91;$i&#93;, CURLOPT_CAINFO, &quot;/test/blah.pem&quot;);<br />//    curl_setopt($conn&#91;$i&#93;, CURLOPT_SSL_VERIFYPEER, 0);<br />    curl_multi_add_handle($mh, $conn&#91;$i&#93;);<br />}<br /><br />var_dump('doloop');<br />do {<br />    $status = curl_multi_exec($mh, $active);<br />    $info = curl_multi_info_read($mh);<br />    if (false !== $info) {<br />        var_dump($info);<br />    }<br />} while ($status === CURLM_CALL_MULTI_PERFORM || $active);<br /><br />var_dump('another loop');<br />foreach ($urls as $i =&gt; $url) {<br />    $res&#91;$i&#93; = curl_multi_getcontent($conn&#91;$i&#93;);<br />    curl_close($conn&#91;$i&#93;);<br />}<br /><br />var_dump('enddump');<br />var_dump(curl_multi_info_read($mh));<br /><br />?&gt;<br /><br /></div><br /><br />Which gives me the following:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">string(5) &quot;start&quot;<br />string(6) &quot;doloop&quot;<br />array(3) {<br />  &#91;&quot;msg&quot;&#93;=&gt;<br />  int(1)<br />  &#91;&quot;result&quot;&#93;=&gt;<br />  int(60) &lt;--- HERE IS THE CURLE_SSL_CACERT ERROR<br />  &#91;&quot;handle&quot;&#93;=&gt;<br />  resource(5) of type (curl)<br />}<br />array(3) {<br />  &#91;&quot;msg&quot;&#93;=&gt;<br />  int(1)<br />  &#91;&quot;result&quot;&#93;=&gt;<br />  int(0)<br />  &#91;&quot;handle&quot;&#93;=&gt;<br />  resource(6) of type (curl)<br />}<br />string(12) &quot;another loop&quot;<br />string(7) &quot;enddump&quot;<br />bool(false)<br /></div><br /><br />So my manual example is as follows, i moved my certificate out of the /etc/ssl/certs/ca-certificates.crt file to just a /test/blah.pem file, and get the following:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">curl 'https://testval2/wsapi/2.0/verify?id=1&amp;nonce=sopxxrlklguqquyvbkwwqthyvofukjzc&amp;otp=llkddjeccccckgvidcnbhhjvbvuicbdjnhblitfhvlfr&amp;timestamp=1'<br />curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none<br />More details here: http://curl.haxx.se/docs/sslcerts.html<br /><br />curl performs SSL certificate verification by default, using a &quot;bundle&quot;<br /> of Certificate Authority (CA) public keys (CA certs). If the default<br /> bundle file isn't adequate, you can specify an alternate file<br /> using the --cacert option.<br />If this HTTPS server uses a certificate signed by a CA represented in<br /> the bundle, the certificate verification probably failed due to a<br /> problem with the certificate (it might be expired, or the name might<br /> not match the domain name in the URL).<br />If you'd like to turn off curl's verification of the certificate, use<br /> the -k (or --insecure) option.<br /></div><br /><br />And pointing to the cert:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent"> curl --cacert blah.pem 'https://testval2/wsapi/2.0/verify?id=1&amp;nonce=sopxxrlklguqquyvbkwwqthyvofukjzc&amp;otp=llkddjeccccckgvidcnbhhjvbvuicbdjnhblitfhvlfr&amp;timestamp=1'<br />h=RoeWTtwokPc0wbIQ17rOqHrGux8=<br />t=2017-06-29T15:15:08Z0971<br />otp=llkddjeccccckgvidcnbhhjvbvuicbdjnhblitfhvlfr<br />nonce=sopxxrlklguqquyvbkwwqthyvofukjzc<br />status=REPLAYED_OTP<br /></div><br /><br />For some reason calling curl from command line with the certificate in /etc/ssl/certs/ca-certificates.crt file has no issue.  It will automatically pickup the cert, but the ykval-queue and test.php for some reason is having issues with the cert.  I tried setting some curl_opts to specify the cert, but had no luck with those.<br /><br />Again any help would be appreciated, as I don't think setting the verifypeer option to false is a great work around.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4830">nitmpez715</a> — Tue Jun 27, 2017 9:32 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[cdrescher]]></name></author>
<updated>2017-05-12T10:40:36+01:00</updated>
<published>2017-05-12T10:40:36+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=594&amp;p=9571#p9571</id>
<link href="https://forum.yubico.com/viewtopic.php?t=594&amp;p=9571#p9571"/>
<title type="html"><![CDATA[Server Side Software • Re: Yubico PAM Module issues]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=594&amp;p=9571#p9571"><![CDATA[
Hey guys<br /><br />How can I make the yubikey pam module logging my used otp?<br />I don't get the pam yubikey debug information at all. Only the usual sshd debug information.<br /><br />Thank you in advance.<br /><br />Cheers,<br />Chris<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4785">cdrescher</a> — Fri May 12, 2017 10:40 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[bmahf]]></name></author>
<updated>2017-03-23T17:28:59+01:00</updated>
<published>2017-03-23T17:28:59+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2610&amp;p=9494#p9494</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2610&amp;p=9494#p9494"/>
<title type="html"><![CDATA[Server Side Software • [Q] Variable response from OTP challenge w fixed config]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2610&amp;p=9494#p9494"><![CDATA[
I'm working on a Qt5 with Win32 project on Win7 using VS2010. I need to implement a simple OTP configuration on our YubiKeys such that they all have a fixed secret key that identifies the YubiKey as a known key.  I have gotten to the point where after importing the YubiClientAPI.dll library, I am able to detect if a key is inserted, get the key's serial#, perform an OTP challenge/response, and get current buffer.  The results seem to complement the results I get when I run the &quot;Sample YubiClientAPI MFC test container&quot; application compiled from the Samples folder.<br /><br />I have a couple things that I need to figure out about using the API in order to complete my project.  But the most important question I have is that, since my secret 16 byte key is constant on the YubiKey, and I keep getting back different byte strings every time I do a challenge, what do I do on the client end to get a constant expected string back that I can use for recognition.  I am assuming that there is something I'm doing wrong.  In the code below, you will see that I am randomizing the challenge string (see comment starting with &quot;NOTE:&quot;).  I have also commented the randomization out so that the challenge string is all zeroes.  Doesn't make a difference in the variability of the response string.<br /><br />I am also not sure how the &quot;Private Identity 6 byte Hex&quot; field is used in the authentication process?  Read the documentation, and I see when I run the &quot;YubiKey Personalization Tool&quot; that I can set that, but don't know how that affects the resulting response I get, and what it has to do with my client-side authentication process.<br /><br />If anyone can just give me an indication of what I should be looking at to figure this out, I would be very grateful.<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">#include &lt;iomanip&gt;<br />#include &lt;sstream&gt;<br /><br />// NOTE: import done in header file<br />//#import &lt;YubiClientAPI.dll&gt; no_namespace, named_guids<br /><br />#define RESPONSE_LENGTH 16<br />#define CHALLENGE_LENGTH 6<br />#define CONFIG1 0<br />#define CONFIG2 1<br /><br />TestingYubikeyAPI::TestingYubikeyAPI(QWidget *parent)<br />    : QMainWindow(parent)<br />{<br />    ui.setupUi(this);<br /><br />   HRESULT hr = CoCreateInstance(CLSID_YubiClient, 0, CLSCTX_ALL, IID_IYubiClient, reinterpret_cast&lt;void **&gt;(&amp;m_yubiClient));<br /><br />   if (FAILED(hr))<br />    {<br />      _com_error er(hr);<br />        setValid(false);<br />   }<br />    else<br />        setValid(true);<br />    <br />    QObject::connect(ui.m_getOtpConf1PushButton, &amp;QPushButton::clicked, this, &amp;TestingYubikeyAPI::onGetOtpConfig1Clicked);<br />}<br /><br />void TestingYubikeyAPI::onGetOtpConfig1Clicked()<br />{<br />    BYTE challenge&#91;CHALLENGE_LENGTH&#93;;<br />    BYTE response&#91;RESPONSE_LENGTH&#93;;<br />    memset(challenge, 0, sizeof(challenge));<br />    memset(response, 0, sizeof(response));<br />    <br />    // NOTE: randomizing challenge<br />    BCryptGenRandom(NULL, challenge, CHALLENGE_LENGTH, BCRYPT_USE_SYSTEM_PREFERRED_RNG);<br /><br />    variant_t va;<br />    std::ostringstream os;<br />    std::stringstream os2;<br />    os &lt;&lt; std::hex &lt;&lt; std::setfill('0');<br />    for (DWORD i = 0; i &lt; CHALLENGE_LENGTH; i++)<br />    {<br />        os &lt;&lt; std::setw(2) &lt;&lt; (int)challenge&#91;i&#93;;<br />    }<br />    _bstr_t bstr(os.str().c_str());<br /><br />    TCHAR buf&#91;1024&#93;;<br />    va.bstrVal = bstr;<br />    va.vt = VT_BSTR;<br />    m_yubiClient-&gt;PutdataEncoding(ycENCODING_BYTE_ARRAY);<br />    m_yubiClient-&gt;PutdataBuffer(va);<br />    ycRETCODE ret = m_yubiClient-&gt;GetotpChallenge(CONFIG1, ycCALL_BLOCKING);<br />   <br />    if (ret == ycRETCODE_OK)<br />    {<br />        getCurrentBuffer(challenge, 64);<br />    }<br />    else<br />    {<br />        ui.m_outputTextEdit-&gt;append(QString(&quot;Got No Data: retcode = %1&quot;).arg(translateRetCode(ret)));<br />    }<br />}<br /><br />void TestingYubikeyAPI::getCurrentBuffer(BYTE* pChallenge, int len)<br />{<br />    BYTE HUGEP *pb;<br />    long lbound, hbound;<br />    QString outstr;<br />    <br />    SafeArrayGetLBound(m_yubiClient-&gt;dataBuffer.parray, 1, &amp;lbound);<br />    SafeArrayGetUBound(m_yubiClient-&gt;dataBuffer.parray, 1, &amp;hbound);<br />    SafeArrayAccessData(m_yubiClient-&gt;dataBuffer.parray, (void **)&amp;pb);<br /><br />    for (; lbound &lt;= hbound; lbound++)<br />    {<br />        outstr = QString(&quot;%1%2 &quot;).arg(outstr).arg((uint)pb&#91;lbound&#93;, 2, 16, QLatin1Char('0'));<br />    }<br />    <br />    SafeArrayUnaccessData(m_yubiClient-&gt;dataBuffer.parray);<br />    ui.m_outputTextEdit-&gt;append(QString(&quot;Got Data: %1&quot;).arg(outstr));<br />}<br /></div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4623">bmahf</a> — Thu Mar 23, 2017 5:28 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[drcheese]]></name></author>
<updated>2017-03-19T06:43:43+01:00</updated>
<published>2017-03-19T06:43:43+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9480#p9480</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9480#p9480"/>
<title type="html"><![CDATA[Server Side Software • Re: Problems generating keys for YK-KSM]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9480#p9480"><![CDATA[
Solved...<br /><br />Create ~/.gnupg/gpg-agent.conf and add this one line:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">max-cache-ttl 0</div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4741">drcheese</a> — Sun Mar 19, 2017 6:43 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[drcheese]]></name></author>
<updated>2017-03-19T06:16:33+01:00</updated>
<published>2017-03-19T06:16:33+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9479#p9479</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9479#p9479"/>
<title type="html"><![CDATA[Server Side Software • Re: Problems generating keys for YK-KSM]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9479#p9479"><![CDATA[
Okay, so that was quick. I have half of my solution.<br /><br />Basically the gpg2 does not allow forcing entry of the passphrase all the time so you have to cache it somehow. I did this by creating a dummy file called test.txt and creating a signature for it via the command:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg --clearsign test.txt</div><br /><br />That caused the passphrase prompt:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">   lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk<br />   x Please enter the passphrase to unlock the secret key for the OpenPGP  x<br />   x certificate:                                                          x<br />   x &quot;YK-KSM Import Key&quot;                                                   x<br />   x 2048-bit RSA key, ID XXXXXXXX,                                        x<br />   x created 2017-03-19.                                                   x<br />   x                                                                       x<br />   x                                                                       x<br />   x Passphrase __________________________________________________________ x<br />   x                                                                       x<br />   x          &lt;OK&gt;                                         &lt;Cancel&gt;        x<br />   mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj<br /></div><br /><br />However this did not fix the importer issue where it did not prompt for the passphrase a second time. Any help on this? I can't seem to get around this issue.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4741">drcheese</a> — Sun Mar 19, 2017 6:16 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[drcheese]]></name></author>
<updated>2017-03-19T06:44:16+01:00</updated>
<published>2017-03-19T06:03:59+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9478#p9478</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9478#p9478"/>
<title type="html"><![CDATA[Server Side Software • [SOLVED] Problems generating keys for YK-KSM]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2605&amp;p=9478#p9478"><![CDATA[
So I have a gpg key generated per the tutorial here: <a href="https://developers.yubico.com/yubikey-ksm/Generate_KSM_Key.html" class="postlink">https://developers.yubico.com/yubikey-ksm/Generate_KSM_Key.html</a><br /><br />However gpg does not request my passphrase when I try to generate KSM keys via:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">ykksm-gen-keys --urandom 1 5 | gpg -a --encrypt -r XXXXXXXX -s &gt; keys.txt</div><br /><br />The output ends as follows:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg: cancelled by user<br />gpg: no default secret key: Operation cancelled<br />gpg: &#91;stdin&#93;: sign+encrypt failed: Operation cancelled<br /></div><br /><br />I found a possible workaround by using the following:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg -r XXXXXXXX--output keys.txt.gpg --encrypt keys.txt</div><br /><br />But then the importer gives me a similar error, expecting a passphrase to unlock the secret key and it never prompting for one:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&#91;GNUPG:&#93; ENC_TO XXXXXXXXXXXXXXXX 1 0<br />&#91;GNUPG:&#93; USERID_HINT XXXXXXXXXXXXXXXX YK-KSM Import Key<br />&#91;GNUPG:&#93; NEED_PASSPHRASE XXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYY 1 0<br />gpg: cancelled by user<br />&#91;GNUPG:&#93; MISSING_PASSPHRASE<br />gpg: encrypted with 2048-bit RSA key, ID ZZZZZZZZZ, created 2017-03-19<br />      &quot;YK-KSM Import Key&quot;<br />gpg: public key decryption failed: Operation cancelled<br />&#91;GNUPG:&#93; ERROR pkdecrypt_failed 99<br />&#91;GNUPG:&#93; BEGIN_DECRYPTION<br />&#91;GNUPG:&#93; DECRYPTION_FAILED<br />gpg: decryption failed: No secret key<br />&#91;GNUPG:&#93; END_DECRYPTION<br />encrypted to: XXXXXXXXXXXXXXXX <br />signed by:<br />Input not signed? at /usr/bin/ykksm-import line 122.</div><br /><br />I realize this may be a specific issue with gpg2 configuration in CentOS 7, but thought someone else may have run into this issue too. Any help is greatly appreciated.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4741">drcheese</a> — Sun Mar 19, 2017 6:03 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[NorbertR]]></name></author>
<updated>2017-01-24T18:51:26+01:00</updated>
<published>2017-01-24T18:51:26+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2541&amp;p=9314#p9314</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2541&amp;p=9314#p9314"/>
<title type="html"><![CDATA[Server Side Software • [Q?] OpenVPN\yubico\LDAP stack smash det: openvpn terminated]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2541&amp;p=9314#p9314"><![CDATA[
Hello Guys<br />I have installed OpenVPN with your pam_yubico Module as suggested at <!-- m --><a class="postlink" href="https://developers.yubico.com/yubico-pam/">https://developers.yubico.com/yubico-pam/</a><!-- m --> on a fresh installed Ubuntu Server 16.04 LTS and now the OpenVPN crashes every time a user wants to connect since i have added the account line in the PAM Configuration-file for OpenVPN.<br />before the setup works fine with my own account which is present at the local machine, now i wanted a test with a new testing user and discovered that the account required line is needed. So i added it and now it's crashing the openVPN... any suggestions why this happens?<br /><br />My Config-Files are<br /><em>/etc/openvpn/server.conf</em><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&#91;...&#93;<br />plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so openvpn<br /></div><br /><br /><em>/etc/pam.d/openvpn</em><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">auth required pam_yubico.so id=&lt;ID&gt; \<br />        yubi_attr=&lt;ATTRName&gt; \<br />        capath=/etc/ssl/certs \<br />        ldap_uri=ldap://ad.intern.dc.de/ \<br />        ldapdn=ou=worker,dc=intern,dc=dc,dc=de \<br />        ldap_bind_user=user@intern.dc.de ldap_bind_password=&lt;passwd&gt; \<br />        ldap_filter=(&amp;(sAMAccountName=%u)(memberOf=CN=group,OU=worker,DC=intern,DC=dc,DC=de)) \<br />        try_first_pass<br />account required pam_yubico.so<br /></div><br /><br />And the corresponding logfile-lines are<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&#91;../pam_yubico.c:authorize_user_token_ldap(286)&#93; try bind with: user@intern.dc.de:&#91;&lt;passwd&gt;&#93;<br />&#91;../pam_yubico.c:authorize_user_token_ldap(319)&#93; LDAP : look up object base='ou=worker,dc=intern,dc=dc,dc=de' filter='(&amp;(sAMAccountName=vpnuser)(memberOf=CN=group,OU=worker,DC=intern,DC=dc,DC=de))', ask for attribute '&lt;ATTRName&gt;'<br />&#91;../pam_yubico.c:authorize_user_token_ldap(355)&#93; LDAP : Found 1 values - checking if any of them match '&lt;yubiKey&gt;::&lt;yubiKey&gt;'<br />&#91;../pam_yubico.c:authorize_user_token_ldap(362)&#93; Token Found :: &lt;yubiKey&gt;<br />&#91;../pam_yubico.c:pam_sm_authenticate(1095)&#93; done. &#91;Success&#93;<br />&#91;../pam_yubico.c:pam_sm_acct_mgmt(1128)&#93; pam_sm_acct_mgmt returing PAM_SUCCESS<br />*** stack smashing detected ***: /usr/sbin/openvpn terminated</div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4638">NorbertR</a> — Tue Jan 24, 2017 6:51 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[plum]]></name></author>
<updated>2016-12-15T23:12:38+01:00</updated>
<published>2016-12-15T23:12:38+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2505&amp;p=9226#p9226</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2505&amp;p=9226#p9226"/>
<title type="html"><![CDATA[Server Side Software • IMAP auth through PAM problem]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2505&amp;p=9226#p9226"><![CDATA[
I've successfully deployed yubikey authentication for SSH (and sudo tested so far) on Debian jessie. The PAM config line is as follows:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">auth    required        pam_yubico.so mode=client try_first_pass id=REDACTED debug debug_file=/var/log/yk.log key=REDACTED<br /></div><br /><br />I tried to login to the IMAP the same way as to SSH (password + yubikey OTP) as it uses the same auth config but it fails:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(830)&#93; get user returned: REDACTED<br />Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(851)&#93; get password returned: (null)<br />Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(972)&#93; conv returned 53 bytes<br />Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(990)&#93; Skipping first 9 bytes. Length is 53, token_id set to 12 and token OTP always 32.<br />Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(997)&#93; OTP: REDACTED ID: REDACTED<br />Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(1012)&#93; Extracted a probable system password entered before the OTP - setting item PAM_AUTHTOK<br />Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(1028)&#93; ykclient return value (109): Error performing curl<br />Dec 15 22:57:12 vps172042 dovecot: auth-worker: Error: &#91;../pam_yubico.c:pam_sm_authenticate(1091)&#93; done. &#91;Authentication service cannot retrieve authentication info&#93;<br /></div><br /><br />I can't see why the same PAM sometimes works (SSH, sudo) and sometimes fails with curl error. Any ideas?<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4581">plum</a> — Thu Dec 15, 2016 11:12 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[oyla]]></name></author>
<updated>2016-11-04T13:03:53+01:00</updated>
<published>2016-11-04T13:03:53+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9141#p9141</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9141#p9141"/>
<title type="html"><![CDATA[Server Side Software • Re: YKVAL+YKKSM+YKPAM+LDAP -&gt; &quot;BAD_SERVER_SIGNATURE&quot;]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9141#p9141"><![CDATA[
Scratching the test client and starting from zero again fixed it nicely. Probably some residual state somewhere from hours of experimenting.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4530">oyla</a> — Fri Nov 04, 2016 1:03 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[oyla]]></name></author>
<updated>2016-11-03T17:32:04+01:00</updated>
<published>2016-11-03T17:32:04+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9139#p9139</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9139#p9139"/>
<title type="html"><![CDATA[Server Side Software • Re: YKVAL+YKKSM+YKPAM+LDAP -&gt; &quot;BAD_SERVER_SIGNATURE&quot;]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9139#p9139"><![CDATA[
Digging further, I only now notice (I blame a full brain) that only ykclient runs show up in the ykval server access logs - the PAM module does not even contact the validation server at all. Tcpdump comparing ykclient vs. PAM module runs further confirm this. <br /><br />I am at this point somewhat less than favourably impressed at the logging facilities of the PAM module.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4530">oyla</a> — Thu Nov 03, 2016 5:32 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[oyla]]></name></author>
<updated>2016-11-03T16:10:35+01:00</updated>
<published>2016-11-03T16:10:35+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9138#p9138</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9138#p9138"/>
<title type="html"><![CDATA[Server Side Software • YKVAL+YKKSM+YKPAM+LDAP -&gt; &quot;BAD_SERVER_SIGNATURE&quot;]]></title>

<category term="Server Side Software" scheme="https://forum.yubico.com/viewforum.php?f=5" label="Server Side Software"/>
<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2475&amp;p=9138#p9138"><![CDATA[
I run Ubuntu 14.04. I've installed the KSM and VAL services and managed to get them to work with ykclient from the client.<br /><br />I've also tested LDAP by using the YubiCloud service for one of my keys, in which the PAM module looked up the Yubikey ID for each user using the standard Yubikey LDAP schema from <!-- m --><a class="postlink" href="https://github.com/mludvig/yubikey-ldap">https://github.com/mludvig/yubikey-ldap</a><!-- m -->. This authentication methid worked.<br /><br />ykclient is perfectly capable of validating keys and KSM and VAL are working as intended. <br /><br />However I can not make yubico_pam.so authenticate using the same parameters as I use for ykclient when I combine VAL verification and LDAP lookups. I am convinced the fault here is not in the LDAP end of things, but rather in (another) undocumented feature of the KSM/VAL chain.<br /><br />I use this line in /etc/pam.d/sshd: <br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">auth required pam_yubico.so id=1 key=&lt;generated with ykgen-client&gt; = urllist=http://&lt;url verified with ykclient&gt; ldap_uri=ldap://&lt;ldap-server&gt; ldapdn=&lt;dn&gt; user_attr=cn yubi_attr=yubiKeyId token_id_length=12 ldapcacertfile=/&lt;working cafile&gt; mode=client debug</div><br /><br /><br />The debug log outputs this for an attempted authentication: <br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&#91;../pam_yubico.c:parse_cfg(761)&#93; called.<br />&#91;../pam_yubico.c:parse_cfg(762)&#93; flags 1 argc 11<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;0&#93;=id=1<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;1&#93;=key=&lt;keystring&gt;<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;2&#93;=urllist=&lt;VAL server&gt;<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;3&#93;=ldap_uri=&lt;ldapuri&gt;<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;4&#93;=ldapdn=&lt;mydn&gt;<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;5&#93;=user_attr=cn<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;6&#93;=yubi_attr=yubiKeyId<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;7&#93;=token_id_length=12<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;8&#93;=ldapcacertfile=&lt;ldap-cafile&gt;<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;9&#93;=mode=client<br />&#91;../pam_yubico.c:parse_cfg(764)&#93; argv&#91;10&#93;=debug<br />&#91;../pam_yubico.c:parse_cfg(765)&#93; id=1<br />&#91;../pam_yubico.c:parse_cfg(766)&#93; key=&lt;keystring&gt;<br />&#91;../pam_yubico.c:parse_cfg(767)&#93; debug=1<br />&#91;../pam_yubico.c:parse_cfg(768)&#93; alwaysok=0<br />&#91;../pam_yubico.c:parse_cfg(769)&#93; verbose_otp=0<br />&#91;../pam_yubico.c:parse_cfg(770)&#93; try_first_pass=0<br />&#91;../pam_yubico.c:parse_cfg(771)&#93; use_first_pass=0<br />&#91;../pam_yubico.c:parse_cfg(772)&#93; authfile=(null)<br />&#91;../pam_yubico.c:parse_cfg(773)&#93; ldapserver=(null)<br />&#91;../pam_yubico.c:parse_cfg(774)&#93; ldap_uri=ldap://&lt;ldap-server&gt;<br />&#91;../pam_yubico.c:parse_cfg(775)&#93; ldapdn=&lt;dn&gt;<br />&#91;../pam_yubico.c:parse_cfg(776)&#93; user_attr=cn<br />&#91;../pam_yubico.c:parse_cfg(777)&#93; yubi_attr=yubiKeyId<br />&#91;../pam_yubico.c:parse_cfg(778)&#93; yubi_attr_prefix=(null)<br />&#91;../pam_yubico.c:parse_cfg(779)&#93; url=(null)<br />&#91;../pam_yubico.c:parse_cfg(780)&#93; capath=(null)<br />&#91;../pam_yubico.c:parse_cfg(781)&#93; token_id_length=12<br />&#91;../pam_yubico.c:parse_cfg(782)&#93; mode=client<br />&#91;../pam_yubico.c:parse_cfg(783)&#93; chalresp_path=(null)<br />&#91;../pam_yubico.c:pam_sm_authenticate(823)&#93; get user returned: oyla<br />&#91;../pam_yubico.c:pam_sm_authenticate(929)&#93; conv returned 56 bytes<br />&#91;../pam_yubico.c:pam_sm_authenticate(947)&#93; Skipping first 12 bytes. Length is 56, token_id set to 12 and token OTP always 32.<br />&#91;../pam_yubico.c:pam_sm_authenticate(954)&#93; OTP: &lt;full key&gt; ID: &lt;public part&gt;<br />&#91;../pam_yubico.c:pam_sm_authenticate(969)&#93; Extracted a probable system password entered before the OTP - setting item PAM_AUTHTOK<br />&#91;../pam_yubico.c:pam_sm_authenticate(985)&#93; ykclient return value (107): Server response signature was invalid (BAD_SERVER_SIGNATURE)<br />&#91;../pam_yubico.c:pam_sm_authenticate(1038)&#93; done. &#91;Authentication service cannot retrieve authentication info&#93;<br />^C</div><br /><br />I find it rather odd that ykclient works while the PAM module does not. The values are all the same. I tried the Ubuntu-supplied PAM module from APT as well as building my own from Git, with no luck. Any idea where to start? I didn't even know there was a server key to begin with, but then again, this wouldn't be my first time being surprised at something missing from the Yubico docs. <br /><br />Thanks for any input.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4530">oyla</a> — Thu Nov 03, 2016 4:10 pm</p><hr />
]]></content>
</entry>
</feed>