aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_client.h
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2016-05-16 23:02:58 +0200
committerMatthias Gierlings <[email protected]>2016-06-19 18:28:38 +0200
commit490d538512b7f732268358b3a3a6fcbfd2bb67c6 (patch)
tree200ef15842e924860c33f79d3c8be9c76e47ea39 /src/lib/tls/tls_client.h
parent93df95db45fa126725808fbd53aa978b00cf08ad (diff)
Compatibility patch for TLS::Callback interface
- Added legacy constructor support for TLS::Channel, TLS::Client, TLS::Server.
Diffstat (limited to 'src/lib/tls/tls_client.h')
-rw-r--r--src/lib/tls/tls_client.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/lib/tls/tls_client.h b/src/lib/tls/tls_client.h
index 7fb4af89a..6bdff8c53 100644
--- a/src/lib/tls/tls_client.h
+++ b/src/lib/tls/tls_client.h
@@ -89,6 +89,46 @@ class BOTAN_DLL Client final : public Channel
const Protocol_Version m_protocol_version;
const std::vector<std::string>& m_next_protocols;
};
+
+ /**
+ * DEPRECATED. This constructor is only provided for backward
+ * compatibility and should not be used in new implementations.
+ */
+ BOTAN_DEPRECATED("Use TLS::Client(TLS::Callbacks ...)")
+ Client(output_fn out,
+ data_cb app_data_cb,
+ alert_cb alert_cb,
+ handshake_cb hs_cb,
+ Session_Manager& session_manager,
+ Credentials_Manager& creds,
+ const Policy& policy,
+ RandomNumberGenerator& rng,
+ const Server_Information& server_info = Server_Information(),
+ const Protocol_Version& offer_version = Protocol_Version::latest_tls_version(),
+ const std::vector<std::string>& next_protocols = {},
+ size_t reserved_io_buffer_size = TLS::Client::IO_BUF_DEFAULT_SIZE
+ );
+
+ /**
+ * DEPRECATED. This constructor is only provided for backward
+ * compatibility and should not be used in new implementations.
+ */
+ BOTAN_DEPRECATED("Use TLS::Client(TLS::Callbacks ...)")
+ Client(output_fn out,
+ data_cb app_data_cb,
+ alert_cb alert_cb,
+ handshake_cb hs_cb,
+ handshake_msg_cb hs_msg_cb,
+ Session_Manager& session_manager,
+ Credentials_Manager& creds,
+ const Policy& policy,
+ RandomNumberGenerator& rng,
+ const Server_Information& server_info = Server_Information(),
+ const Protocol_Version& offer_version = Protocol_Version::latest_tls_version(),
+ const std::vector<std::string>& next_protocols = {}
+ );
+
+
Client(const Callbacks& callbacks,
Session_Manager& session_manager,
Credentials_Manager& creds,
@@ -100,6 +140,9 @@ class BOTAN_DLL Client final : public Channel
const std::string& application_protocol() const { return m_application_protocol; }
private:
+ void init(const Protocol_Version& protocol_version,
+ const std::vector<std::string>& next_protocols);
+
std::vector<X509_Certificate>
get_peer_cert_chain(const Handshake_State& state) const override;