private void YubiChallengeResponse(object sender, DoWorkEventArgs e) //Should terminate in 15seconds worst case { //Send the challenge to yubikey and get response if (Challenge == null) { return; } success = yubi.ChallengeResponse(yubiSlot, Challenge, out m_response); if (!success) { MessageBox.Show("Error getting response from Yubikey", "Error"); } return; }
private void YubiChallengeResponse(object sender, DoWorkEventArgs e) //Should terminate in 15seconds worst case { //Send the challenge to yubikey and get response if (Challenge == null) { return; } if (yubiSlot == YubiSlot.AUTO) { //Code to automatically check which slot the hmac is setup YubiWrapper y = new YubiWrapper(); if (y.Init()) { int ySlot = y.DetectSlot(); if (ySlot > 0) { yubiSlot = (YubiSlot)(ySlot); } } } int slot = (int)yubiSlot; slot = 2; if (slot == 0) { MessageBox.Show("Error, no Challenge Response Config Detected", "Error"); return; } success = yubi.ChallengeResponse(slot - 1, Challenge, out m_response); if (!success) { MessageBox.Show("Error getting response from Yubikey", "Error"); } return; }