Compare commits

..

15 Commits

13 changed files with 75 additions and 22 deletions

Binary file not shown.

BIN
Makefile

Binary file not shown.

View File

@@ -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:
@@ -14,7 +16,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
@@ -30,11 +32,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/master/MsiUseFeature) for GÉANTLink install state testing (for embedding GÉANTLink into other setup packages) - [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 - [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 - [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 ## Download
Binaries are available for download [here](https://github.com/Amebis/GEANTLink/releases). Binaries are available for download [here](https://github.com/Amebis/GEANTLink/releases).

View File

@@ -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,20 +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.
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); 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());
@@ -107,6 +146,9 @@ static int WLANManager()
break; break;
} }
if (!profile_found)
DisplayError(_T("%ls profile not found."), pwcArglist[2]);
return 0; return 0;
} }

View File

@@ -1,12 +1,13 @@
#WLANManager # WLANManager
Invokes standard Windows Wireless Network Properties dialog Invokes standard Windows Wireless Network Properties dialog
##Usage ## 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: Return codes:
- -1 = Invalid parameters - -1 = Invalid parameters

View File

@@ -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>

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 0x01020300 #define PRODUCT_VERSION 0x01020500
// //
// 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 2 #define PRODUCT_VERSION_MIN 2
#define PRODUCT_VERSION_REV 3 #define PRODUCT_VERSION_REV 5
#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.2-beta2" #define PRODUCT_VERSION_STR "1.2a"
#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.2.3" #define PRODUCT_VERSION_INST "1.2.5"
// //
// 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 "{4C8DDB7D-3297-4B6A-ACF3-19702F85DE49}" #define PRODUCT_VERSION_GUID "{B43F5526-283F-4634-8841-51B7CB6D5AEC}"
// //
// Product vendor // Product vendor

View File

@@ -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.

View File

@@ -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.

Binary file not shown.