summaryrefslogtreecommitdiffstats
path: root/examples/cipherpack/commandline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cipherpack/commandline.cpp')
-rw-r--r--examples/cipherpack/commandline.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/cipherpack/commandline.cpp b/examples/cipherpack/commandline.cpp
index 4ea4bc1..aa8a739 100644
--- a/examples/cipherpack/commandline.cpp
+++ b/examples/cipherpack/commandline.cpp
@@ -37,7 +37,6 @@ int main(int argc, char *argv[])
print_usage(argv[0]);
return -1;
}
- const bool overwrite = true;
const std::string command = argv[++argi];
if( command == "pack") {
@@ -93,8 +92,8 @@ int main(int argc, char *argv[])
enc_pub_keys, sign_sec_key_fname, sign_sec_key_passphrase,
*source, target_path, intention,
payload_version, payload_version_parent,
- fname_output, overwrite,
- std::make_shared<cipherpack::CipherpackListener>());
+ std::make_shared<cipherpack::CipherpackListener>(),
+ fname_output);
jau::PLAIN_PRINT(true, "Pack: Encrypted %s to %s\n", source_name.c_str(), fname_output.c_str());
jau::PLAIN_PRINT(true, "Pack: %s\n", ph.toString(true, true).c_str());
return ph.isValid() ? 0 : -1;
@@ -136,8 +135,9 @@ int main(int argc, char *argv[])
source = std::make_unique<jau::io::ByteInStream_File>(source_name, true /* use_binary */);
}
cipherpack::PackHeader ph = cipherpack::checkSignThenDecrypt(sign_pub_keys, dec_sec_key_fname, dec_sec_key_passphrase,
- *source, fname_output, overwrite,
- std::make_shared<cipherpack::CipherpackListener>());
+ *source,
+ std::make_shared<cipherpack::CipherpackListener>(),
+ fname_output);
// dec_sec_key_passphrase.resize(0);
jau::PLAIN_PRINT(true, "Unpack: Decypted %s to %s\n", source_name.c_str(), fname_output.c_str());
jau::PLAIN_PRINT(true, "Unpack: %s\n", ph.toString(true, true).c_str());