Store encrypted passwords with connections.

Closes #22 as encrypted password is now deleted as part of the connection record.
This commit is contained in:
eelke 2019-09-01 14:07:58 +02:00
parent e5ae9663c4
commit d489f11e52
11 changed files with 252 additions and 695 deletions

View file

@ -36,6 +36,8 @@ public:
void editConnection(QModelIndex index);
void addGroup();
void removeGroup(QModelIndex index);
std::shared_ptr<PasswordManager> passwordManager();
private:
MasterController *m_masterController;
ConnectionList *m_connectionList = nullptr;
@ -52,9 +54,8 @@ private:
*/
bool retrieveConnectionPassword(ConnectionConfig &cc);
bool getPasswordFromPskdb(const std::string &password_id, std::string &password);
bool storePasswordInPskdb(const std::string &password_id, const std::string password);
bool decodePassword(const std::string &password_id, const std::string &enc_password, std::string &password);
bool encodePassword(const std::string &password_id, const std::string &password, std::string &enc_password);
bool UnlockPasswordManagerIfNeeded();