ID 1. Variables shadowing from security audit report fixed

This commit is contained in:
2016-10-03 09:35:14 +02:00
parent c1a483a0bd
commit 7924612419
4 changed files with 10 additions and 19 deletions

View File

@@ -141,9 +141,6 @@ namespace eap
virtual void process_application_data(_In_bytecount_(size_msg) const void *msg, _In_ size_t size_msg);
protected:
config_method_ttls &m_cfg; ///< EAP-TTLS method configuration
credentials_ttls &m_cred; ///< EAP-TTLS credentials
#pragma warning(suppress: 4480)
enum version_t :unsigned char {
version_0 = 0, ///< EAP-TTLS v0

View File

@@ -29,8 +29,6 @@ using namespace winstd;
//////////////////////////////////////////////////////////////////////
eap::method_ttls::method_ttls(_In_ module &module, _In_ config_method_ttls &cfg, _In_ credentials_ttls &cred) :
m_cfg(cfg),
m_cred(cred),
m_version(version_0),
method_tls(module, cfg, cred)
{
@@ -38,8 +36,6 @@ eap::method_ttls::method_ttls(_In_ module &module, _In_ config_method_ttls &cfg,
eap::method_ttls::method_ttls(_Inout_ method_ttls &&other) :
m_cfg ( other.m_cfg ),
m_cred ( other.m_cred ),
m_version (std::move(other.m_version)),
m_inner (std::move(other.m_inner )),
method_tls(std::move(other ))
@@ -68,9 +64,9 @@ void eap::method_ttls::begin_session(
method_tls::begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, dwMaxSendPacketSize);
// Initialize inner method.
switch (m_cfg.m_inner->get_method_id()) {
case eap_type_legacy_pap : m_inner.reset(new method_pap (m_module, (config_method_pap &)*m_cfg.m_inner, (credentials_pass &)*m_cred.m_inner.get())); break;
case eap_type_legacy_mschapv2: m_inner.reset(new method_mschapv2(m_module, (config_method_mschapv2&)*m_cfg.m_inner, (credentials_pass&)*m_cred.m_inner.get())); break;
switch (dynamic_cast<config_method_ttls&>(m_cfg).m_inner->get_method_id()) {
case eap_type_legacy_pap : m_inner.reset(new method_pap (m_module, (config_method_pap &)*dynamic_cast<config_method_ttls&>(m_cfg).m_inner, (credentials_pass&)*dynamic_cast<credentials_ttls&>(m_cred).m_inner.get())); break;
case eap_type_legacy_mschapv2: m_inner.reset(new method_mschapv2(m_module, (config_method_mschapv2&)*dynamic_cast<config_method_ttls&>(m_cfg).m_inner, (credentials_pass&)*dynamic_cast<credentials_ttls&>(m_cred).m_inner.get())); break;
default: throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
}
m_inner->begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, MAXDWORD);