diff options
author | lloyd <[email protected]> | 2012-01-23 17:41:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-23 17:41:12 +0000 |
commit | a12a50cc0eaf5113d2f0687f4c1d4be5ff820838 (patch) | |
tree | c800f3271e84e28e751c6ab30abdee21fc1b1acb /src/tls/tls_server.cpp | |
parent | a445f7f4a1089fc034c35c500e1572eb9518f44f (diff) |
Make the version number a proper class, makes many things much easier
for such a minor change.
Diffstat (limited to 'src/tls/tls_server.cpp')
-rw-r--r-- | src/tls/tls_server.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tls/tls_server.cpp b/src/tls/tls_server.cpp index 6c6977b91..54873e682 100644 --- a/src/tls/tls_server.cpp +++ b/src/tls/tls_server.cpp @@ -67,13 +67,13 @@ bool check_for_resume(Session& session_info, * TLS Server Constructor */ Server::Server(std::tr1::function<void (const byte[], size_t)> output_fn, - std::tr1::function<void (const byte[], size_t, u16bit)> proc_fn, - std::tr1::function<bool (const Session&)> handshake_fn, - Session_Manager& session_manager, - Credentials_Manager& creds, - const Policy& policy, - RandomNumberGenerator& rng, - const std::vector<std::string>& next_protocols) : + std::tr1::function<void (const byte[], size_t, u16bit)> proc_fn, + std::tr1::function<bool (const Session&)> handshake_fn, + Session_Manager& session_manager, + Credentials_Manager& creds, + const Policy& policy, + RandomNumberGenerator& rng, + const std::vector<std::string>& next_protocols) : Channel(output_fn, proc_fn, handshake_fn), policy(policy), rng(rng), @@ -112,7 +112,7 @@ void Server::alert_notify(bool, Alert_Type type) * Split up and process handshake messages */ void Server::read_handshake(byte rec_type, - const MemoryRegion<byte>& rec_buf) + const MemoryRegion<byte>& rec_buf) { if(rec_type == HANDSHAKE && !state) { @@ -127,7 +127,7 @@ void Server::read_handshake(byte rec_type, * Process a handshake message */ void Server::process_handshake_msg(Handshake_Type type, - const MemoryRegion<byte>& contents) + const MemoryRegion<byte>& contents) { if(state == 0) throw Unexpected_Message("Unexpected handshake message from client"); @@ -155,7 +155,7 @@ void Server::process_handshake_msg(Handshake_Type type, m_hostname = state->client_hello->sni_hostname(); - Version_Code client_version = state->client_hello->version(); + Protocol_Version client_version = state->client_hello->version(); if(client_version < policy.min_version()) throw TLS_Exception(PROTOCOL_VERSION, @@ -184,7 +184,7 @@ void Server::process_handshake_msg(Handshake_Type type, writer, state->hash, session_info.session_id(), - Version_Code(session_info.version()), + Protocol_Version(session_info.version()), session_info.ciphersuite(), session_info.compression_method(), session_info.fragment_size(), |