config_method_with_cred is no longer a template

This commit is contained in:
2016-08-05 11:51:59 +02:00
parent f4be571499
commit 4fc029138c
9 changed files with 187 additions and 162 deletions

View File

@@ -66,15 +66,16 @@ tstring eap::get_cert_title(PCCERT_CONTEXT cert)
// eap::config_method_tls
//////////////////////////////////////////////////////////////////////
eap::config_method_tls::config_method_tls(_In_ module *mod) : config_method_with_cred<credentials_tls>(mod)
eap::config_method_tls::config_method_tls(_In_ module *mod) : config_method_with_cred(mod)
{
m_preshared.reset(new credentials_tls(mod));
}
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_with_cred<credentials_tls>(other)
config_method_with_cred(other)
{
}
@@ -82,7 +83,7 @@ eap::config_method_tls::config_method_tls(_In_ const config_method_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_with_cred<credentials_tls>(std::move(other))
config_method_with_cred(std::move(other))
{
}
@@ -90,7 +91,7 @@ eap::config_method_tls::config_method_tls(_Inout_ config_method_tls &&other) :
eap::config_method_tls& eap::config_method_tls::operator=(_In_ const config_method_tls &other)
{
if (this != &other) {
(config_method_with_cred<credentials_tls>&)*this = other;
(config_method_with_cred&)*this = other;
m_trusted_root_ca = other.m_trusted_root_ca;
m_server_names = other.m_server_names;
}
@@ -102,7 +103,7 @@ eap::config_method_tls& eap::config_method_tls::operator=(_In_ const config_meth
eap::config_method_tls& eap::config_method_tls::operator=(_Inout_ config_method_tls &&other)
{
if (this != &other) {
(config_method_with_cred<credentials_tls>&&)*this = std::move(other);
(config_method_with_cred&&)*this = std::move(other);
m_trusted_root_ca = std::move(other.m_trusted_root_ca);
m_server_names = std::move(other.m_server_names);
}
@@ -123,7 +124,7 @@ bool eap::config_method_tls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *
assert(pConfigRoot);
assert(ppEapError);
if (!config_method_with_cred<credentials_tls>::save(pDoc, pConfigRoot, ppEapError))
if (!config_method_with_cred::save(pDoc, pConfigRoot, ppEapError))
return false;
const bstr bstrNamespace(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
@@ -182,7 +183,7 @@ bool eap::config_method_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR
{
assert(pConfigRoot);
if (!config_method_with_cred<credentials_tls>::load(pConfigRoot, ppEapError))
if (!config_method_with_cred::load(pConfigRoot, ppEapError))
return false;
std::wstring xpath(eapxml::get_xpath(pConfigRoot));
@@ -258,7 +259,7 @@ bool eap::config_method_tls::load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR
void eap::config_method_tls::operator<<(_Inout_ cursor_out &cursor) const
{
config_method_with_cred<credentials_tls>::operator<<(cursor);
config_method_with_cred::operator<<(cursor);
cursor << m_trusted_root_ca;
cursor << m_server_names ;
}
@@ -267,7 +268,7 @@ void eap::config_method_tls::operator<<(_Inout_ cursor_out &cursor) const
size_t eap::config_method_tls::get_pk_size() const
{
return
config_method_with_cred<credentials_tls>::get_pk_size() +
config_method_with_cred::get_pk_size() +
pksizeof(m_trusted_root_ca) +
pksizeof(m_server_names );
}
@@ -275,7 +276,7 @@ size_t eap::config_method_tls::get_pk_size() const
void eap::config_method_tls::operator>>(_Inout_ cursor_in &cursor)
{
config_method_with_cred<credentials_tls>::operator>>(cursor);
config_method_with_cred::operator>>(cursor);
cursor >> m_trusted_root_ca;
cursor >> m_server_names ;
}