From 078636eb14a98b00a3d7fd7ec468a4322e2bd989 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 17 Aug 2016 09:09:42 +0200 Subject: [PATCH] make_change_chiper_spec() removed as this message can simply be created using make_message() --- lib/TLS/include/Method.h | 9 --------- lib/TLS/src/Method.cpp | 16 +--------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/lib/TLS/include/Method.h b/lib/TLS/include/Method.h index 13cca2b..02b00ba 100644 --- a/lib/TLS/include/Method.h +++ b/lib/TLS/include/Method.h @@ -248,15 +248,6 @@ namespace eap /// sanitizing_blob make_client_key_exchange(_In_ const tls_master_secret &pms) const; - /// - /// Makes a TLS change cipher spec message - /// - /// \sa [The Transport Layer Security (TLS) Protocol Version 1.2 (Chapter A.1. Record Layer)](https://tools.ietf.org/html/rfc5246#appendix-A.1) - /// - /// \returns Change cipher spec - /// - eap::sanitizing_blob make_change_chiper_spec() const; - /// /// Makes a TLS finished message /// diff --git a/lib/TLS/src/Method.cpp b/lib/TLS/src/Method.cpp index ea18bc3..0ee2b87 100644 --- a/lib/TLS/src/Method.cpp +++ b/lib/TLS/src/Method.cpp @@ -384,7 +384,7 @@ void eap::method_tls::process_request_packet( } // Append change cipher spec to packet. - sanitizing_blob ccs(make_change_chiper_spec()); + sanitizing_blob ccs(make_message(tls_message_type_change_cipher_spec, sanitizing_blob(1, 1))); m_packet_res.m_data.insert(m_packet_res.m_data.end(), ccs.begin(), ccs.end()); { @@ -707,20 +707,6 @@ eap::sanitizing_blob eap::method_tls::make_client_key_exchange(_In_ const tls_ma } -eap::sanitizing_blob eap::method_tls::make_change_chiper_spec() const -{ - const unsigned char msg_css[] = { - tls_message_type_change_cipher_spec, // SSL record type - m_tls_version.major, // SSL major version - m_tls_version.minor, // SSL minor version - 0, // Message size (high-order byte) - 1, // Message size (low-order byte) - 1, // Message: change_cipher_spec is always "1" - }; - return sanitizing_blob(msg_css, msg_css + _countof(msg_css)); -} - - eap::sanitizing_blob eap::method_tls::make_finished() const { sanitizing_blob msg;