mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 15:29:44 -05:00
parent
dc7ad6c1b7
commit
2fb1c076d4
@ -666,11 +666,14 @@ void DatabaseWidget::addToAgent()
|
||||
return;
|
||||
}
|
||||
|
||||
SSHAgent* agent = SSHAgent::instance();
|
||||
OpenSSHKey key;
|
||||
if (settings.toOpenSSHKey(currentEntry, key, true)) {
|
||||
SSHAgent::instance()->addIdentity(key, settings, database()->uuid());
|
||||
if (!agent->addIdentity(key, settings, database()->uuid())) {
|
||||
m_messageWidget->showMessage(agent->errorString(), MessageWidget::Error);
|
||||
}
|
||||
} else {
|
||||
m_messageWidget->showMessage(key.errorString(), MessageWidget::Error);
|
||||
m_messageWidget->showMessage(settings.errorString(), MessageWidget::Error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -687,11 +690,14 @@ void DatabaseWidget::removeFromAgent()
|
||||
return;
|
||||
}
|
||||
|
||||
SSHAgent* agent = SSHAgent::instance();
|
||||
OpenSSHKey key;
|
||||
if (settings.toOpenSSHKey(currentEntry, key, false)) {
|
||||
SSHAgent::instance()->removeIdentity(key);
|
||||
if (!agent->removeIdentity(key)) {
|
||||
m_messageWidget->showMessage(agent->errorString(), MessageWidget::Error);
|
||||
}
|
||||
} else {
|
||||
m_messageWidget->showMessage(key.errorString(), MessageWidget::Error);
|
||||
m_messageWidget->showMessage(settings.errorString(), MessageWidget::Error);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user