void CSafeCombinationSetup::OnYubibtnClick( wxCommandEvent& /* event */ ) { if (Validate() && TransferDataFromWindow()) { if (m_password != m_verify) { wxMessageDialog err(this, _("The two entries do not match."), _("Error"), wxOK | wxICON_EXCLAMATION); err.ShowModal(); return; } StringX response; bool oldYubiChallenge = ::wxGetKeyState(WXK_SHIFT); // for pre-0.94 databases if (PerformChallengeResponse(this, tostringx(m_password), response, oldYubiChallenge)) { m_password = response.c_str(); EndModal(wxID_OK); } } }
void CSafeCombinationPrompt::OnYubibtnClick( wxCommandEvent& /* event */ ) { m_scctrl->AllowEmptyCombinationOnce(); // Allow blank password when Yubi's used if (Validate() && TransferDataFromWindow()) { if (!pws_os::FileExists(tostdstring(m_filename))) { wxMessageDialog err(this, _("File or path not found."), _("Error"), wxOK | wxICON_EXCLAMATION); err.ShowModal(); return; } StringX response; bool oldYubiChallenge = ::wxGetKeyState(WXK_SHIFT); // for pre-0.94 databases if (PerformChallengeResponse(this, m_password, response, oldYubiChallenge)) { m_password = response; ProcessPhrase(); UpdateStatus(); } } }