mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-26 01:11:16 -05:00
SSH Agent: Helpful error message for adding keys
This adds more helpful error messages when adding keys to an agent fails. Closes #1667.
This commit is contained in:
parent
46099fdd71
commit
64f5ee6399
@ -186,7 +186,17 @@ bool SSHAgent::addIdentity(OpenSSHKey& key, quint32 lifetime, bool confirm)
|
||||
}
|
||||
|
||||
if (responseData.length() < 1 || static_cast<quint8>(responseData[0]) != SSH_AGENT_SUCCESS) {
|
||||
m_error = tr("Agent refused this identity.");
|
||||
m_error = tr("Agent refused this identity. Possible reasons include:")
|
||||
+ "\n" + tr("The key has already been added.");
|
||||
|
||||
if (lifetime > 0) {
|
||||
m_error += "\n" + tr("Restricted lifetime is not supported by the agent (check options).");
|
||||
}
|
||||
|
||||
if (confirm) {
|
||||
m_error += "\n" + tr("A confirmation request is not supported by the agent (check options).");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user