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