void CPasskeyEntry::OnYubikeyBtn() { UpdateData(TRUE); if (!pws_os::FileExists(m_filespec.GetString())) { CGeneralMsgBox gmb; gmb.AfxMessageBox(IDS_FILEPATHNOTFOUND); if (m_MRU_combo.IsWindowVisible()) m_MRU_combo.SetFocus(); return; } yubiRequestHMACSha1(m_passkey); }
void CPasskeySetup::OnYubikeyBtn() { UpdateData(TRUE); // Check that password and verification are same. // unlike non-Yubi usage, here we accept empty passwords, // which will give token-based authentication. // A non-empty password with Yubikey is 2-factor auth. CGeneralMsgBox gmb; if (m_passkey != m_verify) { gmb.AfxMessageBox(IDS_ENTRIESDONOTMATCH); ((CEdit*)GetDlgItem(IDC_VERIFY))->SetFocus(); return; } yubiRequestHMACSha1(m_passkey); }