Compare commits

...

12 Commits
1.3f ... master

Author SHA1 Message Date
5293dfc1a7 Upgrade code signing
This adds support for Microsoft Azure Trusted Signing and removes
signing of the Debug binaries to minimize the Trusted Signing API
volume.

Signed-off-by: Simon Rozman <simon@rozman.si>
2024-11-19 10:49:17 +01:00
2a918254f6 WinStd, stdex, wxExtend: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-11-19 10:44:41 +01:00
0f3070033f Stop reusing winstd::eap_attr after moved from
MSVC C26800 warned us an object is not guaranteed to be cleared after
being moved from. At least in std C++ implementations.

Thou winstd does clear all objects after being moved from, we could just
silence C26800 warning. But what if some day winstd behavior changes and
with us having this warning silenced?

std::eap_attr has no clear() method, therefore revert to using scope and
temporary object. It achieves the same effect as clear after moved from
does.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-28 14:07:00 +02:00
887129ccc0 WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-28 14:04:59 +02:00
511b8c04ea WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-13 12:39:47 +02:00
a174e42b3b Preset version to 1.3h
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-03 19:35:40 +02:00
0ad6f61e15 WinStd, stdex: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-03 19:09:37 +02:00
5cffd63cf5 MSI: Install WLANManager.exe to user computer
It was being deployed as a satellite assembly since GÉANT didn't really
use it. For other deployments it proves useful. It is required to run it
on the user computer anyway, so no harm if the WLANManager.exe gets
installed.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-03 19:09:37 +02:00
3215cc0cc7 Makefile: Discontinue publishing binaries to GitHub
Publishing binaries to https://github.com/Amebis/GEANTLink-dist was a
customer requirement. As GÉANT is no longer deploying GÉANTLink, this
makes no sense any more.

Should anybody require this feature, please contact me.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-03 19:09:37 +02:00
97958040a3 Makefile: Cleanup
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-03 19:09:37 +02:00
4f69180e3d Update translations from Transifex
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-03 19:09:37 +02:00
232b374488 Preset version to 1.3g
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-03 19:09:37 +02:00
46 changed files with 148 additions and 90 deletions

View File

@ -12,7 +12,7 @@
#include <WinStd/Common.h>
#include <WinStd/Win.h>
#include <stdex/base64.h>
#include <stdex/base64.hpp>
#include <Windows.h>
#include <eaptypes.h> // Must include after <Windows.h>

View File

@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -1,7 +1,7 @@
#
# Translators:
# Dubravko Penezic <dpenezic@gmail.com>, 2018
# Simon Rozman <simon@rozman.si>, 2020
# Dubravko Penezic <dpenezic@gmail.com>, 2022
#
#, fuzzy
msgid ""
@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: EAPMethods\n"
"POT-Creation-Date: 2020-04-17 14:55+0200\n"
"PO-Revision-Date: 2016-08-25 06:18+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2020\n"
"Last-Translator: Dubravko Penezic <dpenezic@gmail.com>, 2022\n"
"Language-Team: Croatian (Croatia) (https://www.transifex.com/eduroam_devel/teams/11799/hr_HR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -600,7 +600,7 @@ msgstr ""
#: lib/TLS_UI/src/TLS_UI.cpp:118
msgid "No certificate selected"
msgstr ""
msgstr "Nije odabran certifikat"
#: lib/TLS_UI/src/TLS_UI.cpp:118
msgid "Validation conflict"

View File

@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it_IT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -1,6 +1,6 @@
#
# Translators:
# Tom Ivar Myren <tom.myren@uninett.no>, 2017
# Tom Ivar Myren <tom.myren@sikt.no>, 2017
# Simon Rozman <simon@rozman.si>, 2020
#
#, fuzzy

View File

@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -31,7 +31,7 @@ class wxPersistentETWListCtrl;
#include <wx/persist/window.h>
#include <wx/thread.h>
#include <stdex/vector_queue.h>
#include <stdex/vector_queue.hpp>
#include <WinStd/ETW.h>
#include <memory>
@ -155,7 +155,7 @@ protected:
///
/// Functor for GUID comparison
///
struct less_guid : public std::binary_function<GUID, GUID, bool>
struct less_guid
{
///
/// Compares two GUIDs

View File

@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it_IT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -1,6 +1,6 @@
#
# Translators:
# Tom Ivar Myren <tom.myren@uninett.no>, 2016
# Tom Ivar Myren <tom.myren@sikt.no>, 2016
#
#, fuzzy
msgid ""
@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: EventMonitor\n"
"POT-Creation-Date: 2019-08-12 14:04+0200\n"
"PO-Revision-Date: 2016-08-27 11:21+0000\n"
"Last-Translator: Tom Ivar Myren <tom.myren@uninett.no>, 2016\n"
"Last-Translator: Tom Ivar Myren <tom.myren@sikt.no>, 2016\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/eduroam_devel/teams/11799/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it_IT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -1,7 +1,7 @@
#
# Translators:
# Simon Rozman <simon@rozman.si>, 2016
# Tom Ivar Myren <tom.myren@uninett.no>, 2016
# Tom Ivar Myren <tom.myren@sikt.no>, 2016
#
#, fuzzy
msgid ""
@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: GÉANTLink MSI\n"
"POT-Creation-Date: 2019-08-12 14:04+0200\n"
"PO-Revision-Date: 2016-09-10 07:51+0000\n"
"Last-Translator: Tom Ivar Myren <tom.myren@uninett.no>, 2016\n"
"Last-Translator: Tom Ivar Myren <tom.myren@sikt.no>, 2016\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/eduroam_devel/teams/11799/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

@ -1 +1 @@
Subproject commit b8364dea81f39b321d726317a9dcbf6b13a455e0
Subproject commit eccce8c523c9193c1e3a627e4dd8a80cd3cd5703

BIN
Makefile

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -101,14 +101,25 @@ The product compilation references wxWidgets libraries using `WXWIN` environment
### Digital Signing of Build Outputs
In order to have the build process digitally sign output files, one should provide the following:
In order to have the build process digitally sign the Release output files, one should setup either:
1. A signing certificate installed in the current users certificate store.
2. The following variables in the environment:
- `ManifestCertificateThumbprint` - set the value to certificates SHA1 thumbprint (hexadecimal, without spaces, i.e. `bc0d8da45f9eeefcbe4e334e1fc262804df88d7e`).
- `ManifestTimestampRFC3161Url` - set the value to URL used to perform RFC3161 timestamp signature (i.e. `http://sha256timestamp.ws.symantec.com/sha256/timestamp`). In order to perform timestamp signing successfully, the computer running the build should be online and able to access this URL.
- Local signing:
1. A signing certificate/hardware key
2. The following variables in the environment:
- `ManifestCertificateThumbprint` - set the value to certificates SHA1 thumbprint (hexadecimal, without spaces, e.g. `bc0d8da45f9eeefcbe4e334e1fc262804df88d7e`).
- `ManifestTimestampRFC3161Url` - set the value to URL used to perform timestamp signature (e.g. `http://sha256timestamp.ws.symantec.com/sha256/timestamp`, `http://timestamp.digicert.com` etc.). In order to perform the timestamp signing successfully, the computer running the build should be online and able to access this URL.
Please note that only Release builds are configured for timestamp signing. Debug configurations do not attempt to timestamp sign the resulting DLL and EXE files in order to speed up the building process and enable offline building.
- Microsoft Trusted Signing:
1. Install [Trusted Signing dlib package](https://www.nuget.org/packages/Microsoft.Trusted.Signing.Client):
```cmd
nuget install Microsoft.Trusted.Signing.Client -Version 1.0.53 -x`
```
2. Provide a [`manifest.json`](https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations#create-a-json-file) file and place it at `%APPDATA%\Microsoft.Trusted.Signing.Client.json`:
```cmd
notepad "%APPDATA%\Microsoft.Trusted.Signing.Client.json"
```
Debug configurations are not digitally signed by design.
### Building

View File

@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it_IT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"

View File

@ -1,6 +1,6 @@
#
# Translators:
# Tom Ivar Myren <tom.myren@uninett.no>, 2016
# Tom Ivar Myren <tom.myren@sikt.no>, 2016
#
#, fuzzy
msgid ""
@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: WLANManager\n"
"POT-Creation-Date: 2019-08-12 14:09+0200\n"
"PO-Revision-Date: 2016-08-28 10:03+0000\n"
"Last-Translator: Tom Ivar Myren <tom.myren@uninett.no>, 2016\n"
"Last-Translator: Tom Ivar Myren <tom.myren@sikt.no>, 2016\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/eduroam_devel/teams/11799/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -1,6 +1,6 @@
#
# Translators:
# Pedro Simões <psimoes@fccn.pt>, 2016
# Pedro Simões <psimoes@fccn.pt>, 2022
#
#, fuzzy
msgid ""
@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: WLANManager\n"
"POT-Creation-Date: 2019-08-12 14:09+0200\n"
"PO-Revision-Date: 2016-08-28 10:03+0000\n"
"Last-Translator: Pedro Simões <psimoes@fccn.pt>, 2016\n"
"Last-Translator: Pedro Simões <psimoes@fccn.pt>, 2022\n"
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/eduroam_devel/teams/11799/pt_PT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n"
@ -39,3 +39,5 @@ msgstr "WLAN Manager"
msgid ""
"Helper utility to support direct shortcuts to Wireless Network Properties"
msgstr ""
"Utilitário auxiliar para oferecer suporte a atalhos diretos para "
"Propriedades de rede sem fio"

View File

@ -29,6 +29,7 @@
<StringPooling>true</StringPooling>
<EnablePREfast>true</EnablePREfast>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -20,9 +20,4 @@
<EnableCOMDATFolding>false</EnableCOMDATFolding>
</Link>
</ItemDefinitionGroup>
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Message Text="Signing output file..." />
<Exec Command="signtool.exe sign /sha1 &quot;%ManifestCertificateThumbprint%&quot; /fd sha256 /q &quot;$(OutDir)$(TargetName)$(TargetExt)&quot;" />
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
</Target>
</Project>

Binary file not shown.

View File

@ -26,9 +26,14 @@
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Message Text="Signing output file..." />
<Exec Command="signtool.exe sign /sha1 &quot;%ManifestCertificateThumbprint%&quot; /fd sha256 /tr &quot;%ManifestTimestampRFC3161Url%&quot; /td sha256 /q &quot;$(OutDir)$(TargetName)$(TargetExt)&quot;" />
<Target Name="SignLocal" Condition="('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary') and '$(ManifestCertificateThumbprint)' != ''"
AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Exec Command="signtool.exe sign /sha1 &quot;$(ManifestCertificateThumbprint)&quot; /fd SHA256 /tr &quot;$(ManifestTimestampRFC3161Url)&quot; /td SHA256 /q &quot;$(TargetPath)&quot;" />
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
</Target>
<Target Name="SignAzure" Condition="('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary') and exists('$(APPDATA)\Microsoft.Trusted.Signing.Client.json')"
AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Exec Command="signtool.exe sign /dlib &quot;$(USERPROFILE)\.nuget\packages\microsoft.trusted.signing.client\1.0.53\bin\$(PreferredToolArchitecture)\Azure.CodeSigning.Dlib.dll&quot; /dmdf &quot;$(APPDATA)\Microsoft.Trusted.Signing.Client.json&quot; /fd SHA256 /tr &quot;http://timestamp.acs.microsoft.com&quot; /td SHA256 /q &quot;$(TargetPath)&quot;" />
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
</Target>
</Project>

View File

@ -24,26 +24,26 @@
//
#define PRODUCT_VERSION_MAJ 1
#define PRODUCT_VERSION_MIN 3
#define PRODUCT_VERSION_REV 6
#define PRODUCT_VERSION_REV 8
#define PRODUCT_VERSION_BUILD 0
//
// Human readable product version and build year for UI
//
#define PRODUCT_VERSION_STR "1.3f"
#define PRODUCT_VERSION_STR "1.3h"
#define PRODUCT_BUILD_YEAR_STR "2022"
//
// Numerical version presentation for ProductVersion propery in
// MSI packages (syntax: N.N[.N[.N]])
//
#define PRODUCT_VERSION_INST "1.3.6"
#define PRODUCT_VERSION_INST "1.3.8"
//
// The product code for ProductCode property in MSI packages
// Replace with new on every version change, regardless how minor it is.
//
#define PRODUCT_VERSION_GUID "{F3A75C61-A341-4EE7-BEFC-D2491D6182F1}"
#define PRODUCT_VERSION_GUID "{4AAA7B01-3457-45EE-BCD1-C3FD4117F018}"
//
// Product vendor

View File

@ -544,8 +544,8 @@ namespace eapxml
#pragma once
#include <stdex/hex.h>
#include <stdex/base64.h>
#include <stdex/hex.hpp>
#include <stdex/base64.hpp>
#include <assert.h>
@ -763,11 +763,11 @@ namespace eapxml
winstd::bstr bstrDefault, bstrEn;
for (long i = 0; ; i++) {
if (i >= lCount) {
if (bstrDefault != NULL) {
if (!!bstrDefault) {
// Return "C" localization.
pbstrValue = std::move(bstrDefault);
return S_OK;
} else if (bstrEn != NULL) {
} else if (!!bstrEn) {
// Return "en" localization.
pbstrValue = std::move(bstrEn);
return S_OK;
@ -853,13 +853,25 @@ namespace eapxml
inline HRESULT put_element_value(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pCurrentDOMNode, _In_z_ const BSTR bstrElementName, _In_opt_z_ const BSTR bstrNamespace, _In_ DWORD dwValue, _Out_opt_ winstd::com_obj<IXMLDOMElement> *ppXmlElement)
{
return put_element_value(pDoc, pCurrentDOMNode, bstrElementName, bstrNamespace, winstd::bstr(winstd::wstring_printf(L"%d", dwValue)), ppXmlElement);
return put_element_value(
pDoc,
pCurrentDOMNode,
bstrElementName,
bstrNamespace,
winstd::bstr(winstd::wstring_printf(L"%d", dwValue)),
ppXmlElement);
}
inline HRESULT put_element_value(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pCurrentDOMNode, _In_z_ const BSTR bstrElementName, _In_opt_z_ const BSTR bstrNamespace, _In_ bool bValue, _Out_opt_ winstd::com_obj<IXMLDOMElement> *ppXmlElement)
{
return put_element_value(pDoc, pCurrentDOMNode, bstrElementName, bstrNamespace, winstd::bstr(bValue ? L"true": L"false"), ppXmlElement);
return put_element_value(
pDoc,
pCurrentDOMNode,
bstrElementName,
bstrNamespace,
winstd::bstr(bValue ? L"true": L"false"),
ppXmlElement);
}
@ -868,7 +880,13 @@ namespace eapxml
std::wstring sBase64;
stdex::base64_enc enc;
enc.encode(sBase64, pValue, nValueLen);
return put_element_value(pDoc, pCurrentDOMNode, bstrElementName, bstrNamespace, winstd::bstr(sBase64), ppXmlElement);
return put_element_value(
pDoc,
pCurrentDOMNode,
bstrElementName,
bstrNamespace,
winstd::bstr(sBase64),
ppXmlElement);
}
@ -877,7 +895,13 @@ namespace eapxml
std::wstring sHex;
stdex::hex_enc enc;
enc.encode(sHex, pValue, nValueLen);
return put_element_value(pDoc, pCurrentDOMNode, bstrElementName, bstrNamespace, winstd::bstr(sHex), ppXmlElement);
return put_element_value(
pDoc,
pCurrentDOMNode,
bstrElementName,
bstrNamespace,
winstd::bstr(sHex),
ppXmlElement);
}
@ -985,13 +1009,19 @@ namespace eapxml
inline HRESULT put_attrib_value(_In_ IXMLDOMNode *pCurrentDOMNode, _In_z_ const BSTR bstrAttributeName, _In_ DWORD dwValue)
{
return put_attrib_value(pCurrentDOMNode, bstrAttributeName, winstd::bstr(winstd::wstring_printf(L"%d", dwValue)));
return put_attrib_value(
pCurrentDOMNode,
bstrAttributeName,
winstd::bstr(winstd::wstring_printf(L"%d", dwValue)));
}
inline HRESULT put_attrib_value(_In_ IXMLDOMNode *pCurrentDOMNode, _In_z_ const BSTR bstrAttributeName, _In_ bool bValue)
{
return put_attrib_value(pCurrentDOMNode, bstrAttributeName, winstd::bstr(bValue ? L"true": L"false"));
return put_attrib_value(
pCurrentDOMNode,
bstrAttributeName,
winstd::bstr(bValue ? L"true": L"false"));
}
@ -1000,7 +1030,10 @@ namespace eapxml
std::wstring sBase64;
stdex::base64_enc enc;
enc.encode(sBase64, pValue, nValueLen);
return put_attrib_value(pCurrentDOMNode, bstrAttributeName, winstd::bstr(sBase64));
return put_attrib_value(
pCurrentDOMNode,
bstrAttributeName,
winstd::bstr(sBase64));
}
@ -1009,7 +1042,10 @@ namespace eapxml
std::wstring sHex;
stdex::hex_enc enc;
enc.encode(sHex, pValue, nValueLen);
return put_attrib_value(pCurrentDOMNode, bstrAttributeName, winstd::bstr(sHex));
return put_attrib_value(
pCurrentDOMNode,
bstrAttributeName,
winstd::bstr(sHex));
}

View File

@ -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).
com_obj<IXMLDOMDocument2> pConfigDoc;
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) {
HRESULT hr;
@ -108,7 +108,7 @@ void eap::config_method_eaphost::load(_In_ IXMLDOMNode *pConfigRoot)
DWORD cfg_data_size = 0;
eap_blob cfg_data;
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) {
LPCBYTE _cfg_data = cfg_data.get();
m_cfg_blob.assign(_cfg_data, _cfg_data + cfg_data_size);

View File

@ -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,
NULL,
&fInvokeUI,
&cred_data_size, get_ptr(cred_data),
get_ptr(identity),
get_ptr(error),
&cred_data_size, stdex::get_ptr(cred_data),
stdex::get_ptr(identity),
stdex::get_ptr(error),
NULL);
if (dwResult == ERROR_SUCCESS) {
if (identity && !fInvokeUI) {

View File

@ -50,7 +50,7 @@ void eap::method_eaphost::begin_session(
dwMaxSendPacketSize,
NULL, NULL, NULL,
&m_session_id,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// Session succesfully created.
} else if (error)
@ -64,7 +64,7 @@ void eap::method_eaphost::end_session()
{
// End EapHost peer session.
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) {
// Session successfuly ended.
} else if (error)
@ -90,7 +90,7 @@ EapPeerMethodResponseAction eap::method_eaphost::process_request_packet(
dwReceivedPacketSize,
reinterpret_cast<const BYTE*>(pReceivedPacket),
&action,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// Packet successfuly processed.
return action_h2p(action);
@ -112,7 +112,7 @@ void eap::method_eaphost::get_response_packet(
m_session_id,
&size_max,
&_packet,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// Packet successfuly prepared.
packet.assign(_packet, _packet + size_max);
@ -134,7 +134,7 @@ void eap::method_eaphost::get_result(
m_session_id,
EapHostPeerMethodResultFromMethod,
&result,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// Result successfuly returned.
method::get_result(reason, pResult);
@ -181,7 +181,7 @@ void eap::method_eaphost::get_ui_context(_Out_ sanitizing_blob &context_data)
m_session_id,
&dwUIContextDataSize,
&pUIContextData,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// UI context data successfuly returned.
context_data.assign(pUIContextData, pUIContextData + dwUIContextDataSize);
@ -207,7 +207,7 @@ EapPeerMethodResponseAction eap::method_eaphost::set_ui_context(
dwUIContextDataSize,
pUIContextData,
&action,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// UI context data successfuly returned.
return action_h2p(action);
@ -225,7 +225,7 @@ void eap::method_eaphost::get_response_attributes(_Out_ EapAttributes *pAttribs)
DWORD dwResult = EapHostPeerGetResponseAttributes(
m_session_id,
pAttribs,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// Response attributes successfuly returned.
} else if (error)
@ -244,7 +244,7 @@ EapPeerMethodResponseAction eap::method_eaphost::set_response_attributes(_In_ co
m_session_id,
pAttribs,
&action,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// Response attributes successfuly set.
return action_h2p(action);

View File

@ -12,6 +12,7 @@
#include "../../EAPBase/include/Module.h"
#include <stdex/memory.hpp>
#include <WinStd/Cred.h>
#include <WinStd/Win.h>

View File

@ -37,7 +37,7 @@ wxEapHostMethodConfigPanel::wxEapHostMethodConfigPanel(const eap::config_provide
winstd::eap_method_info_array methods;
winstd::eap_error error;
DWORD dwResult = EapHostPeerGetMethods(&methods, get_ptr(error));
DWORD dwResult = EapHostPeerGetMethods(&methods, stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
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));
@ -112,7 +112,7 @@ void wxEapHostMethodConfigPanel::OnSettings(wxCommandEvent& event)
DWORD cfg_data_size = 0;
winstd::eap_blob cfg_data;
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) {
LPCBYTE _cfg_data = cfg_data.get();
data->m_cfg_blob.assign(_cfg_data, _cfg_data + cfg_data_size);

View File

@ -8,6 +8,7 @@
#include "../include/EapHost_UI.h"
#include <stdex/memory.hpp>
#include <WinStd/EAP.h>
#include <eaphostpeerconfigapis.h>

View File

@ -11,7 +11,7 @@
#include "../../EAPBase/include/Module.h"
#include <stdex/hex.h>
#include <stdex/hex.hpp>
#include <Windows.h>
#include <EapHostError.h> // include after Windows.h

View File

@ -12,7 +12,7 @@
#include "../../EAPBase/include/Module.h"
#include <stdex/hex.h>
#include <stdex/hex.hpp>
#include <Windows.h>
#include <EapHostError.h> // include after Windows.h

View File

@ -530,8 +530,6 @@ void eap::method_tls::get_result(
method::get_result(reason, pResult);
if (reason == EapPeerMethodResultSuccess) {
eap_attr a;
// Prepare EAP result attributes.
if (pResult->pAttribArray) {
m_eap_attr.reserve((size_t)pResult->pAttribArray->dwNumberOfAttributes + 3);
@ -551,12 +549,18 @@ void eap::method_tls::get_result(
get_keying_material(recv, send);
// MSK: MPPE-Recv-Key
a.create_ms_mppe_key(16, recv.data, sizeof(recv.data));
m_eap_attr.push_back(std::move(a));
{
eap_attr a;
a.create_ms_mppe_key(16, recv.data, sizeof(recv.data));
m_eap_attr.push_back(std::move(a));
}
// MSK: MPPE-Send-Key
a.create_ms_mppe_key(17, send.data, sizeof(send.data));
m_eap_attr.push_back(std::move(a));
{
eap_attr a;
a.create_ms_mppe_key(17, send.data, sizeof(send.data));
m_eap_attr.push_back(std::move(a));
}
// Append blank EAP attribute.
m_eap_attr.push_back(blank_eap_attr);

View File

@ -83,6 +83,7 @@ EapPeerMethodResponseAction eap::method_eapmsg::process_request_packet(
break;
}
// 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:
if (hdr->flags & diameter_avp_flag_mandatory)

View File

@ -215,9 +215,9 @@ void eap::peer_peap_ui::invoke_identity_ui(
hwndParent,
(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(),
&cred_data_size, get_ptr(cred_data),
get_ptr(identity),
get_ptr(error),
&cred_data_size, stdex::get_ptr(cred_data),
stdex::get_ptr(identity),
stdex::get_ptr(error),
NULL);
if (dwResult == ERROR_SUCCESS) {
// Inner EAP method provided credentials.
@ -330,7 +330,7 @@ void eap::peer_peap_ui::invoke_interactive_ui(
ctx.m_data.data(),
&dwSizeofDataFromInteractiveUI,
&pDataFromInteractiveUI,
get_ptr(error));
stdex::get_ptr(error));
if (dwResult == ERROR_SUCCESS) {
// Inner EAP method provided response.
ctx.m_data.assign(pDataFromInteractiveUI, pDataFromInteractiveUI + dwSizeofDataFromInteractiveUI);

View File

@ -20,4 +20,6 @@
#include "../../EapHost/include/Credentials.h"
#include "../../EapBase/include/UIContext.h"
#include <stdex/memory.hpp>
#include <wx/choicdlg.h>

@ -1 +1 @@
Subproject commit 83c749e394ef1e95b594634634a90aee89e8d8af
Subproject commit f85047dab9f000b625864eb930e11f650831ef7c

@ -1 +1 @@
Subproject commit 09d0f347e807c2cb15726f3f4ff38cdc641d72c9
Subproject commit 246f2baa1e3a7964f173469da3fd16e8336094cc

@ -1 +1 @@
Subproject commit e3a59d1118053ed48dc15b83d17125da87c434dd
Subproject commit 79ec08365068ab6e03b06caef13de0ce6b06fcd5

View File

@ -2,4 +2,3 @@
/CredWrite.exe
/MsiUseFeature.exe
/PDB.zip
/WLANManager*.exe