diff --git a/lib/EAPBase/include/Config.h b/lib/EAPBase/include/Config.h index 272f10f..bac9e45 100644 --- a/lib/EAPBase/include/Config.h +++ b/lib/EAPBase/include/Config.h @@ -33,12 +33,12 @@ namespace eap template class config_method; /// - /// Provider configuration + /// Single provider configuration /// template class config_provider; /// - /// Providers configuration + /// List of providers configuration /// template class config_providers; } diff --git a/lib/PAP/include/Config.h b/lib/PAP/include/Config.h index 0f1284e..59e8725 100644 --- a/lib/PAP/include/Config.h +++ b/lib/PAP/include/Config.h @@ -25,7 +25,7 @@ namespace eap /// /// PAP configuration /// - class config_pap; + class config_method_pap; } namespace eapserial @@ -36,7 +36,7 @@ namespace eapserial /// \param[inout] cursor Memory cursor /// \param[in] val Configuration to pack /// - inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_pap &val); + inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_pap &val); /// /// Returns packed size of a PAP based method configuration @@ -45,7 +45,7 @@ namespace eapserial /// /// \returns Size of data when packed (in bytes) /// - inline size_t get_pk_size(const eap::config_pap &val); + inline size_t get_pk_size(const eap::config_method_pap &val); /// /// Unpacks a PAP based method configuration @@ -53,7 +53,7 @@ namespace eapserial /// \param[inout] cursor Memory cursor /// \param[out] val Configuration to unpack to /// - inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_pap &val); + inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_pap &val); } #pragma once @@ -68,7 +68,7 @@ namespace eapserial namespace eap { - class config_pap : public config_method + class config_method_pap : public config_method { public: /// @@ -76,21 +76,21 @@ namespace eap /// /// \param[in] mod Reference of the EAP module to use for global services /// - config_pap(_In_ module &mod); + config_method_pap(_In_ module &mod); /// /// Copies configuration /// /// \param[in] other Configuration to copy from /// - config_pap(_In_ const config_pap &other); + config_method_pap(_In_ const config_method_pap &other); /// /// Moves configuration /// /// \param[in] other Configuration to move from /// - config_pap(_Inout_ config_pap &&other); + config_method_pap(_Inout_ config_method_pap &&other); /// /// Copies configuration @@ -99,7 +99,7 @@ namespace eap /// /// \returns Reference to this object /// - config_pap& operator=(_In_ const config_pap &other); + config_method_pap& operator=(_In_ const config_method_pap &other); /// /// Moves configuration @@ -108,7 +108,7 @@ namespace eap /// /// \returns Reference to this object /// - config_pap& operator=(_Inout_ config_pap &&other); + config_method_pap& operator=(_Inout_ config_method_pap &&other); /// /// Clones configuration @@ -129,19 +129,19 @@ namespace eap namespace eapserial { - inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_pap &val) + inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_pap &val) { pack(cursor, (const eap::config_method&)val); } - inline size_t get_pk_size(const eap::config_pap &val) + inline size_t get_pk_size(const eap::config_method_pap &val) { return get_pk_size((const eap::config_method&)val); } - inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_pap &val) + inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_pap &val) { unpack(cursor, (eap::config_method&)val); } diff --git a/lib/PAP/src/Config.cpp b/lib/PAP/src/Config.cpp index 83892f9..bc40134 100644 --- a/lib/PAP/src/Config.cpp +++ b/lib/PAP/src/Config.cpp @@ -22,27 +22,27 @@ ////////////////////////////////////////////////////////////////////// -// eap::config_pap +// eap::config_method_pap ////////////////////////////////////////////////////////////////////// -eap::config_pap::config_pap(_In_ module &mod) : config_method(mod) +eap::config_method_pap::config_method_pap(_In_ module &mod) : config_method(mod) { } -eap::config_pap::config_pap(_In_ const config_pap &other) : +eap::config_method_pap::config_method_pap(_In_ const config_method_pap &other) : config_method(other) { } -eap::config_pap::config_pap(_Inout_ config_pap &&other) : +eap::config_method_pap::config_method_pap(_Inout_ config_method_pap &&other) : config_method(std::move(other)) { } -eap::config_pap& eap::config_pap::operator=(_In_ const config_pap &other) +eap::config_method_pap& eap::config_method_pap::operator=(_In_ const config_method_pap &other) { if (this != &other) (config_method&)*this = other; @@ -51,7 +51,7 @@ eap::config_pap& eap::config_pap::operator=(_In_ const config_pap &other) } -eap::config_pap& eap::config_pap::operator=(_Inout_ config_pap &&other) +eap::config_method_pap& eap::config_method_pap::operator=(_Inout_ config_method_pap &&other) { if (this != &other) (config_method&&)*this = std::move(other); @@ -60,13 +60,13 @@ eap::config_pap& eap::config_pap::operator=(_Inout_ config_pap &&other) } -eap::config* eap::config_pap::clone() const +eap::config* eap::config_method_pap::clone() const { - return new config_pap(*this); + return new config_method_pap(*this); } -eap::type_t eap::config_pap::get_method_id() const +eap::type_t eap::config_method_pap::get_method_id() const { return eap::type_pap; } diff --git a/lib/PAP_UI/include/PAP_UI.h b/lib/PAP_UI/include/PAP_UI.h index e0af10b..acf4029 100644 --- a/lib/PAP_UI/include/PAP_UI.h +++ b/lib/PAP_UI/include/PAP_UI.h @@ -41,7 +41,7 @@ template class wxPAPConfigPanel; template -class wxPAPCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_pap, wxPasswordCredentialsPanel<_Tprov> > +class wxPAPCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_pap, wxPasswordCredentialsPanel<_Tprov> > { public: /// @@ -52,8 +52,8 @@ public: /// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name. /// \param[in] parent Parent window /// - wxPAPCredentialsConfigPanel(_Tprov &prov, eap::config_pap &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : - wxEAPCredentialsConfigPanel<_Tprov, eap::config_pap, wxPasswordCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent) + wxPAPCredentialsConfigPanel(_Tprov &prov, eap::config_method_pap &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : + wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_pap, wxPasswordCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent) { } }; @@ -66,7 +66,7 @@ public: /// /// Constructs a configuration panel /// - wxPAPConfigPanel(_Tprov &prov, eap::config_pap &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent) + wxPAPConfigPanel(_Tprov &prov, eap::config_method_pap &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent) { wxBoxSizer* sb_content; sb_content = new wxBoxSizer( wxVERTICAL ); diff --git a/lib/TLS/include/Config.h b/lib/TLS/include/Config.h index 2b5a0e1..fe07cc8 100644 --- a/lib/TLS/include/Config.h +++ b/lib/TLS/include/Config.h @@ -30,7 +30,7 @@ namespace eap /// /// TLS configuration /// - class config_tls; + class config_method_tls; /// /// Helper function to compile human-readable certificate name for UI display @@ -46,7 +46,7 @@ namespace eapserial /// \param[inout] cursor Memory cursor /// \param[in] val Configuration to pack /// - inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_tls &val); + inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_tls &val); /// /// Returns packed size of a TLS method configuration @@ -55,7 +55,7 @@ namespace eapserial /// /// \returns Size of data when packed (in bytes) /// - inline size_t get_pk_size(const eap::config_tls &val); + inline size_t get_pk_size(const eap::config_method_tls &val); /// /// Unpacks a TLS method configuration @@ -63,7 +63,7 @@ namespace eapserial /// \param[inout] cursor Memory cursor /// \param[out] val Configuration to unpack to /// - inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_tls &val); + inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_tls &val); } #pragma once @@ -82,7 +82,7 @@ namespace eapserial namespace eap { - class config_tls : public config_method + class config_method_tls : public config_method { public: /// @@ -90,21 +90,21 @@ namespace eap /// /// \param[in] mod Reference of the EAP module to use for global services /// - config_tls(_In_ module &mod); + config_method_tls(_In_ module &mod); /// /// Copies configuration /// /// \param[in] other Configuration to copy from /// - config_tls(_In_ const config_tls &other); + config_method_tls(_In_ const config_method_tls &other); /// /// Moves configuration /// /// \param[in] other Configuration to move from /// - config_tls(_Inout_ config_tls &&other); + config_method_tls(_Inout_ config_method_tls &&other); /// /// Copies configuration @@ -113,7 +113,7 @@ namespace eap /// /// \returns Reference to this object /// - config_tls& operator=(_In_ const config_tls &other); + config_method_tls& operator=(_In_ const config_method_tls &other); /// /// Moves configuration @@ -122,7 +122,7 @@ namespace eap /// /// \returns Reference to this object /// - config_tls& operator=(_Inout_ config_tls &&other); + config_method_tls& operator=(_Inout_ config_method_tls &&other); /// /// Clones configuration @@ -184,7 +184,7 @@ namespace eap namespace eapserial { - inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_tls &val) + inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_tls &val) { pack(cursor, (const eap::config_method&)val); pack(cursor, val.m_trusted_root_ca); @@ -192,7 +192,7 @@ namespace eapserial } - inline size_t get_pk_size(const eap::config_tls &val) + inline size_t get_pk_size(const eap::config_method_tls &val) { return get_pk_size((const eap::config_method&)val) + @@ -201,7 +201,7 @@ namespace eapserial } - inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_tls &val) + inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_tls &val) { unpack(cursor, (eap::config_method&)val); unpack(cursor, val.m_trusted_root_ca); diff --git a/lib/TLS/src/Config.cpp b/lib/TLS/src/Config.cpp index 38939f8..44603e8 100644 --- a/lib/TLS/src/Config.cpp +++ b/lib/TLS/src/Config.cpp @@ -63,15 +63,15 @@ tstring eap::get_cert_title(PCCERT_CONTEXT cert) ////////////////////////////////////////////////////////////////////// -// eap::config_tls +// eap::config_method_tls ////////////////////////////////////////////////////////////////////// -eap::config_tls::config_tls(_In_ module &mod) : config_method(mod) +eap::config_method_tls::config_method_tls(_In_ module &mod) : config_method(mod) { } -eap::config_tls::config_tls(_In_ const config_tls &other) : +eap::config_method_tls::config_method_tls(_In_ const config_method_tls &other) : m_trusted_root_ca(other.m_trusted_root_ca), m_server_names(other.m_server_names), config_method(other) @@ -79,7 +79,7 @@ eap::config_tls::config_tls(_In_ const config_tls &other) : } -eap::config_tls::config_tls(_Inout_ config_tls &&other) : +eap::config_method_tls::config_method_tls(_Inout_ config_method_tls &&other) : m_trusted_root_ca(std::move(other.m_trusted_root_ca)), m_server_names(std::move(other.m_server_names)), config_method(std::move(other)) @@ -87,7 +87,7 @@ eap::config_tls::config_tls(_Inout_ config_tls &&other) : } -eap::config_tls& eap::config_tls::operator=(_In_ const eap::config_tls &other) +eap::config_method_tls& eap::config_method_tls::operator=(_In_ const eap::config_method_tls &other) { if (this != &other) { (config_method&)*this = other; @@ -99,7 +99,7 @@ eap::config_tls& eap::config_tls::operator=(_In_ const eap::config_tls &other) } -eap::config_tls& eap::config_tls::operator=(_Inout_ eap::config_tls &&other) +eap::config_method_tls& eap::config_method_tls::operator=(_Inout_ eap::config_method_tls &&other) { if (this != &other) { (config_method&&)*this = std::move(other); @@ -111,13 +111,13 @@ eap::config_tls& eap::config_tls::operator=(_Inout_ eap::config_tls &&other) } -eap::config* eap::config_tls::clone() const +eap::config* eap::config_method_tls::clone() const { - return new config_tls(*this); + return new config_method_tls(*this); } -bool eap::config_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const +bool eap::config_method_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const { assert(pDoc); assert(pConfigRoot); @@ -178,7 +178,7 @@ bool eap::config_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfig } -bool eap::config_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) +bool eap::config_method_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) { assert(pConfigRoot); @@ -256,13 +256,13 @@ bool eap::config_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEa } -eap::type_t eap::config_tls::get_method_id() const +eap::type_t eap::config_method_tls::get_method_id() const { return eap::type_tls; } -bool eap::config_tls::add_trusted_ca(_In_ DWORD dwCertEncodingType, _In_ const BYTE *pbCertEncoded, _In_ DWORD cbCertEncoded) +bool eap::config_method_tls::add_trusted_ca(_In_ DWORD dwCertEncodingType, _In_ const BYTE *pbCertEncoded, _In_ DWORD cbCertEncoded) { cert_context cert; if (!cert.create(dwCertEncodingType, pbCertEncoded, cbCertEncoded)) { diff --git a/lib/TLS_UI/include/TLS_UI.h b/lib/TLS_UI/include/TLS_UI.h index 40cdec1..c72279e 100644 --- a/lib/TLS_UI/include/TLS_UI.h +++ b/lib/TLS_UI/include/TLS_UI.h @@ -351,7 +351,7 @@ public: /// /// Constructs a configuration panel /// - wxEAPTLSServerTrustPanel(_Tprov &prov, eap::config_tls &cfg, wxWindow* parent) : + wxEAPTLSServerTrustPanel(_Tprov &prov, eap::config_method_tls &cfg, wxWindow* parent) : m_prov(prov), m_cfg(cfg), wxEAPTLSServerTrustConfigPanelBase(parent) @@ -520,7 +520,7 @@ protected: protected: _Tprov &m_prov; ///< EAP provider - eap::config_tls &m_cfg; ///< TLS configuration + eap::config_method_tls &m_cfg; ///< TLS configuration winstd::library m_certmgr; ///< certmgr.dll resource library reference wxIcon m_icon; ///< Panel icon std::list m_server_names_val; ///< Acceptable authenticating server names @@ -528,7 +528,7 @@ protected: template -class wxEAPTLSCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_tls, wxEAPTLSCredentialsPanel<_Tprov> > +class wxEAPTLSCredentialsConfigPanel : public wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_tls, wxEAPTLSCredentialsPanel<_Tprov> > { public: /// @@ -539,8 +539,8 @@ public: /// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name. /// \param[in] parent Parent window /// - wxEAPTLSCredentialsConfigPanel(_Tprov &prov, eap::config_tls &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : - wxEAPCredentialsConfigPanel<_Tprov, eap::config_tls, wxEAPTLSCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent) + wxEAPTLSCredentialsConfigPanel(_Tprov &prov, eap::config_method_tls &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : + wxEAPCredentialsConfigPanel<_Tprov, eap::config_method_tls, wxEAPTLSCredentialsPanel<_Tprov> >(prov, cfg, pszCredTarget, parent) { } }; @@ -553,7 +553,7 @@ public: /// /// Constructs a configuration panel /// - wxEAPTLSConfigPanel(_Tprov &prov, eap::config_tls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent) + wxEAPTLSConfigPanel(_Tprov &prov, eap::config_method_tls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent) { wxBoxSizer* sb_content; sb_content = new wxBoxSizer( wxVERTICAL ); diff --git a/lib/TTLS/include/Config.h b/lib/TTLS/include/Config.h index 8bd7035..346d80e 100644 --- a/lib/TTLS/include/Config.h +++ b/lib/TTLS/include/Config.h @@ -25,7 +25,7 @@ namespace eap /// /// TTLS configuration /// - class config_ttls; + class config_method_ttls; } namespace eapserial @@ -36,7 +36,7 @@ namespace eapserial /// \param[inout] cursor Memory cursor /// \param[in] val Configuration to pack /// - inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_ttls &val); + inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_ttls &val); /// /// Returns packed size of a TTLS based method configuration @@ -45,7 +45,7 @@ namespace eapserial /// /// \returns Size of data when packed (in bytes) /// - inline size_t get_pk_size(const eap::config_ttls &val); + inline size_t get_pk_size(const eap::config_method_ttls &val); /// /// Unpacks a TTLS based method configuration @@ -53,7 +53,7 @@ namespace eapserial /// \param[inout] cursor Memory cursor /// \param[out] val Configuration to unpack to /// - inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_ttls &val); + inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_ttls &val); } #pragma once @@ -66,7 +66,7 @@ namespace eapserial namespace eap { - class config_ttls : public config_tls + class config_method_ttls : public config_method_tls { public: /// @@ -74,26 +74,26 @@ namespace eap { /// /// \param[in] mod Reference of the EAP module to use for global services /// - config_ttls(_In_ module &mod); + config_method_ttls(_In_ module &mod); /// /// Copies configuration /// /// \param[in] other Configuration to copy from /// - config_ttls(const _In_ config_ttls &other); + config_method_ttls(const _In_ config_method_ttls &other); /// /// Moves configuration /// /// \param[in] other Configuration to move from /// - config_ttls(_Inout_ config_ttls &&other); + config_method_ttls(_Inout_ config_method_ttls &&other); /// /// Destructs configuration /// - virtual ~config_ttls(); + virtual ~config_method_ttls(); /// /// Copies configuration @@ -102,7 +102,7 @@ namespace eap { /// /// \returns Reference to this object /// - config_ttls& operator=(const _In_ config_ttls &other); + config_method_ttls& operator=(const _In_ config_method_ttls &other); /// /// Moves configuration @@ -111,7 +111,7 @@ namespace eap { /// /// \returns Reference to this object /// - config_ttls& operator=(_Inout_ config_ttls &&other); + config_method_ttls& operator=(_Inout_ config_method_ttls &&other); /// /// Clones configuration @@ -165,13 +165,13 @@ namespace eap { namespace eapserial { - inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_ttls &val) + inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::config_method_ttls &val) { - pack(cursor, (const eap::config_tls&)val); + pack(cursor, (const eap::config_method_tls&)val); if (val.m_inner) { - if (dynamic_cast(val.m_inner)) { + if (dynamic_cast(val.m_inner)) { pack(cursor, eap::type_pap); - pack(cursor, (const eap::config_pap&)*val.m_inner); + pack(cursor, (const eap::config_method_pap&)*val.m_inner); } else { assert(0); // Unsupported inner authentication method type. pack(cursor, eap::type_undefined); @@ -181,14 +181,14 @@ namespace eapserial } - inline size_t get_pk_size(const eap::config_ttls &val) + inline size_t get_pk_size(const eap::config_method_ttls &val) { size_t size_inner; if (val.m_inner) { - if (dynamic_cast(val.m_inner)) { + if (dynamic_cast(val.m_inner)) { size_inner = get_pk_size(eap::type_pap) + - get_pk_size((const eap::config_pap&)*val.m_inner); + get_pk_size((const eap::config_method_pap&)*val.m_inner); } else { size_inner = get_pk_size(eap::type_undefined); assert(0); // Unsupported inner authentication method type. @@ -197,14 +197,14 @@ namespace eapserial size_inner = get_pk_size(eap::type_undefined); return - get_pk_size((const eap::config_tls&)val) + + get_pk_size((const eap::config_method_tls&)val) + size_inner; } - inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_ttls &val) + inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::config_method_ttls &val) { - unpack(cursor, (eap::config_tls&)val); + unpack(cursor, (eap::config_method_tls&)val); if (val.m_inner) delete val.m_inner; @@ -213,8 +213,8 @@ namespace eapserial unpack(cursor, eap_type); switch (eap_type) { case eap::type_pap: - val.m_inner = new eap::config_pap(val.m_module); - unpack(cursor, (eap::config_pap&)*val.m_inner); + val.m_inner = new eap::config_method_pap(val.m_module); + unpack(cursor, (eap::config_method_pap&)*val.m_inner); break; default: val.m_inner = NULL; diff --git a/lib/TTLS/include/Module.h b/lib/TTLS/include/Module.h index 5a9142a..e3ee399 100644 --- a/lib/TTLS/include/Module.h +++ b/lib/TTLS/include/Module.h @@ -35,7 +35,7 @@ namespace eap namespace eap { - class peer_ttls : public peer + class peer_ttls : public peer { public: /// diff --git a/lib/TTLS/include/Session.h b/lib/TTLS/include/Session.h index d5e1cc3..0ffd88a 100644 --- a/lib/TTLS/include/Session.h +++ b/lib/TTLS/include/Session.h @@ -33,7 +33,7 @@ namespace eap namespace eap { - class session_ttls : public session + class session_ttls : public session { public: /// diff --git a/lib/TTLS/src/Config.cpp b/lib/TTLS/src/Config.cpp index 477d480..bfeff8d 100644 --- a/lib/TTLS/src/Config.cpp +++ b/lib/TTLS/src/Config.cpp @@ -25,42 +25,42 @@ using namespace winstd; ////////////////////////////////////////////////////////////////////// -// eap::config_ttls +// eap::config_method_ttls ////////////////////////////////////////////////////////////////////// -eap::config_ttls::config_ttls(_In_ module &mod) : +eap::config_method_ttls::config_method_ttls(_In_ module &mod) : m_inner(NULL), - config_tls(mod) + config_method_tls(mod) { } -eap::config_ttls::config_ttls(const _In_ config_ttls &other) : +eap::config_method_ttls::config_method_ttls(const _In_ config_method_ttls &other) : m_inner(other.m_inner ? (config_method*)other.m_inner->clone() : NULL), - config_tls(other) + config_method_tls(other) { } -eap::config_ttls::config_ttls(_Inout_ config_ttls &&other) : +eap::config_method_ttls::config_method_ttls(_Inout_ config_method_ttls &&other) : m_inner(other.m_inner), - config_tls(std::move(other)) + config_method_tls(std::move(other)) { other.m_inner = NULL; } -eap::config_ttls::~config_ttls() +eap::config_method_ttls::~config_method_ttls() { if (m_inner) delete m_inner; } -eap::config_ttls& eap::config_ttls::operator=(const _In_ config_ttls &other) +eap::config_method_ttls& eap::config_method_ttls::operator=(const _In_ config_method_ttls &other) { if (this != &other) { - (config_tls&)*this = other; + (config_method_tls&)*this = other; if (m_inner) delete m_inner; m_inner = other.m_inner ? (config_method*)other.m_inner->clone() : NULL; } @@ -69,10 +69,10 @@ eap::config_ttls& eap::config_ttls::operator=(const _In_ config_ttls &other) } -eap::config_ttls& eap::config_ttls::operator=(_Inout_ config_ttls &&other) +eap::config_method_ttls& eap::config_method_ttls::operator=(_Inout_ config_method_ttls &&other) { if (this != &other) { - (config_tls&&)*this = std::move(other); + (config_method_tls&&)*this = std::move(other); if (m_inner) delete m_inner; m_inner = other.m_inner; other.m_inner = NULL; @@ -82,19 +82,19 @@ eap::config_ttls& eap::config_ttls::operator=(_Inout_ config_ttls &&other) } -eap::config* eap::config_ttls::clone() const +eap::config* eap::config_method_ttls::clone() const { - return new config_ttls(*this); + return new config_method_ttls(*this); } -bool eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const +bool eap::config_method_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const { assert(pDoc); assert(pConfigRoot); assert(ppEapError); - if (!config_tls::save(pDoc, pConfigRoot, ppEapError)) + if (!config_method_tls::save(pDoc, pConfigRoot, ppEapError)) return false; const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata"); @@ -107,7 +107,7 @@ bool eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfi return false; } - if (dynamic_cast(m_inner)) { + if (dynamic_cast(m_inner)) { // / if ((dwResult = eapxml::put_element_value(pDoc, pXmlElInnerAuthenticationMethod, bstr(L"NonEAPAuthMethod"), bstrNamespace, bstr(L"PAP"))) != ERROR_SUCCESS) { *ppEapError = m_module.make_error(dwResult, _T(__FUNCTION__) _T(" Error creating element.")); @@ -126,13 +126,13 @@ bool eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfi } -bool eap::config_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) +bool eap::config_method_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) { assert(pConfigRoot); assert(ppEapError); DWORD dwResult; - if (!config_tls::load(pConfigRoot, ppEapError)) + if (!config_method_tls::load(pConfigRoot, ppEapError)) return false; std::wstring xpath(eapxml::get_xpath(pConfigRoot)); @@ -159,7 +159,7 @@ bool eap::config_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppE // PAP m_module.log_config((xpath + L"/NonEAPAuthMethod").c_str(), L"PAP"); assert(!m_inner); - m_inner = new eap::config_pap(m_module); + m_inner = new eap::config_method_pap(m_module); if (!m_inner->load(pXmlElInnerAuthenticationMethod, ppEapError)) return false; } else { @@ -171,7 +171,7 @@ bool eap::config_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppE } -eap::type_t eap::config_ttls::get_method_id() const +eap::type_t eap::config_method_ttls::get_method_id() const { return eap::type_ttls; } diff --git a/lib/TTLS/src/Module.cpp b/lib/TTLS/src/Module.cpp index 09fb15d..5d00048 100644 --- a/lib/TTLS/src/Module.cpp +++ b/lib/TTLS/src/Module.cpp @@ -28,7 +28,7 @@ using namespace winstd; // eap::peer_ttls ////////////////////////////////////////////////////////////////////// -eap::peer_ttls::peer_ttls() : peer(type_ttls) +eap::peer_ttls::peer_ttls() : peer(type_ttls) { } diff --git a/lib/TTLS/src/Session.cpp b/lib/TTLS/src/Session.cpp index 64009eb..6362dee 100644 --- a/lib/TTLS/src/Session.cpp +++ b/lib/TTLS/src/Session.cpp @@ -28,19 +28,19 @@ using namespace winstd; // eap::session_ttls ////////////////////////////////////////////////////////////////////// -eap::session_ttls::session_ttls(_In_ module &mod) : session(mod) +eap::session_ttls::session_ttls(_In_ module &mod) : session(mod) { } eap::session_ttls::session_ttls(_In_ const session_ttls &other) : - session(other) + session(other) { } eap::session_ttls::session_ttls(_Inout_ session_ttls &&other) : - session(std::move(other)) + session(std::move(other)) { } @@ -48,7 +48,7 @@ eap::session_ttls::session_ttls(_Inout_ session_ttls &&other) : eap::session_ttls& eap::session_ttls::operator=(_In_ const session_ttls &other) { if (this != &other) - (session&)*this = other; + (session&)*this = other; return *this; } @@ -57,7 +57,7 @@ eap::session_ttls& eap::session_ttls::operator=(_In_ const session_ttls &other) eap::session_ttls& eap::session_ttls::operator=(_Inout_ session_ttls &&other) { if (this != &other) - (session&)*this = std::move(other); + (session&)*this = std::move(other); return *this; } diff --git a/lib/TTLS_UI/include/Module.h b/lib/TTLS_UI/include/Module.h index 97daf01..b35150b 100644 --- a/lib/TTLS_UI/include/Module.h +++ b/lib/TTLS_UI/include/Module.h @@ -35,7 +35,7 @@ namespace eap namespace eap { - class peer_ttls_ui : public peer_ui + class peer_ttls_ui : public peer_ui { public: /// diff --git a/lib/TTLS_UI/include/TTLS_UI.h b/lib/TTLS_UI/include/TTLS_UI.h index 138cffb..f767997 100644 --- a/lib/TTLS_UI/include/TTLS_UI.h +++ b/lib/TTLS_UI/include/TTLS_UI.h @@ -53,7 +53,7 @@ public: /// /// Constructs a configuration panel /// - wxEAPTTLSConfigPanel(_Tprov &prov, eap::config_ttls &cfg, wxWindow* parent) : + wxEAPTTLSConfigPanel(_Tprov &prov, eap::config_method_ttls &cfg, wxWindow* parent) : m_prov(prov), m_cfg(cfg), wxEAPTTLSConfigPanelBase(parent) @@ -122,7 +122,7 @@ protected: protected: _Tprov &m_prov; ///< EAP provider - eap::config_ttls &m_cfg; ///< TTLS configuration + eap::config_method_ttls &m_cfg; ///< TTLS configuration winstd::library m_shell32; ///< shell32.dll resource library reference wxIcon m_icon; ///< Panel icon }; @@ -139,7 +139,7 @@ public: /// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name. /// \param[in] parent Parent window /// - wxEAPTTLSConfig(_Tprov &prov, eap::config_ttls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : + wxEAPTTLSConfig(_Tprov &prov, eap::config_method_ttls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : m_prov(prov), m_cfg(cfg), m_cfg_pap(cfg.m_module), @@ -213,7 +213,7 @@ protected: m_inner_type->GetChoiceCtrl()->Enable(false); } - eap::config_pap *cfg_pap = dynamic_cast(m_cfg.m_inner); + eap::config_method_pap *cfg_pap = dynamic_cast(m_cfg.m_inner); if (cfg_pap) { m_cfg_pap = *cfg_pap; m_inner_type->SetSelection(0); // 0=PAP @@ -235,7 +235,7 @@ protected: switch (m_inner_type->GetSelection()) { case 0: // 0=PAP delete m_cfg.m_inner; - m_cfg.m_inner = new eap::config_pap(m_cfg_pap); + m_cfg.m_inner = new eap::config_method_pap(m_cfg_pap); break; default: @@ -263,12 +263,12 @@ protected: protected: _Tprov &m_prov; ///< EAP provider - eap::config_ttls &m_cfg; ///< TTLS configuration + eap::config_method_ttls &m_cfg; ///< TTLS configuration wxStaticText *m_outer_title; ///< Outer authentication title wxEAPTTLSConfigPanel<_Tprov> *m_outer_identity; ///< Outer identity configuration panel wxEAPTLSConfigPanel<_Tprov> *m_tls; ///< TLS configuration panel wxStaticText *m_inner_title; ///< Inner authentication title wxChoicebook *m_inner_type; ///< Inner authentication type - eap::config_pap m_cfg_pap; ///< Temporary PAP configuration + eap::config_method_pap m_cfg_pap; ///< Temporary PAP configuration }; diff --git a/lib/TTLS_UI/src/Module.cpp b/lib/TTLS_UI/src/Module.cpp index d775f69..f9b3a68 100644 --- a/lib/TTLS_UI/src/Module.cpp +++ b/lib/TTLS_UI/src/Module.cpp @@ -25,7 +25,7 @@ // eap::peer_ttls_ui ////////////////////////////////////////////////////////////////////// -eap::peer_ttls_ui::peer_ttls_ui() : peer_ui(type_ttls) +eap::peer_ttls_ui::peer_ttls_ui() : peer_ui(type_ttls) { } @@ -50,7 +50,7 @@ bool eap::peer_ttls_ui::invoke_config_ui( wxTopLevelWindows.Append(&parent); // Create and launch configuration dialog. - wxEAPConfigDialog > dlg(cfg, &parent); + wxEAPConfigDialog > dlg(cfg, &parent); result = dlg.ShowModal(); wxTopLevelWindows.DeleteObject(&parent);