aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_tls.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-06-15 11:03:26 -0400
committerJack Lloyd <[email protected]>2018-06-15 11:34:23 -0400
commitca62786442635d3f35bff22d22c3dc5521a5c432 (patch)
tree4d33c63c017e9f8ac052d04d61d849b0a36292ae /src/tests/test_tls.cpp
parentae9b7e89cf9b550e25f8eefa64d0b2733ff6f82e (diff)
TLS would try to negotiate x25519 even if disabled
Also reorder ECC groups to actually match performance characteristics. I'm not sure when P-384 was slower than P-521 but it certainly isn't anymore. Fixes #1607
Diffstat (limited to 'src/tests/test_tls.cpp')
-rw-r--r--src/tests/test_tls.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tests/test_tls.cpp b/src/tests/test_tls.cpp
index b43a39066..1f44d76a5 100644
--- a/src/tests/test_tls.cpp
+++ b/src/tests/test_tls.cpp
@@ -281,7 +281,13 @@ class Test_TLS_Policy_Text : public Test
for(std::string policy : policies)
{
const std::string from_policy_obj = tls_policy_string(policy);
- const std::string from_file = read_tls_policy(policy);
+ std::string from_file = read_tls_policy(policy);
+
+#if !defined(BOTAN_HAS_CURVE_25519)
+ auto pos = from_file.find("x25519 ");
+ if(pos != std::string::npos)
+ from_file = from_file.replace(pos, 7, "");
+#endif
result.test_eq("Values for TLS " + policy + " policy", from_file, from_policy_obj);
}