diff --git a/CitrixAdcOrchestratorJobExtension/CitrixAdcStore.cs b/CitrixAdcOrchestratorJobExtension/CitrixAdcStore.cs index be7a298..5955c14 100644 --- a/CitrixAdcOrchestratorJobExtension/CitrixAdcStore.cs +++ b/CitrixAdcOrchestratorJobExtension/CitrixAdcStore.cs @@ -31,11 +31,8 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.OpenSsl; using Org.BouncyCastle.Pkcs; -using Org.BouncyCastle.Security; -using Org.BouncyCastle.Crypto.Paddings; namespace Keyfactor.Extensions.Orchestrator.CitricAdc { @@ -626,7 +623,7 @@ private systemfile UploadFile(string alias, string contents, bool isCertificate, systemfile file = new systemfile() { - filecontent = contents, + filecontent = Convert.ToBase64String(Encoding.ASCII.GetBytes(contents)), filelocation = StorePath, filename = fileName }; @@ -643,7 +640,7 @@ private systemfile UploadFile(string alias, string contents, bool isCertificate, if ((ne.HResult.Equals(0x80131500) || ne.Message.Contains("File already exists"))) { Logger.LogTrace($"File {file.filename} already exists. Trying again with new name."); - UploadFile(alias, contents, isCertificate, fileNameSuffix + 1); + file = UploadFile(alias, contents, isCertificate, fileNameSuffix + 1); } else { @@ -737,7 +734,7 @@ private X509Certificate2 ReadX509Certificate(string certString) } // ReSharper disable once PossibleIntendedRethrow - throw e; + throw; } return x; diff --git a/CitrixAdcOrchestratorJobExtension/Inventory.cs b/CitrixAdcOrchestratorJobExtension/Inventory.cs index fe72361..e328ac9 100644 --- a/CitrixAdcOrchestratorJobExtension/Inventory.cs +++ b/CitrixAdcOrchestratorJobExtension/Inventory.cs @@ -22,7 +22,6 @@ using Keyfactor.Orchestrators.Extensions.Interfaces; using com.citrix.netscaler.nitro.resource.config.ssl; -using static Org.BouncyCastle.Math.EC.ECCurve; namespace Keyfactor.Extensions.Orchestrator.CitricAdc { diff --git a/CitrixAdcOrchestratorJobExtension/Keyfactor.Extensions.Orchestrator.CitricAdc.csproj b/CitrixAdcOrchestratorJobExtension/Keyfactor.Extensions.Orchestrator.CitricAdc.csproj index ab70848..ff462bf 100644 --- a/CitrixAdcOrchestratorJobExtension/Keyfactor.Extensions.Orchestrator.CitricAdc.csproj +++ b/CitrixAdcOrchestratorJobExtension/Keyfactor.Extensions.Orchestrator.CitricAdc.csproj @@ -1,7 +1,10 @@ - net6.0 + true + net6.0 + true + disable diff --git a/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.dll b/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.dll index 3b40a2b..17eb052 100644 Binary files a/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.dll and b/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.dll differ diff --git a/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.exe b/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.exe index 317d584..44c357c 100644 Binary files a/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.exe and b/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.exe differ diff --git a/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.pdb b/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.pdb index 249b66f..cd0d570 100644 Binary files a/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.pdb and b/CitrixAdcTestConsole/bin/Debug/net6.0/CitrixAdcTestConsole.pdb differ diff --git a/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.dll b/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.dll index 5ca05c1..d0c7dda 100644 Binary files a/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.dll and b/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.dll differ diff --git a/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.pdb b/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.pdb index d8826ce..10325c5 100644 Binary files a/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.pdb and b/CitrixAdcTestConsole/bin/Debug/net6.0/Keyfactor.Extensions.Orchestrator.CitricAdc.pdb differ