Virtual method implementations moved to .cpp files
get_method_id() now const
This commit is contained in:
parent
9cf80108b5
commit
df2fee4cef
@ -311,7 +311,7 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// \returns One of `eap::type_t` constants.
|
/// \returns One of `eap::type_t` constants.
|
||||||
///
|
///
|
||||||
virtual type_t get_method_id() = 0;
|
virtual type_t get_method_id() const = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool m_allow_save; ///< Are credentials allowed to be saved to Windows Credential Manager?
|
bool m_allow_save; ///< Are credentials allowed to be saved to Windows Credential Manager?
|
||||||
|
@ -114,14 +114,14 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// \returns Pointer to cloned configuration
|
/// \returns Pointer to cloned configuration
|
||||||
///
|
///
|
||||||
virtual config* clone() const { return new config_pap(*this); }
|
virtual config* clone() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Returns EAP method type of this configuration
|
/// Returns EAP method type of this configuration
|
||||||
///
|
///
|
||||||
/// \returns `eap::type_pap`
|
/// \returns `eap::type_pap`
|
||||||
///
|
///
|
||||||
virtual eap::type_t get_method_id() { return eap::type_pap; }
|
virtual eap::type_t get_method_id() const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// \returns Pointer to cloned credentials
|
/// \returns Pointer to cloned credentials
|
||||||
///
|
///
|
||||||
virtual config* clone() const { return new credentials_pap(*this); }
|
virtual config* clone() const;
|
||||||
|
|
||||||
/// \name Storage
|
/// \name Storage
|
||||||
/// @{
|
/// @{
|
||||||
@ -95,7 +95,7 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// Return target suffix for Windows Credential Manager credential name
|
/// Return target suffix for Windows Credential Manager credential name
|
||||||
///
|
///
|
||||||
virtual LPCTSTR target_suffix() const { return _T("PAP"); }
|
virtual LPCTSTR target_suffix() const;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
|
@ -60,3 +60,13 @@ eap::config_pap& eap::config_pap::operator=(_Inout_ config_pap &&other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::config* eap::config_pap::clone() const
|
||||||
|
{
|
||||||
|
return new config_pap(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::type_t eap::config_pap::get_method_id() const
|
||||||
|
{
|
||||||
|
return eap::type_pap;
|
||||||
|
}
|
||||||
|
@ -58,3 +58,15 @@ eap::credentials_pap& eap::credentials_pap::operator=(_Inout_ credentials_pap &&
|
|||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::config* eap::credentials_pap::clone() const
|
||||||
|
{
|
||||||
|
return new credentials_pap(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LPCTSTR eap::credentials_pap::target_suffix() const
|
||||||
|
{
|
||||||
|
return _T("PAP");
|
||||||
|
}
|
||||||
|
@ -117,7 +117,7 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// \returns Pointer to cloned configuration
|
/// \returns Pointer to cloned configuration
|
||||||
///
|
///
|
||||||
virtual config* clone() const { return new config_tls(*this); }
|
virtual config* clone() const;
|
||||||
|
|
||||||
/// \name XML configuration management
|
/// \name XML configuration management
|
||||||
/// @{
|
/// @{
|
||||||
@ -154,7 +154,7 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// \returns `eap::type_tls`
|
/// \returns `eap::type_tls`
|
||||||
///
|
///
|
||||||
virtual eap::type_t get_method_id() { return eap::type_tls; }
|
virtual eap::type_t get_method_id() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Adds CA to the list of trusted root CA's
|
/// Adds CA to the list of trusted root CA's
|
||||||
|
@ -113,7 +113,7 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// \returns Pointer to cloned credentials
|
/// \returns Pointer to cloned credentials
|
||||||
///
|
///
|
||||||
virtual config* clone() const { return new credentials_tls(*this); }
|
virtual config* clone() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Resets credentials
|
/// Resets credentials
|
||||||
|
@ -73,6 +73,12 @@ eap::config_tls& eap::config_tls::operator=(_Inout_ eap::config_tls &&other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::config* eap::config_tls::clone() const
|
||||||
|
{
|
||||||
|
return new config_tls(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD eap::config_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
|
DWORD eap::config_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
|
||||||
{
|
{
|
||||||
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
||||||
@ -178,6 +184,12 @@ DWORD eap::config_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppE
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::type_t eap::config_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_tls::add_trusted_ca(_In_ DWORD dwCertEncodingType, _In_ const BYTE *pbCertEncoded, _In_ DWORD cbCertEncoded)
|
||||||
{
|
{
|
||||||
cert_context cert;
|
cert_context cert;
|
||||||
|
@ -69,6 +69,11 @@ eap::credentials_tls& eap::credentials_tls::operator=(_Inout_ credentials_tls &&
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::config* eap::credentials_tls::clone() const
|
||||||
|
{
|
||||||
|
return new credentials_tls(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void eap::credentials_tls::clear()
|
void eap::credentials_tls::clear()
|
||||||
{
|
{
|
||||||
@ -83,7 +88,6 @@ bool eap::credentials_tls::empty() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DWORD eap::credentials_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
|
DWORD eap::credentials_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
|
||||||
{
|
{
|
||||||
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
||||||
@ -100,7 +104,6 @@ DWORD eap::credentials_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *p
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DWORD eap::credentials_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError)
|
DWORD eap::credentials_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError)
|
||||||
{
|
{
|
||||||
assert(pConfigRoot);
|
assert(pConfigRoot);
|
||||||
|
@ -118,7 +118,7 @@ namespace eap {
|
|||||||
///
|
///
|
||||||
/// \returns Pointer to cloned configuration
|
/// \returns Pointer to cloned configuration
|
||||||
///
|
///
|
||||||
virtual config* clone() const { return new config_ttls(*this); }
|
virtual config* clone() const;
|
||||||
|
|
||||||
/// \name XML configuration management
|
/// \name XML configuration management
|
||||||
/// @{
|
/// @{
|
||||||
@ -155,7 +155,7 @@ namespace eap {
|
|||||||
///
|
///
|
||||||
/// \returns `eap::type_ttls`
|
/// \returns `eap::type_ttls`
|
||||||
///
|
///
|
||||||
virtual eap::type_t get_method_id() { return eap::type_ttls; }
|
virtual eap::type_t get_method_id() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
config_method *m_inner; ///< Inner authentication configuration
|
config_method *m_inner; ///< Inner authentication configuration
|
||||||
|
@ -80,7 +80,7 @@ namespace eap
|
|||||||
///
|
///
|
||||||
/// \returns Pointer to cloned credentials
|
/// \returns Pointer to cloned credentials
|
||||||
///
|
///
|
||||||
virtual config* clone() const { return new credentials_ttls(*this); }
|
virtual config* clone() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Resets credentials
|
/// Resets credentials
|
||||||
|
@ -82,6 +82,12 @@ eap::config_ttls& eap::config_ttls::operator=(_Inout_ config_ttls &&other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::config* eap::config_ttls::clone() const
|
||||||
|
{
|
||||||
|
return new config_ttls(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
|
DWORD eap::config_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const
|
||||||
{
|
{
|
||||||
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
||||||
@ -147,3 +153,9 @@ DWORD eap::config_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **pp
|
|||||||
|
|
||||||
return config_tls::load(pConfigRoot, ppEapError);
|
return config_tls::load(pConfigRoot, ppEapError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::type_t eap::config_ttls::get_method_id() const
|
||||||
|
{
|
||||||
|
return eap::type_ttls;
|
||||||
|
}
|
||||||
|
@ -75,6 +75,11 @@ eap::credentials_ttls& eap::credentials_ttls::operator=(_Inout_ credentials_ttls
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
eap::config* eap::credentials_ttls::clone() const
|
||||||
|
{
|
||||||
|
return new credentials_ttls(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void eap::credentials_ttls::clear()
|
void eap::credentials_ttls::clear()
|
||||||
{
|
{
|
||||||
@ -90,7 +95,6 @@ bool eap::credentials_ttls::empty() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DWORD eap::credentials_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError)
|
DWORD eap::credentials_ttls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError)
|
||||||
{
|
{
|
||||||
assert(pConfigRoot);
|
assert(pConfigRoot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user