From fb8ca2de2412aa9fe3bcaad22f3c3b17fa0abe9c Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 14 Jan 2020 15:52:20 +0100 Subject: [PATCH] Rename ui_context_ttls => ui_context_tls_tunnel to make reusable Signed-off-by: Simon Rozman --- lib/TTLS/include/UIContext.h | 16 ++++++++-------- lib/TTLS/src/Module.cpp | 2 +- lib/TTLS/src/UIContext.cpp | 18 +++++++++--------- lib/TTLS_UI/src/Module.cpp | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/TTLS/include/UIContext.h b/lib/TTLS/include/UIContext.h index 979a90f..a6ab234 100644 --- a/lib/TTLS/include/UIContext.h +++ b/lib/TTLS/include/UIContext.h @@ -20,7 +20,7 @@ namespace eap { - class ui_context_ttls; + class ui_context_tls_tunnel; } #pragma once @@ -36,9 +36,9 @@ namespace eap /// @{ /// - /// EAP-TTLS UI context + /// TLS tunnel UI context /// - class ui_context_ttls : public ui_context + class ui_context_tls_tunnel : public ui_context { public: /// @@ -47,21 +47,21 @@ namespace eap /// \param[in] cfg Connection configuration /// \param[in] cred Connection credentials /// - ui_context_ttls(_In_ config_connection &cfg, _In_ credentials_connection &cred); + ui_context_tls_tunnel(_In_ config_connection &cfg, _In_ credentials_connection &cred); /// /// Copies context /// /// \param[in] other Credentials to copy from /// - ui_context_ttls(_In_ const ui_context_ttls &other); + ui_context_tls_tunnel(_In_ const ui_context_tls_tunnel &other); /// /// Moves context /// /// \param[in] other Credentials to move from /// - ui_context_ttls(_Inout_ ui_context_ttls &&other) noexcept; + ui_context_tls_tunnel(_Inout_ ui_context_tls_tunnel &&other) noexcept; /// /// Copies context @@ -70,7 +70,7 @@ namespace eap /// /// \returns Reference to this object /// - ui_context_ttls& operator=(_In_ const ui_context_ttls &other); + ui_context_tls_tunnel& operator=(_In_ const ui_context_tls_tunnel &other); /// /// Moves context @@ -79,7 +79,7 @@ namespace eap /// /// \returns Reference to this object /// - ui_context_ttls& operator=(_Inout_ ui_context_ttls &&other) noexcept; + ui_context_tls_tunnel& operator=(_Inout_ ui_context_tls_tunnel &&other) noexcept; /// \name BLOB management /// @{ diff --git a/lib/TTLS/src/Module.cpp b/lib/TTLS/src/Module.cpp index b1e6b4a..fab91f8 100644 --- a/lib/TTLS/src/Module.cpp +++ b/lib/TTLS/src/Module.cpp @@ -371,7 +371,7 @@ void eap::peer_ttls::get_ui_context( auto s = static_cast(hSession); // Get context data from method. - ui_context_ttls ctx(s->m_cfg, s->m_cred); + ui_context_tls_tunnel ctx(s->m_cfg, s->m_cred); s->m_method->get_ui_context(ctx.m_data); // Pack context data. diff --git a/lib/TTLS/src/UIContext.cpp b/lib/TTLS/src/UIContext.cpp index 3d98ced..d182009 100644 --- a/lib/TTLS/src/UIContext.cpp +++ b/lib/TTLS/src/UIContext.cpp @@ -25,30 +25,30 @@ using namespace winstd; ////////////////////////////////////////////////////////////////////// -// eap::ui_context_ttls +// eap::ui_context_tls_tunnel ////////////////////////////////////////////////////////////////////// -eap::ui_context_ttls::ui_context_ttls(_In_ config_connection &cfg, _In_ credentials_connection &cred) : +eap::ui_context_tls_tunnel::ui_context_tls_tunnel(_In_ config_connection &cfg, _In_ credentials_connection &cred) : ui_context(cfg, cred) { } -eap::ui_context_ttls::ui_context_ttls(_In_ const ui_context_ttls &other) : +eap::ui_context_tls_tunnel::ui_context_tls_tunnel(_In_ const ui_context_tls_tunnel &other) : m_data (other.m_data), ui_context(other ) { } -eap::ui_context_ttls::ui_context_ttls(_Inout_ ui_context_ttls &&other) noexcept : +eap::ui_context_tls_tunnel::ui_context_tls_tunnel(_Inout_ ui_context_tls_tunnel &&other) noexcept : m_data (std::move(other.m_data)), ui_context(std::move(other )) { } -eap::ui_context_ttls& eap::ui_context_ttls::operator=(_In_ const ui_context_ttls &other) +eap::ui_context_tls_tunnel& eap::ui_context_tls_tunnel::operator=(_In_ const ui_context_tls_tunnel &other) { if (this != &other) { (ui_context&)*this = other; @@ -59,7 +59,7 @@ eap::ui_context_ttls& eap::ui_context_ttls::operator=(_In_ const ui_context_ttls } -eap::ui_context_ttls& eap::ui_context_ttls::operator=(_Inout_ ui_context_ttls &&other) noexcept +eap::ui_context_tls_tunnel& eap::ui_context_tls_tunnel::operator=(_Inout_ ui_context_tls_tunnel &&other) noexcept { if (this != &other) { (ui_context&)*this = std::move(other ); @@ -70,14 +70,14 @@ eap::ui_context_ttls& eap::ui_context_ttls::operator=(_Inout_ ui_context_ttls && } -void eap::ui_context_ttls::operator<<(_Inout_ cursor_out &cursor) const +void eap::ui_context_tls_tunnel::operator<<(_Inout_ cursor_out &cursor) const { ui_context::operator<<(cursor); cursor << m_data; } -size_t eap::ui_context_ttls::get_pk_size() const +size_t eap::ui_context_tls_tunnel::get_pk_size() const { return ui_context::get_pk_size() + @@ -85,7 +85,7 @@ size_t eap::ui_context_ttls::get_pk_size() const } -void eap::ui_context_ttls::operator>>(_Inout_ cursor_in &cursor) +void eap::ui_context_tls_tunnel::operator>>(_Inout_ cursor_in &cursor) { ui_context::operator>>(cursor); cursor >> m_data; diff --git a/lib/TTLS_UI/src/Module.cpp b/lib/TTLS_UI/src/Module.cpp index a4ff86b..3149408 100644 --- a/lib/TTLS_UI/src/Module.cpp +++ b/lib/TTLS_UI/src/Module.cpp @@ -388,7 +388,7 @@ void eap::peer_ttls_ui::invoke_interactive_ui( // Unpack context data. config_connection cfg(*this); credentials_connection cred(*this, cfg); - ui_context_ttls ctx(cfg, cred); + ui_context_tls_tunnel ctx(cfg, cred); unpack(ctx, pUIContextData, dwUIContextDataSize); // Look-up the provider.