diff options
author | Matthias Gierlings <[email protected]> | 2016-04-29 20:44:30 +0200 |
---|---|---|
committer | Matthias Gierlings <[email protected]> | 2016-06-19 18:25:46 +0200 |
commit | d4f3e7c4ac584daa9d7e1ae10cb3412e450e25cf (patch) | |
tree | 5541bf045d77110a55f1858e385f54d7b761851b /src/lib/tls/tls_blocking.cpp | |
parent | 23d6f67e76b633077b5de91945f61290ff091e1e (diff) |
Reduction of code complexity in TLS classes.
-reduced number of parameters in various methods
-reduced cyclomatic complexity (McCabe-Metric)
-removed "TLSEXT_HEARTBEAT_SUPPORT" from tls_extensions.h (leftover
from heartbeat extension removal?)
Diffstat (limited to 'src/lib/tls/tls_blocking.cpp')
-rw-r--r-- | src/lib/tls/tls_blocking.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/tls/tls_blocking.cpp b/src/lib/tls/tls_blocking.cpp index a1867b6b5..14e04693d 100644 --- a/src/lib/tls/tls_blocking.cpp +++ b/src/lib/tls/tls_blocking.cpp @@ -1,6 +1,7 @@ /* * TLS Blocking API * (C) 2013 Jack Lloyd +* 2016 Matthias Gierlings * * Botan is released under the Simplified BSD License (see license.txt) */ @@ -19,21 +20,19 @@ Blocking_Client::Blocking_Client(read_fn reader, Credentials_Manager& creds, const Policy& policy, RandomNumberGenerator& rng, - const Server_Information& server_info, - const Protocol_Version& offer_version, - const std::vector<std::string>& next) : + TLS::Client::Properties& properties) : m_read(reader), - m_channel(writer, - std::bind(&Blocking_Client::data_cb, this, _1, _2), - std::bind(&Blocking_Client::alert_cb, this, _1, _2, _3), - std::bind(&Blocking_Client::handshake_cb, this, _1), + 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::handshake_cb, this, _1) + ), session_manager, creds, policy, rng, - server_info, - offer_version, - next) + properties) { } |