Skip to content

Commit

Permalink
Merge pull request #82 from Keyfactor/sqlmerge
Browse files Browse the repository at this point in the history
Sqlmerge
  • Loading branch information
bhillkeyfactor authored Aug 29, 2023
2 parents ce5d795 + c171c07 commit 932ff7c
Show file tree
Hide file tree
Showing 27 changed files with 1,105 additions and 79 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2.2.1
* Fixed issue where https binding without cert was causing an error

2.2.0
* Added Support for GMSA Account by using no value for ServerUsernanme and ServerPassword. KF Command version 10.2 or later is required to specify empty credentials.
* Added local PowerShell support, triggered when specifying 'localhost' as the client machine while using the IISU or WinCert Orchestrator. This change was tested using KF Command 10.3
Expand Down
2 changes: 1 addition & 1 deletion IISU/ClientPSCertStoreManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function InstallPfxToMachineStore([byte[]]$bytes, [string]$password, [string]$st
{
_logger.LogTrace("ps Has Errors");
var psError = ps.Streams.Error.ReadAll()
.Aggregate(string.Empty, (current, error) => current + error.ErrorDetails.Message);
.Aggregate(string.Empty, (current, error) => current + error?.ErrorDetails.Message);
{
return new JobResult
{
Expand Down
15 changes: 8 additions & 7 deletions IISU/ClientPSIIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,17 @@ public JobResult BindCertificate(X509Certificate2 x509Cert)
var bindings = ps.Invoke();
foreach (var binding in bindings)
{
if (binding.Properties["Protocol"].Value.ToString().Contains("http"))
if (binding.Properties["Protocol"].Value.ToString().Contains("https"))
{
_logger.LogTrace("Looping Bindings....");
var bindingSiteName = binding.Properties["name"].Value.ToString();
var bindingIpAddress = binding.Properties["Bindings"].Value.ToString()?.Split(':')[0];
var bindingPort = binding.Properties["Bindings"].Value.ToString()?.Split(':')[1];
var bindingHostName = binding.Properties["Bindings"].Value.ToString()?.Split(':')[2];
var bindingProtocol = binding.Properties["Protocol"].Value.ToString();
var bindingThumbprint = binding.Properties["thumbprint"].Value.ToString();
var bindingSniFlg = binding.Properties["sniFlg"].Value.ToString();
var bindingBindings = binding.Properties["Bindings"].Value.ToString()?.Split(':');
var bindingIpAddress = bindingBindings?.Length > 0 ? bindingBindings[0] : null;
var bindingPort = bindingBindings?.Length > 1 ? bindingBindings[1] : null;
var bindingHostName = bindingBindings?.Length > 2 ? bindingBindings[2] : null;
var bindingProtocol = binding.Properties["Protocol"]?.Value?.ToString();
var bindingThumbprint = binding.Properties["thumbprint"]?.Value?.ToString();
var bindingSniFlg = binding.Properties["sniFlg"]?.Value?.ToString();

_logger.LogTrace(
$"bindingSiteName: {bindingSiteName}, bindingIpAddress: {bindingIpAddress}, bindingPort: {bindingPort}, bindingHostName: {bindingHostName}, bindingProtocol: {bindingProtocol}, bindingThumbprint: {bindingThumbprint}, bindingSniFlg: {bindingSniFlg}");
Expand Down
Loading

0 comments on commit 932ff7c

Please sign in to comment.