From ca62786442635d3f35bff22d22c3dc5521a5c432 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 15 Jun 2018 11:03:26 -0400 Subject: 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 --- src/tests/test_tls.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/tests/test_tls.cpp') 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); } -- cgit v1.2.3