<?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=22&amp;t=2570" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2017-02-15T19:46:41+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=22&amp;t=2570</id>
<entry>
<author><name><![CDATA[mcdown75]]></name></author>
<updated>2017-02-15T19:46:41+01:00</updated>
<published>2017-02-15T19:46:41+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2570&amp;p=9403#p9403</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2570&amp;p=9403#p9403"/>
<title type="html"><![CDATA[Cannot verify pin using libykpiv-1.dll with ykPIV_verify]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2570&amp;p=9403#p9403"><![CDATA[
I am working to develop a limited pin change and pin reset tool that we can distribute organization wide.  We only want to allow them to change their pin or reset it.  If anyone knows where documentation on this dll, or the libyubikey-0.dll I would really appreciate a link to it.<br /><br /><br />I have completed the reset process using references to libykpiv-1.dll.  I cannot get the ykPIV_verify to work properly.  I believe the byte that I am passing containing the current pin is not formatted correctly.  I am using  the following code:<br /><br />        public bool VerifyPin(string CurrPin, out int triesLeft)<br />        {<br />            try<br />            {<br />                byte[] bytePin = Encoding.ASCII.GetBytes(CurrPin);<br />                triesLeft = 0;<br />                YubicoPivReturnCode code = SafeNativeMethods.YkPivVerifyPin(_state, bytePin, ref triesLeft);<br />                if (code != YubicoPivReturnCode.YKPIV_OK)<br />                {<br />                    return false;<br />                }<br />                return true;<br />            }<br />            catch (Exception ex)<br />            {<br />                Console.WriteLine(ex.Message);<br />                triesLeft = 0;<br />                return false;<br />            }<br />            <br />        }<br /><br /><br />Can anyone help me out with this?<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4691">mcdown75</a> — Wed Feb 15, 2017 7:46 pm</p><hr />
]]></content>
</entry>
</feed>