aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-06-29 18:15:33 -0400
committerJack Lloyd <[email protected]>2019-06-29 18:15:33 -0400
commit5b435d11d32046062f23c0b69495631f5455ef6b (patch)
tree2361fe3c901bf83f20469ca80e208aae0ac75fe3 /src/cli
parent692ca2118f77ad1c035e05ee495e3a21a9a99cbc (diff)
parent8b8745236368c70a82db2b19feeed5e9f9b59c5b (diff)
Merge GH #2010 Fix MSVC warnings
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/speed.cpp3
-rw-r--r--src/cli/tls_client.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index a481ec16a..f198c3e63 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -2211,6 +2211,8 @@ class Speed final : public Command
void bench_argon2(const std::string& /*provider*/,
std::chrono::milliseconds msec)
{
+ const uint8_t mode = 2; // Argon2id
+
for(size_t M : { 8*1024, 64*1024, 256*1024 })
{
for(size_t t : { 1, 2, 4 })
@@ -2220,7 +2222,6 @@ class Speed final : public Command
std::unique_ptr<Timer> timer = make_timer(
"Argon2id M=" + std::to_string(M) + " t=" + std::to_string(t) + " p=" + std::to_string(p));
- const size_t mode = 2;
uint8_t out[64];
uint8_t salt[16];
rng().randomize(salt, sizeof(salt));
diff --git a/src/cli/tls_client.cpp b/src/cli/tls_client.cpp
index f2fc40210..26e1f4b25 100644
--- a/src/cli/tls_client.cpp
+++ b/src/cli/tls_client.cpp
@@ -91,7 +91,7 @@ class TLS_Client final : public Command, public Botan::TLS::Callbacks
const std::string sessions_db = get_arg("session-db");
const std::string host = get_arg("host");
- const uint16_t port = get_arg_sz("port");
+ const uint16_t port = static_cast<uint16_t>(get_arg_sz("port"));
const std::string transport = get_arg("type");
const std::string next_protos = get_arg("next-protocols");
std::string policy_file = get_arg("policy");