From d85db1b0d4bd9bba552ec716a21ec3d67baf9e0b Mon Sep 17 00:00:00 2001 From: Matt Richardson Date: Fri, 2 Jun 2017 13:24:16 +1000 Subject: [PATCH 1/3] Update to latest Octopus.Shared --- .../Octopus.Manager.Tentacle.csproj | 4 ++-- source/Octopus.Manager.Tentacle/packages.config | 2 +- source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj | 6 +++--- source/Octopus.Tentacle.Tests/packages.config | 2 +- source/Octopus.Tentacle/Octopus.Tentacle.csproj | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/Octopus.Manager.Tentacle/Octopus.Manager.Tentacle.csproj b/source/Octopus.Manager.Tentacle/Octopus.Manager.Tentacle.csproj index 83989ef79..72a04012e 100644 --- a/source/Octopus.Manager.Tentacle/Octopus.Manager.Tentacle.csproj +++ b/source/Octopus.Manager.Tentacle/Octopus.Manager.Tentacle.csproj @@ -131,8 +131,8 @@ ..\packages\Octopus.Manager.Core.3.13.9-tentsplit0048\lib\Octopus.Manager.Core.dll - - ..\packages\Octopus.Shared.3.13.9-tentsplit0048\lib\Octopus.Shared.dll + + ..\packages\Octopus.Shared.3.14.1-enh-sha256-ui0002\lib\Octopus.Shared.dll ..\packages\Octopus.Time.1.0.8\lib\netstandard1.0\Octopus.Time.dll diff --git a/source/Octopus.Manager.Tentacle/packages.config b/source/Octopus.Manager.Tentacle/packages.config index de647108f..ba8f1a068 100644 --- a/source/Octopus.Manager.Tentacle/packages.config +++ b/source/Octopus.Manager.Tentacle/packages.config @@ -19,7 +19,7 @@ - + diff --git a/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj b/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj index c77e51673..1b5d7667e 100644 --- a/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj +++ b/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj @@ -106,7 +106,7 @@ ..\packages\NuGet.Versioning.3.6.0-octopus-58455\lib\net45\NuGet.Versioning.dll True - + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll True @@ -127,8 +127,8 @@ ..\packages\Octopus.Diagnostics.1.0.11\lib\netstandard1.0\Octopus.Diagnostics.dll True - - ..\packages\Octopus.Shared.3.13.9-tentsplit0048\lib\Octopus.Shared.dll + + ..\packages\Octopus.Shared.3.14.1-enh-sha256-ui0002\lib\Octopus.Shared.dll ..\packages\Octopus.Time.1.0.8\lib\netstandard1.0\Octopus.Time.dll diff --git a/source/Octopus.Tentacle.Tests/packages.config b/source/Octopus.Tentacle.Tests/packages.config index da756abf5..c7ab581ce 100644 --- a/source/Octopus.Tentacle.Tests/packages.config +++ b/source/Octopus.Tentacle.Tests/packages.config @@ -42,7 +42,7 @@ - + diff --git a/source/Octopus.Tentacle/Octopus.Tentacle.csproj b/source/Octopus.Tentacle/Octopus.Tentacle.csproj index d37fa60e8..ddd45d660 100644 --- a/source/Octopus.Tentacle/Octopus.Tentacle.csproj +++ b/source/Octopus.Tentacle/Octopus.Tentacle.csproj @@ -16,7 +16,7 @@ - + From be0ebc3a581ee3a6aa6725c649f6747324b70692 Mon Sep 17 00:00:00 2001 From: Matt Richardson Date: Fri, 2 Jun 2017 13:24:30 +1000 Subject: [PATCH 2/3] Set cert signature algorithm variable --- source/Octopus.Tentacle/Commands/RunAgentCommand.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Octopus.Tentacle/Commands/RunAgentCommand.cs b/source/Octopus.Tentacle/Commands/RunAgentCommand.cs index 7fdbb6b01..553ff0f82 100644 --- a/source/Octopus.Tentacle/Commands/RunAgentCommand.cs +++ b/source/Octopus.Tentacle/Commands/RunAgentCommand.cs @@ -74,6 +74,7 @@ protected override void Start() Environment.SetEnvironmentVariable(EnvironmentVariables.TentacleProgramDirectoryPath, Path.GetDirectoryName(exePath)); Environment.SetEnvironmentVariable(EnvironmentVariables.AgentProgramDirectoryPath, Path.GetDirectoryName(exePath)); Environment.SetEnvironmentVariable(EnvironmentVariables.TentacleVersion, appVersion.ToString()); + Environment.SetEnvironmentVariable(EnvironmentVariables.TentacleCertificateSignatureAlgorithm, configuration.TentacleCertificate.SignatureAlgorithm.FriendlyName); Environment.SetEnvironmentVariable(EnvironmentVariables.TentacleProxyUsername, proxyConfiguration.CustomProxyUsername); Environment.SetEnvironmentVariable(EnvironmentVariables.TentacleProxyPassword, proxyConfiguration.CustomProxyPassword); Environment.SetEnvironmentVariable(EnvironmentVariables.TentacleProxyHost, proxyConfiguration.CustomProxyHost); From 58218535dd8cdd3cfaf40454a1ef83e878f9697b Mon Sep 17 00:00:00 2001 From: Matt Richardson Date: Fri, 2 Jun 2017 13:33:04 +1000 Subject: [PATCH 3/3] Fix test --- .../Commands/RunAgentCommandFixture.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Octopus.Tentacle.Tests/Commands/RunAgentCommandFixture.cs b/source/Octopus.Tentacle.Tests/Commands/RunAgentCommandFixture.cs index 3173dbad6..9ab7c7406 100644 --- a/source/Octopus.Tentacle.Tests/Commands/RunAgentCommandFixture.cs +++ b/source/Octopus.Tentacle.Tests/Commands/RunAgentCommandFixture.cs @@ -1,8 +1,8 @@ -using System.Security.Cryptography.X509Certificates; using NSubstitute; using NUnit.Framework; using Octopus.Diagnostics; using Octopus.Shared.Configuration; +using Octopus.Shared.Security; using Octopus.Shared.Versioning; using Octopus.Tentacle.Commands; using Octopus.Tentacle.Communications; @@ -27,7 +27,8 @@ public override void SetUp() halibut = Substitute.For(); tentacleConfiguration = Substitute.For(); - tentacleConfiguration.TentacleCertificate.Returns(new X509Certificate2()); + var certificate = new CertificateGenerator().GenerateNew("cn=Test.Cert.For.Octopus.Tests"); + tentacleConfiguration.TentacleCertificate.Returns(certificate); home = Substitute.For(); sleep = Substitute.For(); Command = new RunAgentCommand(