From 370024c615469aa534251fcd990aa472411a447d Mon Sep 17 00:00:00 2001 From: "Bevan, John - Technical Architect" Date: Sun, 4 Aug 2019 09:11:55 +0100 Subject: [PATCH 1/2] #352 - allow ssl flags to remain unchanged --- .../IisInstallerProvider.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs b/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs index d995f74d..c9a9513b 100644 --- a/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs +++ b/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs @@ -45,7 +45,12 @@ public class IisInstallerProvider : IInstallerProvider ParameterType.BOOLEAN, label: "Force", desc: "An optional flag to overwrite an existing binding matching the target criteria"); - public static readonly ParameterDetail CERTIFICATE_FRIENDLY_NAME = new ParameterDetail( + public static readonly ParameterDetail KEEPEXISTINGSSLFLAGS = new ParameterDetail( + nameof(IisInstaller.Force), + ParameterType.BOOLEAN, label: "KeepExistingSslFlags", + desc: "An optional flag to allow an existing binding to keep its SSL Flags as per the original binding"); + + public static readonly ParameterDetail CERTIFICATE_FRIENDLY_NAME = new ParameterDetail( nameof(IisInstaller.CertificateFriendlyName), ParameterType.TEXT, label: "Certificate Friendly Name", desc: "An optional user-facing label to assign the certificate" @@ -59,7 +64,8 @@ public class IisInstallerProvider : IInstallerProvider BINDING_HOST, BINDING_HOST_REQUIRED, FORCE, - CERTIFICATE_FRIENDLY_NAME, + KEEPEXISTINGSSLFLAGS, + CERTIFICATE_FRIENDLY_NAME, }; public IEnumerable DescribeParameters() @@ -89,7 +95,9 @@ public IInstaller GetInstaller(IReadOnlyDictionary initParams) (bool x) => inst.BindingHostRequired = x); initParams.GetParameter(FORCE, (bool x) => inst.Force = x); - initParams.GetParameter(CERTIFICATE_FRIENDLY_NAME, + initParams.GetParameter(KEEPEXISTINGSSLFLAGS, + (bool x) => inst.KeepExistingSslFlags = x); + initParams.GetParameter(CERTIFICATE_FRIENDLY_NAME, (string x) => inst.CertificateFriendlyName = x); return inst; From 64d791add8314ea78192c6c1cf45e49464fb9699 Mon Sep 17 00:00:00 2001 From: "Bevan, John - Technical Architect" Date: Thu, 8 Aug 2019 00:18:49 +0100 Subject: [PATCH 2/2] #352 - allow ssl flags to remain unchanged; stick to standard naming convention --- ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs b/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs index c9a9513b..18d57f40 100644 --- a/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs +++ b/ACMESharp/ACMESharp.Providers.IIS/IisInstallerProvider.cs @@ -45,7 +45,7 @@ public class IisInstallerProvider : IInstallerProvider ParameterType.BOOLEAN, label: "Force", desc: "An optional flag to overwrite an existing binding matching the target criteria"); - public static readonly ParameterDetail KEEPEXISTINGSSLFLAGS = new ParameterDetail( + public static readonly ParameterDetail KEEP_EXISTING_SSL_FLAGS = new ParameterDetail( nameof(IisInstaller.Force), ParameterType.BOOLEAN, label: "KeepExistingSslFlags", desc: "An optional flag to allow an existing binding to keep its SSL Flags as per the original binding"); @@ -64,7 +64,7 @@ public class IisInstallerProvider : IInstallerProvider BINDING_HOST, BINDING_HOST_REQUIRED, FORCE, - KEEPEXISTINGSSLFLAGS, + KEEP_EXISTING_SSL_FLAGS, CERTIFICATE_FRIENDLY_NAME, }; @@ -95,7 +95,7 @@ public IInstaller GetInstaller(IReadOnlyDictionary initParams) (bool x) => inst.BindingHostRequired = x); initParams.GetParameter(FORCE, (bool x) => inst.Force = x); - initParams.GetParameter(KEEPEXISTINGSSLFLAGS, + initParams.GetParameter(KEEP_EXISTING_SSL_FLAGS, (bool x) => inst.KeepExistingSslFlags = x); initParams.GetParameter(CERTIFICATE_FRIENDLY_NAME, (string x) => inst.CertificateFriendlyName = x);