aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-02-18 15:54:37 +0100
committerRenĂ© Korthaus <[email protected]>2016-02-18 16:13:55 +0100
commit3a8dcbed75892ee63d73e9f9310f811e6267e504 (patch)
tree7553c5eb2936898d65b89b2407d016306d257dd1 /src/cli
parent0c76098cbaa8002fb89756d6fa2b02359f3f5f88 (diff)
Fix remaining Wshadow warnings and enable on gcc and clang
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/asn1.cpp16
-rw-r--r--src/cli/speed.cpp6
-rw-r--r--src/cli/tls_server.cpp6
3 files changed, 14 insertions, 14 deletions
diff --git a/src/cli/asn1.cpp b/src/cli/asn1.cpp
index 592f363b4..75ec5c3bb 100644
--- a/src/cli/asn1.cpp
+++ b/src/cli/asn1.cpp
@@ -274,31 +274,31 @@ void decode(Botan::BER_Decoder& decoder, size_t level)
}
else if(type_tag == Botan::OCTET_STRING)
{
- std::vector<uint8_t> bits;
- data.decode(bits, type_tag);
+ std::vector<uint8_t> decoded_bits;
+ data.decode(decoded_bits, type_tag);
try
{
- Botan::BER_Decoder inner(bits);
+ Botan::BER_Decoder inner(decoded_bits);
decode(inner, level + 1);
}
catch(...)
{
emit(type_name(type_tag), level, length,
- url_encode(bits));
+ url_encode(decoded_bits));
}
}
else if(type_tag == Botan::BIT_STRING)
{
- std::vector<uint8_t> bits;
- data.decode(bits, type_tag);
+ std::vector<uint8_t> decoded_bits;
+ data.decode(decoded_bits, type_tag);
std::vector<bool> bit_set;
- for(size_t i = 0; i != bits.size(); ++i)
+ for(size_t i = 0; i != decoded_bits.size(); ++i)
for(size_t j = 0; j != 8; ++j)
{
- const bool bit = static_cast<bool>((bits[bits.size()-i-1] >> (7-j)) & 1);
+ const bool bit = static_cast<bool>((decoded_bits[decoded_bits.size()-i-1] >> (7-j)) & 1);
bit_set.push_back(bit);
}
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index ed39827e5..b643bd605 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -694,10 +694,10 @@ class Speed final : public Command
while(ka_timer.under(msec))
{
- Botan::SymmetricKey key1 = ka_timer.run([&] { return ka1.derive_key(32, ka2_pub); });
- Botan::SymmetricKey key2 = ka_timer.run([&] { return ka2.derive_key(32, ka1_pub); });
+ Botan::SymmetricKey symkey1 = ka_timer.run([&] { return ka1.derive_key(32, ka2_pub); });
+ Botan::SymmetricKey symkey2 = ka_timer.run([&] { return ka2.derive_key(32, ka1_pub); });
- if(key1 != key2)
+ if(symkey1 != symkey1)
{
error_output() << "Key agreement mismatch in PK bench\n";
}
diff --git a/src/cli/tls_server.cpp b/src/cli/tls_server.cpp
index c802dbeb0..2ccacb1f7 100644
--- a/src/cli/tls_server.cpp
+++ b/src/cli/tls_server.cpp
@@ -138,11 +138,11 @@ class TLS_Server final : public Command
while(server.is_active() && !pending_output.empty())
{
- std::string s = pending_output.front();
+ std::string output = pending_output.front();
pending_output.pop_front();
- server.send(s);
+ server.send(output);
- if(s == "quit\n")
+ if(output == "quit\n")
server.close();
}
}