aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_aead.cpp6
-rw-r--r--src/tests/test_bigint.cpp2
-rw-r--r--src/tests/test_fuzzer.cpp2
-rw-r--r--src/tests/test_mceliece.cpp2
-rw-r--r--src/tests/test_pubkey.cpp2
-rw-r--r--src/tests/test_utils.cpp2
-rw-r--r--src/tests/tests.cpp6
-rw-r--r--src/tests/unit_ecc.cpp9
-rw-r--r--src/tests/unit_ecdsa.cpp2
-rw-r--r--src/tests/unit_tls.cpp4
10 files changed, 15 insertions, 22 deletions
diff --git a/src/tests/test_aead.cpp b/src/tests/test_aead.cpp
index 5d7e1094e..a31996fad 100644
--- a/src/tests/test_aead.cpp
+++ b/src/tests/test_aead.cpp
@@ -71,7 +71,7 @@ class AEAD_Tests : public Text_Based_Test
dec->finish(buf);
result.test_failure("accepted modified message", mutated_input);
}
- catch(Botan::Integrity_Failure& e)
+ catch(Botan::Integrity_Failure&)
{
result.test_note("correctly rejected modified message");
}
@@ -93,7 +93,7 @@ class AEAD_Tests : public Text_Based_Test
dec->finish(buf);
result.test_failure("accepted message with modified nonce", bad_nonce);
}
- catch(Botan::Integrity_Failure& e)
+ catch(Botan::Integrity_Failure&)
{
result.test_note("correctly rejected modified nonce");
}
@@ -115,7 +115,7 @@ class AEAD_Tests : public Text_Based_Test
dec->finish(buf);
result.test_failure("accepted message with modified ad", bad_ad);
}
- catch(Botan::Integrity_Failure& e)
+ catch(Botan::Integrity_Failure&)
{
result.test_note("correctly rejected modified ad");
}
diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp
index 5eaa0d0f1..6599b89b3 100644
--- a/src/tests/test_bigint.cpp
+++ b/src/tests/test_bigint.cpp
@@ -63,7 +63,7 @@ class BigInt_Unit_Tests : public Test
a.to_u32bit();
result.test_failure("BigInt::to_u32bit roundtripped out of range value");
}
- catch(std::exception& e)
+ catch(std::exception&)
{
result.test_success("BigInt::to_u32bit rejected out of range");
}
diff --git a/src/tests/test_fuzzer.cpp b/src/tests/test_fuzzer.cpp
index eba49a1ae..3a5dcc47c 100644
--- a/src/tests/test_fuzzer.cpp
+++ b/src/tests/test_fuzzer.cpp
@@ -58,7 +58,7 @@ class Fuzzer_Input_Tests : public Test
// TODO: check for memory consumption?
Botan::X509_Certificate cert(vec_file);
}
- catch(std::exception& e)
+ catch(std::exception&)
{
}
diff --git a/src/tests/test_mceliece.cpp b/src/tests/test_mceliece.cpp
index 5bbe7161a..36ecd660e 100644
--- a/src/tests/test_mceliece.cpp
+++ b/src/tests/test_mceliece.cpp
@@ -226,7 +226,7 @@ class McEliece_Tests : public Test
result.test_failure("AEAD decrypted manipulated ciphertext");
result.test_note("Manipulated text was " + Botan::hex_encode(bad_ct));
}
- catch(Botan::Integrity_Failure& e)
+ catch(Botan::Integrity_Failure&)
{
result.test_note("AEAD rejected manipulated ciphertext");
}
diff --git a/src/tests/test_pubkey.cpp b/src/tests/test_pubkey.cpp
index a596824a7..4521717e9 100644
--- a/src/tests/test_pubkey.cpp
+++ b/src/tests/test_pubkey.cpp
@@ -74,7 +74,7 @@ void check_invalid_ciphertexts(Test::Result& result,
result.test_eq("used corrupted ciphertext", bad_ctext, ciphertext);
}
}
- catch(std::exception& e)
+ catch(std::exception&)
{
++ciphertext_rejected;
}
diff --git a/src/tests/test_utils.cpp b/src/tests/test_utils.cpp
index 16b1848ef..47f740a17 100644
--- a/src/tests/test_utils.cpp
+++ b/src/tests/test_utils.cpp
@@ -305,7 +305,7 @@ class Base64_Tests : public Text_Based_Test
{
result.test_failure("decoded whitespace base64", Botan::base64_decode(b64_ws, false));
}
- catch(std::exception& e) {}
+ catch(std::exception&) {}
try
{
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp
index 4d035c0c8..b9d99b1ce 100644
--- a/src/tests/tests.cpp
+++ b/src/tests/tests.cpp
@@ -512,7 +512,7 @@ std::vector<uint8_t> Text_Based_Test::get_req_bin(const VarMap& vars,
{
return Botan::hex_decode(i->second);
}
- catch(std::exception& e)
+ catch(std::exception&)
{
throw Test_Error("Test invalid hex input '" + i->second + "'" +
+ " for key " + key);
@@ -556,7 +556,7 @@ std::vector<uint8_t> Text_Based_Test::get_opt_bin(const VarMap& vars,
{
return Botan::hex_decode(i->second);
}
- catch(std::exception& e)
+ catch(std::exception&)
{
throw Test_Error("Test invalid hex input '" + i->second + "'" +
+ " for key " + key);
@@ -583,7 +583,7 @@ Botan::BigInt Text_Based_Test::get_req_bn(const VarMap& vars,
{
return Botan::BigInt(i->second);
}
- catch(std::exception& e)
+ catch(std::exception&)
{
throw Test_Error("Test invalid bigint input '" + i->second + "' for key " + key);
}
diff --git a/src/tests/unit_ecc.cpp b/src/tests/unit_ecc.cpp
index 92dee8ba4..5b4d9058e 100644
--- a/src/tests/unit_ecc.cpp
+++ b/src/tests/unit_ecc.cpp
@@ -523,7 +523,6 @@ Test::Result test_enc_dec_compressed_256()
std::string a_secp = "ffffffff00000001000000000000000000000000ffffffffffffffffffffffFC";
std::string b_secp = "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B";
std::string G_secp_comp = "036B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296";
- std::string G_order_secp_comp = "ffffffff00000000ffffffffffffffffBCE6FAADA7179E84F3B9CAC2FC632551";
std::vector<byte> sv_p_secp = Botan::hex_decode ( p_secp );
std::vector<byte> sv_a_secp = Botan::hex_decode ( a_secp );
@@ -554,7 +553,6 @@ Test::Result test_enc_dec_uncompressed_112()
std::string a_secp = "6127C24C05F38A0AAAF65C0EF02C";
std::string b_secp = "51DEF1815DB5ED74FCC34C85D709";
std::string G_secp_uncomp = "044BA30AB5E892B4E1649DD0928643ADCD46F5882E3747DEF36E956E97";
- std::string G_order_secp_uncomp = "36DF0AAFD8B8D7597CA10520D04B";
std::vector<byte> sv_p_secp = Botan::hex_decode ( p_secp );
std::vector<byte> sv_a_secp = Botan::hex_decode ( a_secp );
@@ -583,7 +581,6 @@ Test::Result test_enc_dec_uncompressed_521()
std::string a_secp = "01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffFC";
std::string b_secp = "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00";
std::string G_secp_uncomp = "0400C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2ffA8DE3348B3C1856A429BF97E7E31C2E5BD66011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650";
- std::string G_order_secp_uncomp = "01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409";
std::vector<byte> sv_p_secp = Botan::hex_decode ( p_secp );
std::vector<byte> sv_a_secp = Botan::hex_decode ( a_secp );
@@ -613,7 +610,6 @@ Test::Result test_enc_dec_uncompressed_521_prime_too_large()
std::string a_secp = "01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffFC";
std::string b_secp = "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00";
std::string G_secp_uncomp = "0400C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2ffA8DE3348B3C1856A429BF97E7E31C2E5BD66011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650";
- std::string G_order_secp_uncomp = "01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409";
std::vector<byte> sv_p_secp = Botan::hex_decode ( p_secp );
std::vector<byte> sv_a_secp = Botan::hex_decode ( a_secp );
@@ -632,7 +628,7 @@ Test::Result test_enc_dec_uncompressed_521_prime_too_large()
p_G = std::unique_ptr<Botan::PointGFp>(new Botan::PointGFp(Botan::OS2ECP ( sv_G_secp_uncomp, secp521r1)));
result.test_failure("point decoding with too large value accepted");
}
- catch(std::exception& e)
+ catch(std::exception&)
{
result.test_note("rejected invalid point");
}
@@ -684,9 +680,6 @@ Test::Result test_more_zeropoint()
Botan::EC_Group secp160r1(Botan::OIDS::lookup("secp160r1"));
const Botan::CurveGFp& curve = secp160r1.get_curve();
- std::string G = "024a96b5688ef573284664698968c38bb913cbfc82";
- std::vector<byte> sv_G_secp_comp = Botan::hex_decode ( G );
-
Botan::PointGFp p1(curve,
Botan::BigInt("16984103820118642236896513183038186009872590470"),
Botan::BigInt("1373093393927139016463695321221277758035357890939"));
diff --git a/src/tests/unit_ecdsa.cpp b/src/tests/unit_ecdsa.cpp
index 66c2610f8..5b750e7fb 100644
--- a/src/tests/unit_ecdsa.cpp
+++ b/src/tests/unit_ecdsa.cpp
@@ -284,7 +284,7 @@ Test::Result test_read_pkcs8()
result.test_failure("loaded key with unknown OID");
}
- catch(std::exception& e)
+ catch(std::exception&)
{
result.test_note("rejected key with unknown OID");
}
diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp
index 0ff85bb29..3996b36b0 100644
--- a/src/tests/unit_tls.cpp
+++ b/src/tests/unit_tls.cpp
@@ -530,7 +530,7 @@ Test::Result test_dtls_handshake(Botan::TLS::Protocol_Version offer_version,
needed = client.received_data(input.data(), input.size());
}
}
- catch(std::exception& e)
+ catch(std::exception&)
{
result.test_note("corruption caused server exception");
}
@@ -570,7 +570,7 @@ Test::Result test_dtls_handshake(Botan::TLS::Protocol_Version offer_version,
needed = client.received_data(input.data(), input.size());
}
}
- catch(std::exception& e)
+ catch(std::exception&)
{
result.test_note("corruption caused client exception");
}