aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_policy.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-04-04 15:23:44 +0000
committerlloyd <[email protected]>2012-04-04 15:23:44 +0000
commitfedd69e75ffe23c6249d49e4d23cc1b4ae2823aa (patch)
treee0994c61aadb39e245486f2ba7089f4a13b18d8b /src/tls/tls_policy.h
parentf5d35f360a04acef3ad19b0abf9a830b0d52d5d8 (diff)
Remove Policy::choose_compression and move to tls_server
Make ciphersuite_list a free standing function Now the Policy interface only contains actual policy hooks (no non-virtual functions). Though choose_curve is a little dubious.
Diffstat (limited to 'src/tls/tls_policy.h')
-rw-r--r--src/tls/tls_policy.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/tls/tls_policy.h b/src/tls/tls_policy.h
index b12f07125..288be62bd 100644
--- a/src/tls/tls_policy.h
+++ b/src/tls/tls_policy.h
@@ -89,7 +89,7 @@ class BOTAN_DLL Policy
* will be rejected with an unknown_psk_identifier alert as soon
* as the non-existence is identified. Otherwise, a false
* identifier value will be used and the protocol allowed to
- * proceed, causing the login to eventually fail without
+ * proceed, causing the handshake to eventually fail without
* revealing that the username does not exist on this system.
*/
virtual bool hide_unknown_users() const { return false; }
@@ -97,7 +97,7 @@ class BOTAN_DLL Policy
/**
* Return the allowed lifetime of a session ticket. If 0, session
* tickets do not expire until the session ticket key rolls over.
- * Old session tickets cannot be used to resume as session.
+ * Expired session tickets cannot be used to resume a session.
*/
virtual u32bit session_ticket_lifetime() const;
@@ -111,21 +111,15 @@ class BOTAN_DLL Policy
*/
virtual Protocol_Version pref_version() const;
- /**
- * Return allowed ciphersuites, in order of preference
- */
- std::vector<u16bit> ciphersuite_list(bool have_srp) const;
-
- u16bit choose_suite(const std::vector<u16bit>& client_suites,
- const std::vector<std::string>& available_cert_types,
- bool have_shared_ecc_curve,
- bool have_srp) const;
-
- byte choose_compression(const std::vector<byte>& client_algos) const;
-
virtual ~Policy() {}
};
+/**
+* Return allowed ciphersuites, in order of preference
+*/
+std::vector<u16bit> ciphersuite_list(const Policy& policy,
+ bool have_srp);
+
}
}