Compare commits

..

11 Commits

11 changed files with 75 additions and 22 deletions

BIN
Makefile

Binary file not shown.

View File

@@ -1,8 +1,10 @@
# 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
- Integrates into Windows seamlessly
- Wired and wireless network support
### Authentication methods
- EAP-TTLS with the following inner methods:
@@ -14,7 +16,7 @@ Suite of EAP supplicants for Microsoft Windows - IEEE 802.1X plug-ins for enterp
### Security
- 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
- TLS:
- Separate trusted root CA list
@@ -30,11 +32,18 @@ Suite of EAP supplicants for Microsoft Windows - IEEE 802.1X plug-ins for enterp
- Lockable network profile configuration
### 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/master/MsiUseFeature) for GÉANTLink install state testing (for embedding GÉANTLink into other setup packages)
- [CredWrite utility](https://github.com/Amebis/GEANTLink/tree/master/CredWrite) for automated user credential import to Credential Manager
- [WLANManager utility](https://github.com/Amebis/GEANTLink/tree/master/WLANManager) to allow network profile configuration dialog shortcuts
### Supported operating systems
- Windows Vista, Windows Server 2008
- Windows 7, Windows Server 2008 R2
- Windows 8 Desktop, Windows Server 2012
- Windows 8.1 Desktop, Windows Server 2012 R2
- Windows 10 Desktop, Windows Server 2016
## Download
Binaries are available for download [here](https://github.com/Amebis/GEANTLink/releases).

View File

@@ -60,6 +60,10 @@ static int WLANManager()
return -1;
}
wstring interface_name;
if (nArgs >= 5 && _wcsicmp(pwcArglist[3], L"interface") == 0)
interface_name = pwcArglist[4];
// Open WLAN handle.
DWORD dwNegotiatedVersion;
wlan_handle wlan;
@@ -83,20 +87,55 @@ static int WLANManager()
interfaces.reset(pInterfaceList);
}
tstring_guid devclass_net(GUID_DEVCLASS_NET);
bool profile_found = false;
for (DWORD i = 0; i < interfaces->dwNumberOfItems; i++) {
if (interfaces->InterfaceInfo[i].isState == wlan_interface_state_not_ready) {
// This interface is not ready.
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.
WLAN_REASON_CODE wlrc;
WLAN_REASON_CODE wlrc = L2_REASON_CODE_SUCCESS;
DWORD dwResult = WlanUIEditProfile(WLAN_UI_API_VERSION, pwcArglist[2], &(interfaces->InterfaceInfo[i].InterfaceGuid), NULL, WLSecurityPage, NULL, &wlrc);
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;
}
if (wlrc != WLAN_REASON_CODE_SUCCESS) {
} else if (wlrc != WLAN_REASON_CODE_SUCCESS) {
tstring reason;
if (WlanReasonCodeToString(wlrc, reason, NULL) == ERROR_SUCCESS)
DisplayError(_T("%s function failed: %s"), _T("WlanUIEditProfile"), reason.c_str());
@@ -107,6 +146,9 @@ static int WLANManager()
break;
}
if (!profile_found)
DisplayError(_T("%ls profile not found."), pwcArglist[2]);
return 0;
}

View File

@@ -3,10 +3,11 @@ Invokes standard Windows Wireless Network Properties dialog
## Usage
```
WLANManager profile <name>
WLANManager profile <profile name> [interface <interface name>]
```
- `name` - The name of the network profile (not neccessarely the same as SSID)
- `profile name` - The name of the network profile (not neccessarely the same as SSID)
- `interface name` - The name of the specific network interface to search the profile at
Return codes:
- -1 = Invalid parameters

View File

@@ -28,6 +28,7 @@
#include <Windows.h>
#include <CommCtrl.h>
#include <devguid.h>
#include <tchar.h>
#include <memory>

View File

@@ -29,7 +29,7 @@
// Product version as a single DWORD
// Note: Used for version comparison within C/C++ code.
//
#define PRODUCT_VERSION 0x01020300
#define PRODUCT_VERSION 0x01020400
//
// Product version by components
@@ -39,26 +39,26 @@
//
#define PRODUCT_VERSION_MAJ 1
#define PRODUCT_VERSION_MIN 2
#define PRODUCT_VERSION_REV 3
#define PRODUCT_VERSION_REV 4
#define PRODUCT_VERSION_BUILD 0
//
// Human readable product version and build year for UI
//
#define PRODUCT_VERSION_STR "1.2-beta2"
#define PRODUCT_BUILD_YEAR_STR "2016"
#define PRODUCT_VERSION_STR "1.2"
#define PRODUCT_BUILD_YEAR_STR "2017"
//
// Numerical version presentation for ProductVersion propery in
// MSI packages (syntax: N.N[.N[.N]])
//
#define PRODUCT_VERSION_INST "1.2.3"
#define PRODUCT_VERSION_INST "1.2.4"
//
// 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 "{4C8DDB7D-3297-4B6A-ACF3-19702F85DE49}"
#define PRODUCT_VERSION_GUID "{3490271F-380F-4618-83F9-114A340E2C00}"
//
// Product vendor