Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a89ca5e70 | |||
54d69aeec1 | |||
54934a619e | |||
c5f514ac56 | |||
3edcf6e1fd | |||
9248c02db0 | |||
e2287c07c0 | |||
b693f464d3 | |||
753f55ffc0 | |||
920d0ab2f7 | |||
d3b9a21c81 | |||
4281672d13 | |||
b3b292a848 | |||
f39d192d91 | |||
5bd970b9e7 | |||
1b143cdbc9 | |||
7b6e1b2438 | |||
fc85c6e4bb | |||
0bae6380c9 | |||
f8f32262c2 | |||
f43488be98 | |||
f32d653bb8 |
Binary file not shown.
Binary file not shown.
Submodule MSI/MSIBuild updated: ce10368864...2c96dff9c2
18
README.md
18
README.md
@@ -1,8 +1,10 @@
|
|||||||
# GÉANTLink
|
# GÉANTLink
|
||||||
|
|
||||||
Suite of EAP supplicants for Microsoft Windows - IEEE 802.1X plug-ins for enterprise network authentication
|
Suite of EAP supplicants for Microsoft Windows - IEEE 802.1X clients for enterprise network authentication
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
- Integrates into Windows seamlessly
|
||||||
|
- Wired and wireless network support
|
||||||
|
|
||||||
### Authentication methods
|
### Authentication methods
|
||||||
- EAP-TTLS with the following inner methods:
|
- EAP-TTLS with the following inner methods:
|
||||||
@@ -13,7 +15,7 @@ Suite of EAP supplicants for Microsoft Windows - IEEE 802.1X plug-ins for enterp
|
|||||||
|
|
||||||
### Security
|
### Security
|
||||||
- Microsoft Windows Credential Manager stored user credentials
|
- Microsoft Windows Credential Manager stored user credentials
|
||||||
- User credentials can be shared between different network profiles
|
- User credentials can be shared between different network profiles, regardless of their connection: wired or wireless
|
||||||
- Encrypted EapHost inter-process communication
|
- Encrypted EapHost inter-process communication
|
||||||
- TLS:
|
- TLS:
|
||||||
- Separate trusted root CA list
|
- Separate trusted root CA list
|
||||||
@@ -29,11 +31,18 @@ Suite of EAP supplicants for Microsoft Windows - IEEE 802.1X plug-ins for enterp
|
|||||||
- Lockable network profile configuration
|
- Lockable network profile configuration
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
- Released as multi-lingual 32 and 64-bit MSI packages
|
- Released as multi-lingual 32 and 64-bit MSI packages; Group Policy deployment supported
|
||||||
- [MsiUseFeature utility](https://github.com/Amebis/GEANTLink/tree/ver1.1/MsiUseFeature) for GÉANTLink install state testing (for embedding GÉANTLink into other setup packages)
|
- [MsiUseFeature utility](https://github.com/Amebis/GEANTLink/tree/ver1.1/MsiUseFeature) for GÉANTLink install state testing (for embedding GÉANTLink into other setup packages)
|
||||||
- [CredWrite utility](https://github.com/Amebis/GEANTLink/tree/ver1.1/CredWrite) for automated user credential import to Credential Manager
|
- [CredWrite utility](https://github.com/Amebis/GEANTLink/tree/ver1.1/CredWrite) for automated user credential import to Credential Manager
|
||||||
- [WLANManager utility](https://github.com/Amebis/GEANTLink/tree/ver1.1/WLANManager) to allow network profile configuration dialog shortcuts
|
- [WLANManager utility](https://github.com/Amebis/GEANTLink/tree/ver1.1/WLANManager) to allow network profile configuration dialog shortcuts
|
||||||
|
|
||||||
|
### Supported operating systems
|
||||||
|
- Windows Vista, Windows Server 2008
|
||||||
|
- Windows 7, Windows Server 2008 R2
|
||||||
|
|
||||||
|
## Download
|
||||||
|
Binaries are available for download [here](https://github.com/Amebis/GEANTLink/releases).
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
### Building Environment Requirements
|
### Building Environment Requirements
|
||||||
@@ -116,3 +125,6 @@ Command | Explanation
|
|||||||
`nmake SetupDebug` | Builds a debug version of project and debug MSI setup files. The resulting files can be found in `output\Setup` folder.
|
`nmake SetupDebug` | Builds a debug version of project and debug MSI setup files. The resulting files can be found in `output\Setup` folder.
|
||||||
|
|
||||||
The `/ls` flag can be appended to the commands above to reduce NMAKE’s verbosity. You can combine multiple targets (i.e. nmake Unregister Clean). Please, see NMAKE reference for further reading.
|
The `/ls` flag can be appended to the commands above to reduce NMAKE’s verbosity. You can combine multiple targets (i.e. nmake Unregister Clean). Please, see NMAKE reference for further reading.
|
||||||
|
|
||||||
|
### Translating into your language
|
||||||
|
GÉANTLink is fully localizable. We kindly invite you to help [translating it on Transifex](https://www.transifex.com/eduroam_devel/geantlink/).
|
||||||
|
@@ -60,6 +60,10 @@ static int WLANManager()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wstring interface_name;
|
||||||
|
if (nArgs >= 5 && _wcsicmp(pwcArglist[3], L"interface") == 0)
|
||||||
|
interface_name = pwcArglist[4];
|
||||||
|
|
||||||
// Open WLAN handle.
|
// Open WLAN handle.
|
||||||
DWORD dwNegotiatedVersion;
|
DWORD dwNegotiatedVersion;
|
||||||
wlan_handle wlan;
|
wlan_handle wlan;
|
||||||
@@ -83,21 +87,55 @@ static int WLANManager()
|
|||||||
interfaces.reset(pInterfaceList);
|
interfaces.reset(pInterfaceList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tstring_guid devclass_net(GUID_DEVCLASS_NET);
|
||||||
|
bool profile_found = false;
|
||||||
for (DWORD i = 0; i < interfaces->dwNumberOfItems; i++) {
|
for (DWORD i = 0; i < interfaces->dwNumberOfItems; i++) {
|
||||||
if (interfaces->InterfaceInfo[i].isState == wlan_interface_state_not_ready) {
|
if (interfaces->InterfaceInfo[i].isState == wlan_interface_state_not_ready) {
|
||||||
// This interface is not ready.
|
// This interface is not ready.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!interface_name.empty()) {
|
||||||
|
// Read the interface name from registry.
|
||||||
|
reg_key key;
|
||||||
|
if (key.open(HKEY_LOCAL_MACHINE, tstring_printf(_T("SYSTEM\\CurrentControlSet\\Control\\Network\\%s\\%s\\Connection"), devclass_net.c_str(), tstring_guid(interfaces->InterfaceInfo[i].InterfaceGuid).c_str()).c_str(), 0, KEY_READ)) {
|
||||||
|
wstring name;
|
||||||
|
if (RegQueryStringValue(key, _T("Name"), name) == ERROR_SUCCESS && _wcsicmp(interface_name.c_str(), name.c_str()) != 0) {
|
||||||
|
// Not the interface we are interested in.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unique_ptr<WLAN_PROFILE_INFO_LIST, WlanFreeMemory_delete<WLAN_PROFILE_INFO_LIST> > profiles;
|
||||||
|
{
|
||||||
|
// Get a list of profiles.
|
||||||
|
WLAN_PROFILE_INFO_LIST *pProfileList;
|
||||||
|
DWORD dwResult = WlanGetProfileList(wlan, &(interfaces->InterfaceInfo[i].InterfaceGuid), NULL, &pProfileList);
|
||||||
|
if (dwResult != ERROR_SUCCESS) {
|
||||||
|
DisplayError(_T("%s function failed (error %u)."), _T("WlanGetProfileList"), dwResult);
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
profiles.reset(pProfileList);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (DWORD j = 0; j < profiles->dwNumberOfItems; j++)
|
||||||
|
if (_wcsicmp(profiles->ProfileInfo[j].strProfileName, pwcArglist[2]) == 0) {
|
||||||
|
profile_found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!profile_found)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Launch WLAN profile config dialog.
|
// Launch WLAN profile config dialog.
|
||||||
// Note: When a debugger is attached to this process the WlanUIEditProfile() will raise an exception and fail.
|
WLAN_REASON_CODE wlrc = L2_REASON_CODE_SUCCESS;
|
||||||
WLAN_REASON_CODE wlrc;
|
|
||||||
DWORD dwResult = WlanUIEditProfile(WLAN_UI_API_VERSION, pwcArglist[2], &(interfaces->InterfaceInfo[i].InterfaceGuid), NULL, WLSecurityPage, NULL, &wlrc);
|
DWORD dwResult = WlanUIEditProfile(WLAN_UI_API_VERSION, pwcArglist[2], &(interfaces->InterfaceInfo[i].InterfaceGuid), NULL, WLSecurityPage, NULL, &wlrc);
|
||||||
if (dwResult != ERROR_SUCCESS) {
|
if (dwResult != ERROR_SUCCESS) {
|
||||||
DisplayError(_T("%s function failed (error %u)."), _T("WlanUIEditProfile"), dwResult);
|
// WlanUIEditProfile() displays own error dialog on failure.
|
||||||
|
//DisplayError(_T("%s function failed (error %u)."), _T("WlanUIEditProfile"), dwResult);
|
||||||
return 5;
|
return 5;
|
||||||
}
|
} else if (wlrc != WLAN_REASON_CODE_SUCCESS) {
|
||||||
if (wlrc != WLAN_REASON_CODE_SUCCESS) {
|
|
||||||
tstring reason;
|
tstring reason;
|
||||||
if (WlanReasonCodeToString(wlrc, reason, NULL) == ERROR_SUCCESS)
|
if (WlanReasonCodeToString(wlrc, reason, NULL) == ERROR_SUCCESS)
|
||||||
DisplayError(_T("%s function failed: %s"), _T("WlanUIEditProfile"), reason.c_str());
|
DisplayError(_T("%s function failed: %s"), _T("WlanUIEditProfile"), reason.c_str());
|
||||||
@@ -108,6 +146,9 @@ static int WLANManager()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!profile_found)
|
||||||
|
DisplayError(_T("%ls profile not found."), pwcArglist[2]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,18 +160,26 @@ int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In
|
|||||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
UNREFERENCED_PARAMETER(nCmdShow);
|
UNREFERENCED_PARAMETER(nCmdShow);
|
||||||
|
|
||||||
|
int res = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
// Initialize Windows XP visual styles
|
// Note: When a debugger is attached to this process, the WlanUIEditProfile() will raise an exception and fail.
|
||||||
INITCOMMONCONTROLSEX icc;
|
// It was accidentially discovered, that COM initialization resolves this issue.
|
||||||
icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
|
com_initializer com_init(NULL);
|
||||||
icc.dwICC = ICC_WIN95_CLASSES | ICC_STANDARD_CLASSES | ICC_LINK_CLASS;
|
|
||||||
InitCommonControlsEx(&icc);
|
{
|
||||||
|
// Initialize Windows XP visual styles
|
||||||
|
INITCOMMONCONTROLSEX icc;
|
||||||
|
icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
|
||||||
|
icc.dwICC = ICC_WIN95_CLASSES | ICC_STANDARD_CLASSES | ICC_LINK_CLASS;
|
||||||
|
InitCommonControlsEx(&icc);
|
||||||
|
}
|
||||||
|
|
||||||
|
pfnWlanReasonCodeToString = WlanReasonCodeToString;
|
||||||
|
|
||||||
|
res = WLANManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
pfnWlanReasonCodeToString = WlanReasonCodeToString;
|
|
||||||
|
|
||||||
int res = WLANManager();
|
|
||||||
|
|
||||||
assert(!_CrtDumpMemoryLeaks());
|
assert(!_CrtDumpMemoryLeaks());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@ Invokes standard Windows Wireless Network Properties dialog
|
|||||||
|
|
||||||
##Usage
|
##Usage
|
||||||
```
|
```
|
||||||
WLANManager profile <name>
|
WLANManager profile <name> [interface <name>]
|
||||||
```
|
```
|
||||||
|
|
||||||
- `name` - The name of the network profile (not neccessarely the same as SSID)
|
- `name` - The name of the network profile (not neccessarely the same as SSID)
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <CommCtrl.h>
|
#include <CommCtrl.h>
|
||||||
|
#include <devguid.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2016 Amebis
|
Copyright 2016 Amebis
|
||||||
Copyright 2016 GÉANT
|
Copyright 2016 GÉANT
|
||||||
|
|
||||||
This file is part of GÉANTLink.
|
This file is part of GÉANTLink.
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2016 Amebis
|
Copyright 2016 Amebis
|
||||||
Copyright 2016 GÉANT
|
Copyright 2016 GÉANT
|
||||||
|
|
||||||
This file is part of GÉANTLink.
|
This file is part of GÉANTLink.
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
// Product version as a single DWORD
|
// Product version as a single DWORD
|
||||||
// Note: Used for version comparison within C/C++ code.
|
// Note: Used for version comparison within C/C++ code.
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION 0x01010400
|
#define PRODUCT_VERSION 0x01010600
|
||||||
|
|
||||||
//
|
//
|
||||||
// Product version by components
|
// Product version by components
|
||||||
@@ -39,26 +39,26 @@
|
|||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_MAJ 1
|
#define PRODUCT_VERSION_MAJ 1
|
||||||
#define PRODUCT_VERSION_MIN 1
|
#define PRODUCT_VERSION_MIN 1
|
||||||
#define PRODUCT_VERSION_REV 4
|
#define PRODUCT_VERSION_REV 6
|
||||||
#define PRODUCT_VERSION_BUILD 0
|
#define PRODUCT_VERSION_BUILD 0
|
||||||
|
|
||||||
//
|
//
|
||||||
// Human readable product version and build year for UI
|
// Human readable product version and build year for UI
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_STR "1.1a"
|
#define PRODUCT_VERSION_STR "1.1c"
|
||||||
#define PRODUCT_BUILD_YEAR_STR "2016"
|
#define PRODUCT_BUILD_YEAR_STR "2017"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Numerical version presentation for ProductVersion propery in
|
// Numerical version presentation for ProductVersion propery in
|
||||||
// MSI packages (syntax: N.N[.N[.N]])
|
// MSI packages (syntax: N.N[.N[.N]])
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_INST "1.1.4"
|
#define PRODUCT_VERSION_INST "1.1.6"
|
||||||
|
|
||||||
//
|
//
|
||||||
// The product code for ProductCode property in MSI packages
|
// The product code for ProductCode property in MSI packages
|
||||||
// Replace with new on every version change, regardless how minor it is.
|
// Replace with new on every version change, regardless how minor it is.
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_GUID "{701B8E8C-56E1-46FA-B568-57867564E573}"
|
#define PRODUCT_VERSION_GUID "{82DBB47E-71F9-4E67-B728-CACB4480B63E}"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Product vendor
|
// Product vendor
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2016 Amebis
|
Copyright 2016 Amebis
|
||||||
Copyright 2016 GÉANT
|
Copyright 2016 GÉANT
|
||||||
|
|
||||||
This file is part of GÉANTLink.
|
This file is part of GÉANTLink.
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2016 Amebis
|
Copyright 2016 Amebis
|
||||||
Copyright 2016 GÉANT
|
Copyright 2016 GÉANT
|
||||||
|
|
||||||
This file is part of GÉANTLink.
|
This file is part of GÉANTLink.
|
||||||
|
|
||||||
|
@@ -31,36 +31,6 @@ namespace eap
|
|||||||
class config_connection;
|
class config_connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \addtogroup EAPBaseStream
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Packs a configuration
|
|
||||||
///
|
|
||||||
/// \param[inout] cursor Memory cursor
|
|
||||||
/// \param[in] val Configuration to pack
|
|
||||||
///
|
|
||||||
inline void operator<<(_Inout_ eap::cursor_out &cursor, _In_ const eap::config &val);
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Returns packed size of a configuration
|
|
||||||
///
|
|
||||||
/// \param[in] val Configuration to pack
|
|
||||||
///
|
|
||||||
/// \returns Size of data when packed (in bytes)
|
|
||||||
///
|
|
||||||
inline size_t pksizeof(_In_ const eap::config &val);
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Unpacks a configuration
|
|
||||||
///
|
|
||||||
/// \param[inout] cursor Memory cursor
|
|
||||||
/// \param[out] val Configuration to unpack to
|
|
||||||
///
|
|
||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::config &val);
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Module.h"
|
#include "Module.h"
|
||||||
@@ -89,9 +59,9 @@ namespace eap
|
|||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Base class for configuration storage
|
/// Base class for packable and XML-exportable storage
|
||||||
///
|
///
|
||||||
class config
|
class config : public packable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
@@ -160,32 +130,6 @@ namespace eap
|
|||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// \name BLOB management
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Packs this object
|
|
||||||
///
|
|
||||||
/// \param[inout] cursor Memory cursor
|
|
||||||
///
|
|
||||||
virtual void operator<<(_Inout_ cursor_out &cursor) const;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Returns packed size of this object
|
|
||||||
///
|
|
||||||
/// \returns Size of data when packed (in bytes)
|
|
||||||
///
|
|
||||||
virtual size_t get_pk_size() const;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Unpacks this object
|
|
||||||
///
|
|
||||||
/// \param[inout] cursor Memory cursor
|
|
||||||
///
|
|
||||||
virtual void operator>>(_Inout_ cursor_in &cursor);
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
module &m_module; ///< EAP module
|
module &m_module; ///< EAP module
|
||||||
|
|
||||||
@@ -530,24 +474,6 @@ namespace eap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void operator<<(_Inout_ eap::cursor_out &cursor, _In_ const eap::config &val)
|
|
||||||
{
|
|
||||||
val.operator<<(cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline size_t pksizeof(_In_ const eap::config &val)
|
|
||||||
{
|
|
||||||
return val.get_pk_size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::config &val)
|
|
||||||
{
|
|
||||||
val.operator>>(cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// \addtogroup EAPBaseStream
|
/// \addtogroup EAPBaseStream
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
@@ -584,6 +510,7 @@ inline size_t pksizeof(_In_ const eap::config_method::status_t &val)
|
|||||||
///
|
///
|
||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::config_method::status_t &val)
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::config_method::status_t &val)
|
||||||
{
|
{
|
||||||
|
val = (eap::config_method::status_t)0; // Reset higher bytes to zero before reading to lower byte.
|
||||||
cursor >> (unsigned char&)val;
|
cursor >> (unsigned char&)val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -479,6 +479,7 @@ inline size_t pksizeof(_In_ const eap::credentials_pass::enc_alg_t &val)
|
|||||||
///
|
///
|
||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::credentials_pass::enc_alg_t &val)
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::credentials_pass::enc_alg_t &val)
|
||||||
{
|
{
|
||||||
|
val = (eap::credentials_pass::enc_alg_t)0; // Reset higher bytes to zero before reading to lower byte.
|
||||||
cursor >> (unsigned char&)val;
|
cursor >> (unsigned char&)val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -80,6 +80,8 @@ namespace eap
|
|||||||
struct cursor_out;
|
struct cursor_out;
|
||||||
struct cursor_in;
|
struct cursor_in;
|
||||||
|
|
||||||
|
class packable;
|
||||||
|
|
||||||
template<size_t N> struct WINSTD_NOVTABLE sanitizing_blob_f;
|
template<size_t N> struct WINSTD_NOVTABLE sanitizing_blob_f;
|
||||||
template<size_t N> struct WINSTD_NOVTABLE sanitizing_blob_zf;
|
template<size_t N> struct WINSTD_NOVTABLE sanitizing_blob_zf;
|
||||||
|
|
||||||
@@ -499,6 +501,31 @@ inline size_t pksizeof(_In_ const EAP_METHOD_TYPE &val);
|
|||||||
///
|
///
|
||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ EAP_METHOD_TYPE &val);
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ EAP_METHOD_TYPE &val);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Packs a packable object
|
||||||
|
///
|
||||||
|
/// \param[inout] cursor Memory cursor
|
||||||
|
/// \param[in] val Object to pack
|
||||||
|
///
|
||||||
|
inline void operator<<(_Inout_ eap::cursor_out &cursor, _In_ const eap::packable &val);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns packed size of a packable object
|
||||||
|
///
|
||||||
|
/// \param[in] val Object to pack
|
||||||
|
///
|
||||||
|
/// \returns Size of data when packed (in bytes)
|
||||||
|
///
|
||||||
|
inline size_t pksizeof(_In_ const eap::packable &val);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Unpacks a packable object
|
||||||
|
///
|
||||||
|
/// \param[inout] cursor Memory cursor
|
||||||
|
/// \param[out] val Object to unpack to
|
||||||
|
///
|
||||||
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::packable &val);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
///
|
///
|
||||||
@@ -574,6 +601,45 @@ namespace eap
|
|||||||
ptr_type ptr_end; ///< Pointer to the end of BLOB
|
ptr_type ptr_end; ///< Pointer to the end of BLOB
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Base class for all packable data classes
|
||||||
|
///
|
||||||
|
class packable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
///
|
||||||
|
/// Constructs configuration
|
||||||
|
///
|
||||||
|
packable();
|
||||||
|
|
||||||
|
/// \name BLOB management
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Packs this object
|
||||||
|
///
|
||||||
|
/// \param[inout] cursor Memory cursor
|
||||||
|
///
|
||||||
|
virtual void operator<<(_Inout_ cursor_out &cursor) const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns packed size of this object
|
||||||
|
///
|
||||||
|
/// \returns Size of data when packed (in bytes)
|
||||||
|
///
|
||||||
|
virtual size_t get_pk_size() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Unpacks this object
|
||||||
|
///
|
||||||
|
/// \param[inout] cursor Memory cursor
|
||||||
|
///
|
||||||
|
virtual void operator>>(_Inout_ cursor_in &cursor);
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
};
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// \addtogroup EAPBaseSanitizing
|
/// \addtogroup EAPBaseSanitizing
|
||||||
@@ -1087,9 +1153,11 @@ inline size_t pksizeof(_In_ const winstd::cert_context &val)
|
|||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ winstd::cert_context &val)
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ winstd::cert_context &val)
|
||||||
{
|
{
|
||||||
DWORD dwCertEncodingType;
|
DWORD dwCertEncodingType;
|
||||||
|
assert(sizeof(dwCertEncodingType) == sizeof(unsigned int));
|
||||||
cursor >> (unsigned int&)dwCertEncodingType;
|
cursor >> (unsigned int&)dwCertEncodingType;
|
||||||
|
|
||||||
DWORD dwCertEncodedSize;
|
DWORD dwCertEncodedSize;
|
||||||
|
assert(sizeof(dwCertEncodingType) == sizeof(unsigned int));
|
||||||
cursor >> (unsigned int&)dwCertEncodedSize;
|
cursor >> (unsigned int&)dwCertEncodedSize;
|
||||||
|
|
||||||
if (dwCertEncodedSize) {
|
if (dwCertEncodedSize) {
|
||||||
@@ -1116,6 +1184,7 @@ inline size_t pksizeof(_In_ const winstd::eap_type_t &val)
|
|||||||
|
|
||||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ winstd::eap_type_t &val)
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ winstd::eap_type_t &val)
|
||||||
{
|
{
|
||||||
|
val = (winstd::eap_type_t)0; // Reset higher bytes to zero before reading to lower byte.
|
||||||
cursor >> (unsigned char&)val;
|
cursor >> (unsigned char&)val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1198,6 +1267,24 @@ inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ EAP_METHOD_TYPE &va
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void operator<<(_Inout_ eap::cursor_out &cursor, _In_ const eap::packable &val)
|
||||||
|
{
|
||||||
|
val.operator<<(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline size_t pksizeof(_In_ const eap::packable &val)
|
||||||
|
{
|
||||||
|
return val.get_pk_size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::packable &val)
|
||||||
|
{
|
||||||
|
val.operator>>(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef htonll
|
#ifndef htonll
|
||||||
|
|
||||||
inline unsigned __int64 htonll(unsigned __int64 val)
|
inline unsigned __int64 htonll(unsigned __int64 val)
|
||||||
|
@@ -77,24 +77,6 @@ void eap::config::load(_In_ IXMLDOMNode *pConfigRoot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void eap::config::operator<<(_Inout_ cursor_out &cursor) const
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
size_t eap::config::get_pk_size() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void eap::config::operator>>(_Inout_ cursor_in &cursor)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const bstr eap::config::namespace_eapmetadata(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
const bstr eap::config::namespace_eapmetadata(L"urn:ietf:params:xml:ns:yang:ietf-eap-metadata");
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,10 +20,39 @@
|
|||||||
|
|
||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
|
|
||||||
|
#pragma comment(lib, "Ws2_32.lib")
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace winstd;
|
using namespace winstd;
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// eap::packable
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
eap::packable::packable()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void eap::packable::operator<<(_Inout_ cursor_out &cursor) const
|
||||||
|
{
|
||||||
|
UNREFERENCED_PARAMETER(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
size_t eap::packable::get_pk_size() const
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void eap::packable::operator>>(_Inout_ cursor_in &cursor)
|
||||||
|
{
|
||||||
|
UNREFERENCED_PARAMETER(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// eap::diameter_avp_append
|
// eap::diameter_avp_append
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -359,6 +359,14 @@ public:
|
|||||||
///
|
///
|
||||||
/// Constructs a credential dialog
|
/// Constructs a credential dialog
|
||||||
///
|
///
|
||||||
|
/// \param[in] prov Provider configuration data
|
||||||
|
/// \param[in] parent Parent window
|
||||||
|
/// \param[in] id An identifier for the dialog. A value of -1 is taken to mean a default.
|
||||||
|
/// \param[in] title The title of the dialog
|
||||||
|
/// \param[in] pos The dialog position. The value \c wxDefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] size The dialog size. The value \c wxDefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] style The window style
|
||||||
|
///
|
||||||
wxEAPCredentialsDialog(const eap::config_provider &prov, wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title = _("EAP Credentials"), const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
|
wxEAPCredentialsDialog(const eap::config_provider &prov, wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title = _("EAP Credentials"), const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Binary file not shown.
@@ -55,7 +55,6 @@ wxTLSServerTrustPanelBase::wxTLSServerTrustPanelBase( wxWindow* parent, wxWindow
|
|||||||
sb_root_ca_btn->Add( m_root_ca_add_file, 0, wxRIGHT|wxLEFT, 5 );
|
sb_root_ca_btn->Add( m_root_ca_add_file, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_root_ca_remove = new wxButton( sb_server_trust->GetStaticBox(), wxID_ANY, _("&Remove CA"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_root_ca_remove = new wxButton( sb_server_trust->GetStaticBox(), wxID_ANY, _("&Remove CA"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_root_ca_remove->Enable( false );
|
|
||||||
m_root_ca_remove->SetToolTip( _("Removes selected certificate authorities from the list") );
|
m_root_ca_remove->SetToolTip( _("Removes selected certificate authorities from the list") );
|
||||||
|
|
||||||
sb_root_ca_btn->Add( m_root_ca_remove, 0, wxLEFT, 5 );
|
sb_root_ca_btn->Add( m_root_ca_remove, 0, wxLEFT, 5 );
|
||||||
|
@@ -659,7 +659,7 @@
|
|||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="enabled">0</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
|
@@ -43,7 +43,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
static wxCriticalSection s_lock; ///< Initialization lock
|
static wxCriticalSection s_lock; ///< Initialization lock
|
||||||
static unsigned long s_init_ref_count; ///< Initialization reference counter
|
static unsigned long s_init_ref_count; ///< Initialization reference counter
|
||||||
static wxLocale s_locale; ///< Locale
|
static wxLocale *s_locale; ///< Locale
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -415,9 +415,10 @@ wxInitializerPeer::wxInitializerPeer(_In_ HINSTANCE instance)
|
|||||||
|
|
||||||
// Do our wxWidgets configuration and localization initialization.
|
// Do our wxWidgets configuration and localization initialization.
|
||||||
wxInitializeConfig();
|
wxInitializeConfig();
|
||||||
if (wxInitializeLocale(s_locale)) {
|
s_locale = new wxLocale;
|
||||||
s_locale.AddCatalog(wxT("wxExtend") wxT(wxExtendVersion));
|
if (wxInitializeLocale(*s_locale)) {
|
||||||
s_locale.AddCatalog(wxT("EAPTTLSUI"));
|
s_locale->AddCatalog(wxT("wxExtend") wxT(wxExtendVersion));
|
||||||
|
s_locale->AddCatalog(wxT("EAPTTLSUI"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,9 +430,14 @@ wxInitializerPeer::~wxInitializerPeer()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
wxEntryCleanup();
|
wxEntryCleanup();
|
||||||
|
|
||||||
|
if (s_locale) {
|
||||||
|
delete s_locale;
|
||||||
|
s_locale = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxCriticalSection wxInitializerPeer::s_lock;
|
wxCriticalSection wxInitializerPeer::s_lock;
|
||||||
unsigned long wxInitializerPeer::s_init_ref_count = 0;
|
unsigned long wxInitializerPeer::s_init_ref_count = 0;
|
||||||
wxLocale wxInitializerPeer::s_locale;
|
wxLocale *wxInitializerPeer::s_locale = NULL;
|
||||||
|
Submodule lib/WinStd updated: 5ffcb79306...750f40fada
Submodule lib/wxExtend updated: eb33a877d1...e353a2ed60
Reference in New Issue
Block a user