summaryrefslogtreecommitdiffstats
path: root/Keychain.cpp
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2024-10-24 13:06:13 -0400
committerMalfurious <m@lfurio.us>2024-10-25 03:31:18 -0400
commit8455d3e9256bff8d4f74b3606347522ea6c381ca (patch)
tree80660a9a058033f475c49cc71c4f18ae7cca14ac /Keychain.cpp
parent6285b4d8b283fb38112ec04b1cc570a8c0c9844b (diff)
downloadcompass-8455d3e9256bff8d4f74b3606347522ea6c381ca.tar.gz
compass-8455d3e9256bff8d4f74b3606347522ea6c381ca.zip
Remove remote-host and port options
Support for remote keychains is removed, so also remove the associated command-line options. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'Keychain.cpp')
-rw-r--r--Keychain.cpp15
1 files changed, 6 insertions, 9 deletions
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!