EAP-GTC implementation continues...

This commit is contained in:
Simon Rozman 2017-01-31 13:54:55 +01:00
parent f9083dc300
commit d508a6c398
6 changed files with 13 additions and 13 deletions

View File

@ -101,7 +101,7 @@ namespace eap
/// ///
/// @copydoc eap::config_method::make_credentials() /// @copydoc eap::config_method::make_credentials()
/// \returns This implementation always returns `eap::credentials` type of credentials /// \returns This implementation always returns `eap::credentials_identity` type of credentials
/// ///
virtual credentials* make_credentials() const; virtual credentials* make_credentials() const;
}; };

View File

@ -50,7 +50,7 @@ namespace eap
/// \param[in] cfg Method configuration /// \param[in] cfg Method configuration
/// \param[in] cred User credentials /// \param[in] cred User credentials
/// ///
method_gtc(_In_ module &mod, _In_ config_method_eapgtc &cfg, _In_ credentials &cred); method_gtc(_In_ module &mod, _In_ config_method_eapgtc &cfg, _In_ credentials_identity &cred);
/// ///
/// Moves a GTC method /// Moves a GTC method
@ -111,7 +111,7 @@ namespace eap
protected: protected:
config_method_eapgtc &m_cfg; ///< Method configuration config_method_eapgtc &m_cfg; ///< Method configuration
credentials &m_cred; ///< Method user credentials credentials_identity &m_cred; ///< Method user credentials
winstd::sanitizing_wstring m_message; ///< Authenticator message winstd::sanitizing_wstring m_message; ///< Authenticator message
winstd::sanitizing_wstring m_reply; ///< GTC reply winstd::sanitizing_wstring m_reply; ///< GTC reply
}; };

View File

@ -30,7 +30,7 @@ using namespace winstd;
eap::config_method_eapgtc::config_method_eapgtc(_In_ module &mod, _In_ unsigned int level) : config_method_with_cred(mod, level) eap::config_method_eapgtc::config_method_eapgtc(_In_ module &mod, _In_ unsigned int level) : config_method_with_cred(mod, level)
{ {
m_cred.reset(new credentials(mod)); m_cred.reset(new credentials_identity(mod));
} }
@ -84,5 +84,5 @@ const wchar_t* eap::config_method_eapgtc::get_method_str() const
eap::credentials* eap::config_method_eapgtc::make_credentials() const eap::credentials* eap::config_method_eapgtc::make_credentials() const
{ {
return new eap::credentials(m_module); return new eap::credentials_identity(m_module);
} }

View File

@ -28,7 +28,7 @@ using namespace winstd;
// eap::method_gtc // eap::method_gtc
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
eap::method_gtc::method_gtc(_In_ module &mod, _In_ config_method_eapgtc &cfg, _In_ credentials &cred) : eap::method_gtc::method_gtc(_In_ module &mod, _In_ config_method_eapgtc &cfg, _In_ credentials_identity &cred) :
m_cfg(cfg), m_cfg(cfg),
m_cred(cred), m_cred(cred),
method(mod) method(mod)

View File

@ -26,15 +26,15 @@ class wxGTCConfigPanel;
/// \addtogroup EAPBaseGUI /// \addtogroup EAPBaseGUI
/// @{ /// @{
///
/// GTC credential configuration panel
///
typedef wxEAPCredentialsConfigPanel<eap::credentials, wxIdentityCredentialsPanel<eap::credentials, wxIdentityCredentialsPanelBase> > wxGTCCredentialsConfigPanel;
/// ///
/// GTC credential entry panel /// GTC credential entry panel
/// ///
typedef wxIdentityCredentialsPanel<eap::credentials, wxIdentityCredentialsPanelBase> wxGTCCredentialsPanel; typedef wxIdentityCredentialsPanel<eap::credentials_identity, wxIdentityCredentialsPanelBase> wxGTCCredentialsPanel;
///
/// GTC credential configuration panel
///
typedef wxEAPCredentialsConfigPanel<eap::credentials_identity, wxGTCCredentialsPanel> wxGTCCredentialsConfigPanel;
/// @} /// @}

View File

@ -255,7 +255,7 @@ EAP_SESSION_HANDLE eap::peer_ttls::begin_session(
case eap_type_gtc : meth_inner.reset( case eap_type_gtc : meth_inner.reset(
new method_eapmsg (*this, cred_inner->get_identity().c_str(), new method_eapmsg (*this, cred_inner->get_identity().c_str(),
new method_eap (*this, eap_type_gtc, new method_eap (*this, eap_type_gtc,
new method_gtc (*this, dynamic_cast<config_method_eapgtc&>(*cfg_inner), dynamic_cast<credentials_pass&>(*cred_inner))))); break; new method_gtc (*this, dynamic_cast<config_method_eapgtc&>(*cfg_inner), dynamic_cast<credentials_identity&>(*cred_inner))))); break;
default: throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method."); default: throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
} }
} }