From 83ebcf2351b6cf9c8320bbe6fe87e307e40577dc Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 28 Dec 2011 12:58:12 +0000 Subject: Make TLS_Session_Params a real class. Various cleanups. --- src/tls/hello.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/tls/hello.cpp') diff --git a/src/tls/hello.cpp b/src/tls/hello.cpp index 51601db08..1312d075a 100644 --- a/src/tls/hello.cpp +++ b/src/tls/hello.cpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace Botan { @@ -71,7 +72,7 @@ Client_Hello::Client_Hello(RandomNumberGenerator& rng, c_random = rng.random_vec(32); suites = policy.ciphersuites(); - comp_algos = policy.compression(); + comp_methods = policy.compression(); c_version = policy.pref_version(); send(writer, hash); @@ -90,7 +91,7 @@ MemoryVector Client_Hello::serialize() const append_tls_length_value(buf, sess_id, 1); append_tls_length_value(buf, suites, 2); - append_tls_length_value(buf, comp_algos, 1); + append_tls_length_value(buf, comp_methods, 1); return buf; } @@ -150,7 +151,7 @@ void Client_Hello::deserialize(const MemoryRegion& buf) suites = reader.get_range_vector(2, 1, 32767); - comp_algos = reader.get_range_vector(1, 1, 255); + comp_methods = reader.get_range_vector(1, 1, 255); if(reader.has_remaining()) { @@ -251,7 +252,7 @@ Server_Hello::Server_Hello(RandomNumberGenerator& rng, throw TLS_Exception(PROTOCOL_VERSION, "Can't agree on a ciphersuite with client"); - comp_algo = policy.choose_compression(c_hello.compression_algos()); + comp_method = policy.choose_compression(c_hello.compression_methods()); send(writer, hash); } @@ -270,7 +271,7 @@ Server_Hello::Server_Hello(RandomNumberGenerator& rng, sess_id(session_id), s_random(rng.random_vec(32)), suite(ciphersuite), - comp_algo(compression) + comp_method(compression) { send(writer, hash); } @@ -291,7 +292,7 @@ MemoryVector Server_Hello::serialize() const buf.push_back(get_byte(0, suite)); buf.push_back(get_byte(1, suite)); - buf.push_back(comp_algo); + buf.push_back(comp_method); return buf; } @@ -320,7 +321,7 @@ void Server_Hello::deserialize(const MemoryRegion& buf) suite = reader.get_u16bit(); - comp_algo = reader.get_byte(); + comp_method = reader.get_byte(); } /* -- cgit v1.2.3