aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-01-28 16:12:25 -0500
committerJack Lloyd <[email protected]>2018-01-28 16:12:25 -0500
commitec2718a583ee6a4c6273fa0b2b8f86c961eb1d94 (patch)
treeb9263c9f4e674c2566f99126ef8a9d1f5d02d8d4 /src/lib/tls
parentaa2d16c81404ced37df474ab49fa980739e29294 (diff)
Move generic TLS tests to test_tls.cpp
Leaves unit_tls.cpp for the handshake level tests. Add some basic tests of the string<->enum conversions in tls_algos.h
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/tls_algos.cpp2
-rw-r--r--src/lib/tls/tls_algos.h10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/tls/tls_algos.cpp b/src/lib/tls/tls_algos.cpp
index 2a4d7ba26..33b00d519 100644
--- a/src/lib/tls/tls_algos.cpp
+++ b/src/lib/tls/tls_algos.cpp
@@ -107,6 +107,8 @@ Auth_Method auth_method_from_string(const std::string& str)
return Auth_Method::DSA;
if(str == "ECDSA")
return Auth_Method::ECDSA;
+ if(str == "IMPLICIT")
+ return Auth_Method::IMPLICIT;
if(str == "ANONYMOUS" || str == "")
return Auth_Method::ANONYMOUS;
diff --git a/src/lib/tls/tls_algos.h b/src/lib/tls/tls_algos.h
index b65aad185..4f7a35ec8 100644
--- a/src/lib/tls/tls_algos.h
+++ b/src/lib/tls/tls_algos.h
@@ -75,8 +75,8 @@ enum class Auth_Method {
ANONYMOUS
};
-std::string auth_method_to_string(Auth_Method method);
-Auth_Method auth_method_from_string(const std::string& str);
+std::string BOTAN_TEST_API auth_method_to_string(Auth_Method method);
+Auth_Method BOTAN_TEST_API auth_method_from_string(const std::string& str);
/*
* This matches the wire encoding
@@ -107,7 +107,7 @@ enum class Signature_Scheme : uint16_t {
EDDSA_448 = 0x0808,
};
-const std::vector<Signature_Scheme>& all_signature_schemes();
+BOTAN_UNSTABLE_API const std::vector<Signature_Scheme>& all_signature_schemes();
std::string BOTAN_UNSTABLE_API sig_scheme_to_string(Signature_Scheme scheme);
std::string hash_function_of_scheme(Signature_Scheme scheme);
@@ -151,8 +151,8 @@ enum class Kex_Algo {
ECDHE_PSK,
};
-std::string kex_method_to_string(Kex_Algo method);
-Kex_Algo kex_method_from_string(const std::string& str);
+std::string BOTAN_TEST_API kex_method_to_string(Kex_Algo method);
+Kex_Algo BOTAN_TEST_API kex_method_from_string(const std::string& str);
inline bool key_exchange_is_psk(Kex_Algo m)
{