diff options
author | Jack Lloyd <[email protected]> | 2016-12-31 11:39:56 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-31 11:39:56 -0500 |
commit | ab3b2d298c34f7e8d06b53102741995853ce4a1f (patch) | |
tree | bb1c9a157e7ceb34efad873c7e1e603f0a65b3d7 /src | |
parent | 0a97554ce6eb3056de08beb760beece67bedfb15 (diff) |
Another fix for missing SHA1, and workaround Apple Clang problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_dl_group.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/tests/test_dl_group.cpp b/src/tests/test_dl_group.cpp index 3180107d9..9e3c09cb4 100644 --- a/src/tests/test_dl_group.cpp +++ b/src/tests/test_dl_group.cpp @@ -72,13 +72,6 @@ class DL_Group_Tests : public Test result.start_timer(); - Botan::DL_Group dsa1024(rng, Botan::DL_Group::DSA_Kosherizer, 1024); - - result.test_eq("DSA p size", dsa1024.get_p().bits(), 1024); - result.test_eq("DSA q size", dsa1024.get_q().bits(), 160); - result.test_lte("DSA g size", dsa1024.get_g().bits(), 1024); - result.test_eq("DSA group verifies", dsa1024.verify_group(rng, true), true); - Botan::DL_Group dh1050(rng, Botan::DL_Group::Prime_Subgroup, 1050, 175); result.test_eq("DH p size", dh1050.get_p().bits(), 1050); result.test_eq("DH q size", dh1050.get_q().bits(), 175); @@ -86,6 +79,14 @@ class DL_Group_Tests : public Test result.test_eq("DH group verifies", dh1050.verify_group(rng, true), true); #if defined(BOTAN_HAS_SHA1) + Botan::DL_Group dsa1024(rng, Botan::DL_Group::DSA_Kosherizer, 1024); + result.test_eq("DSA p size", dsa1024.get_p().bits(), 1024); + result.test_eq("DSA q size", dsa1024.get_q().bits(), 160); + result.test_lte("DSA g size", dsa1024.get_g().bits(), 1024); + result.test_eq("DSA group verifies", dsa1024.verify_group(rng, true), true); +#endif + +#if defined(BOTAN_HAS_SHA1) // From FIPS 186-3 test data const std::vector<uint8_t> seed = Botan::hex_decode("1F5DA0AF598EEADEE6E6665BF880E63D8B609BA2"); @@ -99,7 +100,7 @@ class DL_Group_Tests : public Test Botan::BigInt("0xAB1A788BCE3C557A965A5BFA6908FAA665FDEB7D")); // Modulo just to avoid embedding entire 1024-bit P in src file - result.test_eq("DSA p from seed", dsa_from_seed.get_p() % 4294967291, 2513712339); + result.test_eq("DSA p from seed", static_cast<size_t>(dsa_from_seed.get_p() % 4294967291), size_t(2513712339)); result.test_eq("DSA group from seed verifies", dsa_from_seed.verify_group(rng, true), true); #endif |