WinStd, stdex, wxExtend: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
0f3070033f
commit
2a918254f6
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <WinStd/Common.h>
|
#include <WinStd/Common.h>
|
||||||
#include <WinStd/Win.h>
|
#include <WinStd/Win.h>
|
||||||
#include <stdex/base64.h>
|
#include <stdex/base64.hpp>
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <eaptypes.h> // Must include after <Windows.h>
|
#include <eaptypes.h> // Must include after <Windows.h>
|
||||||
|
@ -31,7 +31,7 @@ class wxPersistentETWListCtrl;
|
|||||||
#include <wx/persist/window.h>
|
#include <wx/persist/window.h>
|
||||||
#include <wx/thread.h>
|
#include <wx/thread.h>
|
||||||
|
|
||||||
#include <stdex/vector_queue.h>
|
#include <stdex/vector_queue.hpp>
|
||||||
#include <WinStd/ETW.h>
|
#include <WinStd/ETW.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -155,7 +155,7 @@ protected:
|
|||||||
///
|
///
|
||||||
/// Functor for GUID comparison
|
/// Functor for GUID comparison
|
||||||
///
|
///
|
||||||
struct less_guid : public std::binary_function<GUID, GUID, bool>
|
struct less_guid
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
/// Compares two GUIDs
|
/// Compares two GUIDs
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<EnablePREfast>true</EnablePREfast>
|
<EnablePREfast>true</EnablePREfast>
|
||||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||||
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@ -544,8 +544,8 @@ namespace eapxml
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdex/hex.h>
|
#include <stdex/hex.hpp>
|
||||||
#include <stdex/base64.h>
|
#include <stdex/base64.hpp>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ void eap::config_method_eaphost::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNo
|
|||||||
// Convert configuration BLOB to XML using EapHost (and ultimately method peer's EapPeerConfigBlob2Xml).
|
// Convert configuration BLOB to XML using EapHost (and ultimately method peer's EapPeerConfigBlob2Xml).
|
||||||
com_obj<IXMLDOMDocument2> pConfigDoc;
|
com_obj<IXMLDOMDocument2> pConfigDoc;
|
||||||
eap_error error;
|
eap_error error;
|
||||||
DWORD dwResult = EapHostPeerConfigBlob2Xml(0, m_type, (DWORD)m_cfg_blob.size(), const_cast<BYTE*>(m_cfg_blob.data()), &pConfigDoc, get_ptr(error));
|
DWORD dwResult = EapHostPeerConfigBlob2Xml(0, m_type, (DWORD)m_cfg_blob.size(), const_cast<BYTE*>(m_cfg_blob.data()), &pConfigDoc, stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ void eap::config_method_eaphost::load(_In_ IXMLDOMNode *pConfigRoot)
|
|||||||
DWORD cfg_data_size = 0;
|
DWORD cfg_data_size = 0;
|
||||||
eap_blob cfg_data;
|
eap_blob cfg_data;
|
||||||
eap_error error;
|
eap_error error;
|
||||||
DWORD dwResult = EapHostPeerConfigXml2Blob(0, pXmlElEapHostConfig, &cfg_data_size, get_ptr(cfg_data), &m_type, get_ptr(error));
|
DWORD dwResult = EapHostPeerConfigXml2Blob(0, pXmlElEapHostConfig, &cfg_data_size, stdex::get_ptr(cfg_data), &m_type, stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
LPCBYTE _cfg_data = cfg_data.get();
|
LPCBYTE _cfg_data = cfg_data.get();
|
||||||
m_cfg_blob.assign(_cfg_data, _cfg_data + cfg_data_size);
|
m_cfg_blob.assign(_cfg_data, _cfg_data + cfg_data_size);
|
||||||
|
@ -265,9 +265,9 @@ eap::credentials::source_t eap::credentials_eaphost::combine(
|
|||||||
src != source_t::unknown ? (DWORD)m_cred_blob.size() : 0, src != source_t::unknown ? m_cred_blob.data() : NULL,
|
src != source_t::unknown ? (DWORD)m_cred_blob.size() : 0, src != source_t::unknown ? m_cred_blob.data() : NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&fInvokeUI,
|
&fInvokeUI,
|
||||||
&cred_data_size, get_ptr(cred_data),
|
&cred_data_size, stdex::get_ptr(cred_data),
|
||||||
get_ptr(identity),
|
stdex::get_ptr(identity),
|
||||||
get_ptr(error),
|
stdex::get_ptr(error),
|
||||||
NULL);
|
NULL);
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
if (identity && !fInvokeUI) {
|
if (identity && !fInvokeUI) {
|
||||||
|
@ -50,7 +50,7 @@ void eap::method_eaphost::begin_session(
|
|||||||
dwMaxSendPacketSize,
|
dwMaxSendPacketSize,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
&m_session_id,
|
&m_session_id,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Session succesfully created.
|
// Session succesfully created.
|
||||||
} else if (error)
|
} else if (error)
|
||||||
@ -64,7 +64,7 @@ void eap::method_eaphost::end_session()
|
|||||||
{
|
{
|
||||||
// End EapHost peer session.
|
// End EapHost peer session.
|
||||||
eap_error_runtime error;
|
eap_error_runtime error;
|
||||||
DWORD dwResult = EapHostPeerEndSession(m_session_id, get_ptr(error));
|
DWORD dwResult = EapHostPeerEndSession(m_session_id, stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Session successfuly ended.
|
// Session successfuly ended.
|
||||||
} else if (error)
|
} else if (error)
|
||||||
@ -90,7 +90,7 @@ EapPeerMethodResponseAction eap::method_eaphost::process_request_packet(
|
|||||||
dwReceivedPacketSize,
|
dwReceivedPacketSize,
|
||||||
reinterpret_cast<const BYTE*>(pReceivedPacket),
|
reinterpret_cast<const BYTE*>(pReceivedPacket),
|
||||||
&action,
|
&action,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Packet successfuly processed.
|
// Packet successfuly processed.
|
||||||
return action_h2p(action);
|
return action_h2p(action);
|
||||||
@ -112,7 +112,7 @@ void eap::method_eaphost::get_response_packet(
|
|||||||
m_session_id,
|
m_session_id,
|
||||||
&size_max,
|
&size_max,
|
||||||
&_packet,
|
&_packet,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Packet successfuly prepared.
|
// Packet successfuly prepared.
|
||||||
packet.assign(_packet, _packet + size_max);
|
packet.assign(_packet, _packet + size_max);
|
||||||
@ -134,7 +134,7 @@ void eap::method_eaphost::get_result(
|
|||||||
m_session_id,
|
m_session_id,
|
||||||
EapHostPeerMethodResultFromMethod,
|
EapHostPeerMethodResultFromMethod,
|
||||||
&result,
|
&result,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Result successfuly returned.
|
// Result successfuly returned.
|
||||||
method::get_result(reason, pResult);
|
method::get_result(reason, pResult);
|
||||||
@ -181,7 +181,7 @@ void eap::method_eaphost::get_ui_context(_Out_ sanitizing_blob &context_data)
|
|||||||
m_session_id,
|
m_session_id,
|
||||||
&dwUIContextDataSize,
|
&dwUIContextDataSize,
|
||||||
&pUIContextData,
|
&pUIContextData,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// UI context data successfuly returned.
|
// UI context data successfuly returned.
|
||||||
context_data.assign(pUIContextData, pUIContextData + dwUIContextDataSize);
|
context_data.assign(pUIContextData, pUIContextData + dwUIContextDataSize);
|
||||||
@ -207,7 +207,7 @@ EapPeerMethodResponseAction eap::method_eaphost::set_ui_context(
|
|||||||
dwUIContextDataSize,
|
dwUIContextDataSize,
|
||||||
pUIContextData,
|
pUIContextData,
|
||||||
&action,
|
&action,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// UI context data successfuly returned.
|
// UI context data successfuly returned.
|
||||||
return action_h2p(action);
|
return action_h2p(action);
|
||||||
@ -225,7 +225,7 @@ void eap::method_eaphost::get_response_attributes(_Out_ EapAttributes *pAttribs)
|
|||||||
DWORD dwResult = EapHostPeerGetResponseAttributes(
|
DWORD dwResult = EapHostPeerGetResponseAttributes(
|
||||||
m_session_id,
|
m_session_id,
|
||||||
pAttribs,
|
pAttribs,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Response attributes successfuly returned.
|
// Response attributes successfuly returned.
|
||||||
} else if (error)
|
} else if (error)
|
||||||
@ -244,7 +244,7 @@ EapPeerMethodResponseAction eap::method_eaphost::set_response_attributes(_In_ co
|
|||||||
m_session_id,
|
m_session_id,
|
||||||
pAttribs,
|
pAttribs,
|
||||||
&action,
|
&action,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Response attributes successfuly set.
|
// Response attributes successfuly set.
|
||||||
return action_h2p(action);
|
return action_h2p(action);
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "../../EAPBase/include/Module.h"
|
#include "../../EAPBase/include/Module.h"
|
||||||
|
|
||||||
|
#include <stdex/memory.hpp>
|
||||||
#include <WinStd/Cred.h>
|
#include <WinStd/Cred.h>
|
||||||
#include <WinStd/Win.h>
|
#include <WinStd/Win.h>
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ wxEapHostMethodConfigPanel::wxEapHostMethodConfigPanel(const eap::config_provide
|
|||||||
|
|
||||||
winstd::eap_method_info_array methods;
|
winstd::eap_method_info_array methods;
|
||||||
winstd::eap_error error;
|
winstd::eap_error error;
|
||||||
DWORD dwResult = EapHostPeerGetMethods(&methods, get_ptr(error));
|
DWORD dwResult = EapHostPeerGetMethods(&methods, stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
for (DWORD i = 0; i < methods.dwNumberOfMethods; i++)
|
for (DWORD i = 0; i < methods.dwNumberOfMethods; i++)
|
||||||
m_method->Append(methods.pEapMethods[i].pwszFriendlyName, new wxEAPMethodTypeClientData(methods.pEapMethods[i].eaptype, methods.pEapMethods[i].eapProperties));
|
m_method->Append(methods.pEapMethods[i].pwszFriendlyName, new wxEAPMethodTypeClientData(methods.pEapMethods[i].eaptype, methods.pEapMethods[i].eapProperties));
|
||||||
@ -112,7 +112,7 @@ void wxEapHostMethodConfigPanel::OnSettings(wxCommandEvent& event)
|
|||||||
DWORD cfg_data_size = 0;
|
DWORD cfg_data_size = 0;
|
||||||
winstd::eap_blob cfg_data;
|
winstd::eap_blob cfg_data;
|
||||||
winstd::eap_error error;
|
winstd::eap_error error;
|
||||||
DWORD dwResult = EapHostPeerInvokeConfigUI(GetHWND(), 0, data->m_type, (DWORD)data->m_cfg_blob.size(), data->m_cfg_blob.data(), &cfg_data_size, get_ptr(cfg_data), get_ptr(error));
|
DWORD dwResult = EapHostPeerInvokeConfigUI(GetHWND(), 0, data->m_type, (DWORD)data->m_cfg_blob.size(), data->m_cfg_blob.data(), &cfg_data_size, stdex::get_ptr(cfg_data), stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
LPCBYTE _cfg_data = cfg_data.get();
|
LPCBYTE _cfg_data = cfg_data.get();
|
||||||
data->m_cfg_blob.assign(_cfg_data, _cfg_data + cfg_data_size);
|
data->m_cfg_blob.assign(_cfg_data, _cfg_data + cfg_data_size);
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include "../include/EapHost_UI.h"
|
#include "../include/EapHost_UI.h"
|
||||||
|
|
||||||
|
#include <stdex/memory.hpp>
|
||||||
#include <WinStd/EAP.h>
|
#include <WinStd/EAP.h>
|
||||||
|
|
||||||
#include <eaphostpeerconfigapis.h>
|
#include <eaphostpeerconfigapis.h>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "../../EAPBase/include/Module.h"
|
#include "../../EAPBase/include/Module.h"
|
||||||
|
|
||||||
#include <stdex/hex.h>
|
#include <stdex/hex.hpp>
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <EapHostError.h> // include after Windows.h
|
#include <EapHostError.h> // include after Windows.h
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "../../EAPBase/include/Module.h"
|
#include "../../EAPBase/include/Module.h"
|
||||||
|
|
||||||
#include <stdex/hex.h>
|
#include <stdex/hex.hpp>
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <EapHostError.h> // include after Windows.h
|
#include <EapHostError.h> // include after Windows.h
|
||||||
|
@ -83,6 +83,7 @@ EapPeerMethodResponseAction eap::method_eapmsg::process_request_packet(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Do not break out of this case to allow continuing with the following case, checking there is no second mandatory EAP-Message present.
|
// Do not break out of this case to allow continuing with the following case, checking there is no second mandatory EAP-Message present.
|
||||||
|
[[fallthrough]];
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (hdr->flags & diameter_avp_flag_mandatory)
|
if (hdr->flags & diameter_avp_flag_mandatory)
|
||||||
|
@ -215,9 +215,9 @@ void eap::peer_peap_ui::invoke_identity_ui(
|
|||||||
hwndParent,
|
hwndParent,
|
||||||
(DWORD)cfg_inner_eaphost->m_cfg_blob.size(), cfg_inner_eaphost->m_cfg_blob.data(),
|
(DWORD)cfg_inner_eaphost->m_cfg_blob.size(), cfg_inner_eaphost->m_cfg_blob.data(),
|
||||||
(DWORD)cred_inner->m_cred_blob.size(), cred_inner->m_cred_blob.data(),
|
(DWORD)cred_inner->m_cred_blob.size(), cred_inner->m_cred_blob.data(),
|
||||||
&cred_data_size, get_ptr(cred_data),
|
&cred_data_size, stdex::get_ptr(cred_data),
|
||||||
get_ptr(identity),
|
stdex::get_ptr(identity),
|
||||||
get_ptr(error),
|
stdex::get_ptr(error),
|
||||||
NULL);
|
NULL);
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Inner EAP method provided credentials.
|
// Inner EAP method provided credentials.
|
||||||
@ -330,7 +330,7 @@ void eap::peer_peap_ui::invoke_interactive_ui(
|
|||||||
ctx.m_data.data(),
|
ctx.m_data.data(),
|
||||||
&dwSizeofDataFromInteractiveUI,
|
&dwSizeofDataFromInteractiveUI,
|
||||||
&pDataFromInteractiveUI,
|
&pDataFromInteractiveUI,
|
||||||
get_ptr(error));
|
stdex::get_ptr(error));
|
||||||
if (dwResult == ERROR_SUCCESS) {
|
if (dwResult == ERROR_SUCCESS) {
|
||||||
// Inner EAP method provided response.
|
// Inner EAP method provided response.
|
||||||
ctx.m_data.assign(pDataFromInteractiveUI, pDataFromInteractiveUI + dwSizeofDataFromInteractiveUI);
|
ctx.m_data.assign(pDataFromInteractiveUI, pDataFromInteractiveUI + dwSizeofDataFromInteractiveUI);
|
||||||
|
@ -20,4 +20,6 @@
|
|||||||
#include "../../EapHost/include/Credentials.h"
|
#include "../../EapHost/include/Credentials.h"
|
||||||
#include "../../EapBase/include/UIContext.h"
|
#include "../../EapBase/include/UIContext.h"
|
||||||
|
|
||||||
|
#include <stdex/memory.hpp>
|
||||||
|
|
||||||
#include <wx/choicdlg.h>
|
#include <wx/choicdlg.h>
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 9ff26e14227c1c9243e882e49d5960b215cc9603
|
Subproject commit f85047dab9f000b625864eb930e11f650831ef7c
|
@ -1 +1 @@
|
|||||||
Subproject commit ff8ca7f073a34e4e2e7829e914e1db43271a15c4
|
Subproject commit 246f2baa1e3a7964f173469da3fd16e8336094cc
|
@ -1 +1 @@
|
|||||||
Subproject commit e3a59d1118053ed48dc15b83d17125da87c434dd
|
Subproject commit 79ec08365068ab6e03b06caef13de0ce6b06fcd5
|
Loading…
x
Reference in New Issue
Block a user