Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 10:08 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Feb 15, 2017 7:46 pm 
Offline

Joined: Tue Feb 14, 2017 5:02 pm
Posts: 4
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.


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:

public bool VerifyPin(string CurrPin, out int triesLeft)
{
try
{
byte[] bytePin = Encoding.ASCII.GetBytes(CurrPin);
triesLeft = 0;
YubicoPivReturnCode code = SafeNativeMethods.YkPivVerifyPin(_state, bytePin, ref triesLeft);
if (code != YubicoPivReturnCode.YKPIV_OK)
{
return false;
}
return true;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
triesLeft = 0;
return false;
}

}


Can anyone help me out with this?


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group