aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/psk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/psk.cpp')
-rw-r--r--src/cli/psk.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cli/psk.cpp b/src/cli/psk.cpp
index 45a5918d8..83b60225d 100644
--- a/src/cli/psk.cpp
+++ b/src/cli/psk.cpp
@@ -27,7 +27,7 @@ class PSK_Tool_Base : public Command
void go() override
{
const std::string db_filename = get_arg("db");
- const Botan::secure_vector<uint8_t> db_key = Botan::hex_decode_locked(get_arg("db_key"));
+ const Botan::secure_vector<uint8_t> db_key = Botan::hex_decode_locked(get_passphrase_arg("Database key", "db_key"));
std::shared_ptr<Botan::SQL_Database> db = std::make_shared<Botan::Sqlite3_Database>(db_filename);
Botan::Encrypted_PSK_Database_SQL psk(db_key, db, "psk");
@@ -53,8 +53,8 @@ class PSK_Tool_Set final : public PSK_Tool_Base
void psk_operation(Botan::PSK_Database& db) override
{
const std::string name = get_arg("name");
- Botan::secure_vector<uint8_t> key = Botan::hex_decode_locked(get_arg("psk"));
- db.set_vec(name, key);
+ const Botan::secure_vector<uint8_t> psk = Botan::hex_decode_locked(get_passphrase_arg("PSK", "psk"));
+ db.set_vec(name, psk);
}
};