eap::peer_ttls::get_method_properties() implemented
This commit is contained in:
@@ -40,6 +40,11 @@ namespace eap
|
||||
/// A group of methods all EAP peers must or should implement.
|
||||
///
|
||||
template <class _Tmeth, class _Tcred, class _Tint, class _Tintres> class peer;
|
||||
|
||||
///
|
||||
/// EAP_METHOD_PROPERTY helper
|
||||
///
|
||||
class method_property;
|
||||
}
|
||||
|
||||
#pragma once
|
||||
@@ -763,7 +768,7 @@ namespace eap
|
||||
_In_ const config_providers &cfg,
|
||||
_In_ const credentials_type &cred,
|
||||
_Out_ EAP_METHOD_PROPERTY_ARRAY *pMethodPropertyArray,
|
||||
_Out_ EAP_ERROR **ppEapError) const = 0;
|
||||
_Out_ EAP_ERROR **ppEapError) = 0;
|
||||
|
||||
///
|
||||
/// Defines the implementation of an EAP method-specific function that obtains the EAP Single-Sign-On (SSO) credential input fields for an EAP method.
|
||||
@@ -889,4 +894,53 @@ namespace eap
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class method_property : public EAP_METHOD_PROPERTY
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Constructs a BOOL method property
|
||||
///
|
||||
/// \param[in] type EAP method property type
|
||||
/// \param[in] value Property value
|
||||
///
|
||||
inline method_property(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_ BOOL value)
|
||||
{
|
||||
eapMethodPropertyType = type;
|
||||
eapMethodPropertyValueType = empvtBool;
|
||||
eapMethodPropertyValue.empvBool.length = sizeof(BOOL);
|
||||
eapMethodPropertyValue.empvBool.value = value;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Constructs a DWORD method property
|
||||
///
|
||||
/// \param[in] type EAP method property type
|
||||
/// \param[in] value Property value
|
||||
///
|
||||
inline method_property(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_ DWORD value)
|
||||
{
|
||||
eapMethodPropertyType = type;
|
||||
eapMethodPropertyValueType = empvtDword;
|
||||
eapMethodPropertyValue.empvDword.length = sizeof(DWORD);
|
||||
eapMethodPropertyValue.empvDword.value = value;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Constructs a Unicode string method property
|
||||
///
|
||||
/// \param[in] type EAP method property type
|
||||
/// \param[in] value Property value
|
||||
///
|
||||
inline method_property(_In_ EAP_METHOD_PROPERTY_TYPE type, _In_z_ LPCWSTR value)
|
||||
{
|
||||
eapMethodPropertyType = type;
|
||||
eapMethodPropertyValueType = empvtString;
|
||||
eapMethodPropertyValue.empvString.length = (DWORD)(sizeof(WCHAR)*(wcslen(value) + 1));
|
||||
eapMethodPropertyValue.empvString.value = (BYTE*)value;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user