Certificate/wireless plugins; major refactoring

Migrate much of BI to Services.
Added Wireless Profile Provider plugin feature.
Added Certificate Authority Provider plugin feature.
Modified Certificate Provider plugin feature.
Database migration v17, for Device Profiles.
Enrolment Client Updated to support CA Certificates, Wireless Profiles
and Hardware Info.
New Client Enrolment Protocol to support new features.
Plugin Manifest Generator added to main solution.
Improved AD search performance.
This commit is contained in:
Gary Sharp
2016-09-28 20:16:25 +10:00
parent 489a5df7cc
commit 27c21175d7
210 changed files with 9822 additions and 6675 deletions
+17 -11
View File
@@ -1,6 +1,4 @@
//#define Debug
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -22,6 +20,14 @@ namespace Disco.ClientBootstrapper
private StringBuilder errorMessage;
private Process clientProcess;
#if DEBUG
public const string DiscoServerName = "WS-GSHARP";
public const int DiscoServerPort = 57252;
#else
public const string DiscoServerName = "DISCO";
public const int DiscoServerPort = 9292;
#endif
public BootstrapperLoop(IStatus StatusUI, LoopCompleteCallback Callback)
{
this.statusUI = StatusUI;
@@ -79,12 +85,12 @@ namespace Disco.ClientBootstrapper
// Check for Network Connectivity
statusUI.UpdateStatus(null, "Detecting Network", "Checking network connectivity, Please wait...", true, -1);
if (!Interop.NetworkInterop.PingDisco())
if (!Interop.NetworkInterop.PingDisco(DiscoServerName))
{
statusUI.UpdateStatus(null, "Detecting Network", "No network connectivity detected, Diagnosing...", true, -1);
statusUI_WriteAdapterInfo();
if (!Interop.NetworkInterop.PingDisco())
if (!Interop.NetworkInterop.PingDisco(DiscoServerName))
{
// Check for Wireless
var hasWireless = (Interop.NetworkInterop.NetworkAdapters.Count(na => na.IsWireless) > 0);
@@ -99,17 +105,17 @@ namespace Disco.ClientBootstrapper
statusUI_WriteAdapterInfo();
statusUI.UpdateStatus(null, null, null, true, i);
Program.SleepThread(500, false);
if (Interop.NetworkInterop.PingDisco())
if (Interop.NetworkInterop.PingDisco(DiscoServerName))
break;
}
if (!Interop.NetworkInterop.PingDisco())
if (!Interop.NetworkInterop.PingDisco(DiscoServerName))
{
statusUI.UpdateStatus(null, "Wireless Network Failed", "Unable to connect to the wireless network, please connect the network cable...", false);
Program.SleepThread(3000, false);
}
}
if (!Interop.NetworkInterop.PingDisco())
if (!Interop.NetworkInterop.PingDisco(DiscoServerName))
{
// Instruct user to connect network cable
statusUI.UpdateStatus(null, "Please connect the network cable", null);
@@ -118,13 +124,13 @@ namespace Disco.ClientBootstrapper
statusUI_WriteAdapterInfo();
statusUI.UpdateStatus(null, null, null, true, i);
Program.SleepThread(500, false);
if (Interop.NetworkInterop.PingDisco())
if (Interop.NetworkInterop.PingDisco(DiscoServerName))
break;
}
}
}
if (!Interop.NetworkInterop.PingDisco())
if (!Interop.NetworkInterop.PingDisco(DiscoServerName))
{
// Client Failed
if (this.mLoopCompleteCallback != null)
@@ -143,7 +149,7 @@ namespace Disco.ClientBootstrapper
// Don't use a proxy when downloading the Client
webClient.Proxy = new WebProxy();
webClient.DownloadFile("http://disco:9292/Services/Client/PreparationClient", clientSourceLocation);
webClient.DownloadFile($"http://{DiscoServerName}:{DiscoServerPort}/Services/Client/PreparationClient", clientSourceLocation);
}
// Unzip Client
@@ -28,6 +28,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<AssemblyVersion>2.2.16272.1003</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -165,13 +165,13 @@ namespace Disco.ClientBootstrapper.Interop
}
}
public static bool PingDisco()
public static bool PingDisco(string ServerName)
{
using (Ping p = new Ping())
{
try
{
PingReply pr = p.Send("disco", 2000);
PingReply pr = p.Send(ServerName, 2000);
if (pr.Status == IPStatus.Success)
return true;
else
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.2.16272.1003")]
[assembly: AssemblyFileVersion("2.2.16272.1003")]