diff options
-rw-r--r-- | src/cli/tls_client.cpp | 4 | ||||
-rw-r--r-- | src/cli/tls_proxy.cpp | 2 | ||||
-rw-r--r-- | src/cli/tls_server.cpp | 4 | ||||
-rw-r--r-- | src/lib/tls/tls_blocking.cpp | 4 | ||||
-rw-r--r-- | src/lib/tls/tls_blocking.h | 2 | ||||
-rw-r--r-- | src/lib/tls/tls_channel.cpp | 2 | ||||
-rw-r--r-- | src/lib/tls/tls_channel.h | 2 | ||||
-rw-r--r-- | src/lib/tls/tls_ciphersuite.h | 1 | ||||
-rw-r--r-- | src/lib/tls/tls_client.cpp | 4 | ||||
-rw-r--r-- | src/lib/tls/tls_client.h | 10 | ||||
-rw-r--r-- | src/tests/unit_tls.cpp | 2 |
11 files changed, 18 insertions, 19 deletions
diff --git a/src/cli/tls_client.cpp b/src/cli/tls_client.cpp index 7db8bacf8..f6cc2e518 100644 --- a/src/cli/tls_client.cpp +++ b/src/cli/tls_client.cpp @@ -122,7 +122,7 @@ class TLS_Client final : public Command Botan::TLS::Client client(Botan::TLS::Client::Callbacks( socket_write, std::bind(&TLS_Client::process_data, this, _1, _2), - std::bind(&TLS_Client::alert_received, this, _1, _2, _3), + std::bind(&TLS_Client::alert_received, this, _1), std::bind(&TLS_Client::handshake_complete, this, _1)), *session_mgr, creds, @@ -315,7 +315,7 @@ class TLS_Client final : public Command } } - void alert_received(Botan::TLS::Alert alert, const uint8_t [], size_t ) + void alert_received(Botan::TLS::Alert alert) { output() << "Alert: " << alert.type_string() << "\n"; } diff --git a/src/cli/tls_proxy.cpp b/src/cli/tls_proxy.cpp index 054a8f8ca..6c5592faf 100644 --- a/src/cli/tls_proxy.cpp +++ b/src/cli/tls_proxy.cpp @@ -114,7 +114,7 @@ class tls_proxy_session : public boost::enable_shared_from_this<tls_proxy_sessio m_server_socket(io), m_tls(Botan::TLS::Server::Callbacks(boost::bind(&tls_proxy_session::tls_proxy_write_to_client, this, _1, _2), boost::bind(&tls_proxy_session::tls_client_write_to_proxy, this, _1, _2), - boost::bind(&tls_proxy_session::tls_alert_cb, this, _1, _2, _3), + boost::bind(&tls_proxy_session::tls_alert_cb, this, _1), boost::bind(&tls_proxy_session::tls_handshake_complete, this, _1)), session_manager, credentials, diff --git a/src/cli/tls_server.cpp b/src/cli/tls_server.cpp index 335f36c97..c9f0b0a79 100644 --- a/src/cli/tls_server.cpp +++ b/src/cli/tls_server.cpp @@ -110,7 +110,7 @@ class TLS_Server final : public Command Botan::TLS::Server server(Botan::TLS::Server::Callbacks( socket_write, proc_fn, - std::bind(&TLS_Server::alert_received, this, _1, _2, _3), + std::bind(&TLS_Server::alert_received, this, _1), std::bind(&TLS_Server::handshake_complete, this, _1)), session_manager, creds, @@ -238,7 +238,7 @@ class TLS_Server final : public Command } } - void alert_received(Botan::TLS::Alert alert, const uint8_t[], size_t) + void alert_received(Botan::TLS::Alert alert) { std::cout << "Alert: " << alert.type_string() << std::endl; } diff --git a/src/lib/tls/tls_blocking.cpp b/src/lib/tls/tls_blocking.cpp index 14e04693d..4c78a44ce 100644 --- a/src/lib/tls/tls_blocking.cpp +++ b/src/lib/tls/tls_blocking.cpp @@ -25,7 +25,7 @@ Blocking_Client::Blocking_Client(read_fn reader, m_channel(TLS::Client::Callbacks( writer, std::bind(&Blocking_Client::data_cb, this, _1, _2), - std::bind(&Blocking_Client::alert_cb, this, _1, _2, _3), + std::bind(&Blocking_Client::alert_cb, this, _1), std::bind(&Blocking_Client::handshake_cb, this, _1) ), session_manager, @@ -41,7 +41,7 @@ bool Blocking_Client::handshake_cb(const Session& session) return this->handshake_complete(session); } -void Blocking_Client::alert_cb(const Alert& alert, const byte[], size_t) +void Blocking_Client::alert_cb(const Alert& alert) { this->alert_notification(alert); } diff --git a/src/lib/tls/tls_blocking.h b/src/lib/tls/tls_blocking.h index 47c5c7483..51f860008 100644 --- a/src/lib/tls/tls_blocking.h +++ b/src/lib/tls/tls_blocking.h @@ -88,7 +88,7 @@ class BOTAN_DLL Blocking_Client void data_cb(const byte data[], size_t data_len); - void alert_cb(const Alert& alert, const byte data[], size_t data_len); + void alert_cb(const Alert& alert); read_fn m_read; TLS::Client m_channel; diff --git a/src/lib/tls/tls_channel.cpp b/src/lib/tls/tls_channel.cpp index 2c7e80feb..6300bd52b 100644 --- a/src/lib/tls/tls_channel.cpp +++ b/src/lib/tls/tls_channel.cpp @@ -419,7 +419,7 @@ void Channel::process_alert(secure_vector<byte>& record) if(alert_msg.type() == Alert::NO_RENEGOTIATION) m_pending_state.reset(); - m_callbacks.alert()(alert_msg, nullptr, 0); + m_callbacks.alert()(alert_msg); if(alert_msg.is_fatal()) { diff --git a/src/lib/tls/tls_channel.h b/src/lib/tls/tls_channel.h index c9ea8edde..71356f382 100644 --- a/src/lib/tls/tls_channel.h +++ b/src/lib/tls/tls_channel.h @@ -40,7 +40,7 @@ class BOTAN_DLL Channel public: typedef std::function<void (const byte[], size_t)> output_fn; typedef std::function<void (const byte[], size_t)> data_cb; - typedef std::function<void (Alert, const byte[], size_t)> alert_cb; + typedef std::function<void (Alert)> alert_cb; typedef std::function<bool (const Session&)> handshake_cb; typedef std::function<void (const Handshake_Message&)> handshake_msg_cb; /** diff --git a/src/lib/tls/tls_ciphersuite.h b/src/lib/tls/tls_ciphersuite.h index 71596897c..cf9e1587b 100644 --- a/src/lib/tls/tls_ciphersuite.h +++ b/src/lib/tls/tls_ciphersuite.h @@ -128,7 +128,6 @@ class BOTAN_DLL Ciphersuite const char* mac_algo, size_t mac_keylen, const char* prf_algo = ""); - u16bit m_ciphersuite_code = 0; /* diff --git a/src/lib/tls/tls_client.cpp b/src/lib/tls/tls_client.cpp index ff4b20bbf..cc94aa11a 100644 --- a/src/lib/tls/tls_client.cpp +++ b/src/lib/tls/tls_client.cpp @@ -58,8 +58,8 @@ Client::Client(const Callbacks& callbacks, const std::string srp_identifier = m_creds.srp_identifier("tls-client", m_info.hostname()); Handshake_State& state = create_handshake_state(properties.get_protocol_version()); - send_client_hello(state, false, properties.get_protocol_version(), - srp_identifier, properties.get_next_protocol_versions()); + send_client_hello(state, false, properties.get_protocol_version(), + srp_identifier, properties.get_next_protocols()); } Handshake_State* Client::new_handshake_state(Handshake_IO* io) diff --git a/src/lib/tls/tls_client.h b/src/lib/tls/tls_client.h index e80739010..f73de0108 100644 --- a/src/lib/tls/tls_client.h +++ b/src/lib/tls/tls_client.h @@ -67,7 +67,7 @@ class BOTAN_DLL Client final : public Channel = {}) : m_server_info(server_info), m_protocol_version(protocol_version), - m_next_protocol_versions(next_versions) {} + m_next_protocols(next_versions) {} const Server_Information& get_server_info() { @@ -79,15 +79,15 @@ class BOTAN_DLL Client final : public Channel return m_protocol_version; } - const std::vector<std::string>& get_next_protocol_versions() - { - return m_next_protocol_versions; + const std::vector<std::string>& get_next_protocols() + { + return m_next_protocols; } private: const Server_Information& m_server_info; const Protocol_Version m_protocol_version; - const std::vector<std::string>& m_next_protocol_versions; + const std::vector<std::string>& m_next_protocols; }; Client(const Callbacks& callbacks, Session_Manager& session_manager, diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp index 6e6ac29a0..d520752ee 100644 --- a/src/tests/unit_tls.cpp +++ b/src/tests/unit_tls.cpp @@ -162,7 +162,7 @@ std::function<void (const byte[], size_t)> queue_inserter(std::vector<byte>& q) return [&](const byte buf[], size_t sz) { q.insert(q.end(), buf, buf + sz); }; } -void print_alert(Botan::TLS::Alert, const byte[], size_t) +void print_alert(Botan::TLS::Alert) { } |