From 8455d3e9256bff8d4f74b3606347522ea6c381ca Mon Sep 17 00:00:00 2001 From: Malfurious Date: Thu, 24 Oct 2024 13:06:13 -0400 Subject: Remove remote-host and port options Support for remote keychains is removed, so also remove the associated command-line options. Signed-off-by: Malfurious --- Keychain.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Keychain.cpp') diff --git a/Keychain.cpp b/Keychain.cpp index 8e017eb..8f0880d 100644 --- a/Keychain.cpp +++ b/Keychain.cpp @@ -1,8 +1,6 @@ #include "Keychain.h" -Keychain::Keychain(std::string remoteHost, std::string port, std::string directory) { - this->remoteHost = remoteHost; - this->port = port; +Keychain::Keychain(std::string directory) { this->directory = directory; } @@ -10,15 +8,14 @@ Keychain::~Keychain() { } Keychain* Keychain::newKeychain(std::string directory) { - Keychain* kc = new Keychain("", "", directory); - return kc; + return new Keychain(directory); } -Keychain* Keychain::loadKeychain(std::string remoteHost, std::string port, std::string directory) { - std::string data = Cryptor::loadAndDecrypt(remoteHost, port, directory); +Keychain* Keychain::loadKeychain(std::string directory) { + std::string data = Cryptor::loadAndDecrypt(directory); std::istringstream datstr(data); - Keychain* kc = new Keychain(remoteHost, port, directory); + Keychain* kc = new Keychain(directory); int kcSize, servSize; datstr >> kcSize; @@ -86,7 +83,7 @@ void Keychain::saveKeychain() { } } - Cryptor::encryptAndSave(remoteHost, port, directory, datstr.str()); + Cryptor::encryptAndSave(directory, datstr.str()); } void Keychain::walk() { // Don't call this, it's just for debuging purposes and prints out plaintext passwords! -- cgit v1.2.3