Good thought, I just checked and using the prebuilt binary the last 6 bytes are filled in properly. This strongly implies that I'm invoking the method improperly. I've declared the ykpers method as:
Code:
[DllImport("libykpers-1-1.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
public static extern int yk_challenge_response(IntPtr yk, byte yk_cmd, int may_block, uint challenge_len, byte[] challenge, uint response_len, byte[] response);
then calling it with
Code:
YubiWrapper.yk_challenge_response(yk, YubiWrapper.SLOT_CHAL_HMAC2, 1, 64, m_challenge, 20, m_response);
does that look reasonable to you? I'll keep digging to see what I'm doing wrong. Thanks!