mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-23 05:25:21 -04:00
SSH Agent: Refactor entry and agent key management
- Remove duplicate code to load a key (EditEntryWidget & SSHAgent) - Refactor all key loading and saving to KeeAgentSettings - Depend only on Entry to allow future CLI expansion
This commit is contained in:
parent
c97ee5395b
commit
e24a858f39
5 changed files with 196 additions and 152 deletions
|
@ -19,6 +19,8 @@
|
|||
#ifndef KEEAGENTSETTINGS_H
|
||||
#define KEEAGENTSETTINGS_H
|
||||
|
||||
#include "core/Entry.h"
|
||||
#include "crypto/ssh/OpenSSHKey.h"
|
||||
#include <QXmlStreamReader>
|
||||
#include <QtCore>
|
||||
|
||||
|
@ -27,12 +29,19 @@ class KeeAgentSettings
|
|||
public:
|
||||
KeeAgentSettings();
|
||||
|
||||
bool operator==(KeeAgentSettings& other);
|
||||
bool operator!=(KeeAgentSettings& other);
|
||||
bool isDefault();
|
||||
bool operator==(const KeeAgentSettings& other) const;
|
||||
bool operator!=(const KeeAgentSettings& other) const;
|
||||
bool isDefault() const;
|
||||
|
||||
bool fromXml(const QByteArray& ba);
|
||||
QByteArray toXml();
|
||||
QByteArray toXml() const;
|
||||
|
||||
bool fromEntry(const Entry* entry);
|
||||
void toEntry(Entry* entry) const;
|
||||
bool keyConfigured() const;
|
||||
bool toOpenSSHKey(const Entry* entry, OpenSSHKey& key, bool decrypt);
|
||||
|
||||
const QString errorString() const;
|
||||
|
||||
bool allowUseOfSshKey() const;
|
||||
bool addAtDatabaseOpen() const;
|
||||
|
@ -74,6 +83,7 @@ private:
|
|||
QString m_attachmentName;
|
||||
bool m_saveAttachmentToTempFile;
|
||||
QString m_fileName;
|
||||
QString m_error;
|
||||
};
|
||||
|
||||
#endif // KEEAGENTSETTINGS_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue