Re-Add keys on database unlock

* Keys that were previously added do not show an error message (they are most likely still in the agent)
* Shifted to using the KeeAgentSettings class to guide behavior of addIdentity function
* Fixes #2902
This commit is contained in:
Jonathan White 2019-04-11 10:17:18 -04:00
parent 2ffefc95ae
commit c195452c54
3 changed files with 22 additions and 25 deletions

View file

@ -25,6 +25,7 @@
#include "crypto/ssh/OpenSSHKey.h"
#include "gui/DatabaseWidget.h"
#include "sshagent/KeeAgentSettings.h"
class SSHAgent : public QObject
{
@ -36,7 +37,7 @@ public:
const QString errorString() const;
bool isAgentRunning() const;
bool addIdentity(OpenSSHKey& key, bool removeOnLock, quint32 lifetime, bool confirm);
bool addIdentity(OpenSSHKey& key, KeeAgentSettings& settings);
bool removeIdentity(OpenSSHKey& key);
void setAutoRemoveOnLock(const OpenSSHKey& key, bool autoRemove);