diff options
author | Wouter Tinus <wouter.tinus@gmail.com> | 2020-04-22 20:02:50 +0200 |
---|---|---|
committer | Wouter Tinus <wouter.tinus@gmail.com> | 2020-04-22 20:02:50 +0200 |
commit | 0f98d4581cd1d269d435658c1125e7d4bcc94bd3 (patch) | |
tree | 238c8ca48954c2eb22f2777ced6b52b11d3688f7 /src | |
parent | 4f4bfb53d185dbf11fbc7836f2bbddcb5c9fe2bd (diff) | |
download | letsencrypt-win-simple-0f98d4581cd1d269d435658c1125e7d4bcc94bd3.zip letsencrypt-win-simple-0f98d4581cd1d269d435658c1125e7d4bcc94bd3.tar.gz letsencrypt-win-simple-0f98d4581cd1d269d435658c1125e7d4bcc94bd3.tar.bz2 |
some code style messages
Diffstat (limited to 'src')
5 files changed, 8 insertions, 23 deletions
diff --git a/src/main.lib/Plugins/InstallationPlugins/IISWeb/IISWebOptionsFactory.cs b/src/main.lib/Plugins/InstallationPlugins/IISWeb/IISWebOptionsFactory.cs index 5ac813b..4bb9431 100644 --- a/src/main.lib/Plugins/InstallationPlugins/IISWeb/IISWebOptionsFactory.cs +++ b/src/main.lib/Plugins/InstallationPlugins/IISWeb/IISWebOptionsFactory.cs @@ -32,14 +32,9 @@ namespace PKISharp.WACS.Plugins.InstallationPlugins var ask = true; if (target.IIS) { - if (runLevel.HasFlag(RunLevel.Advanced)) - { - ask = await inputService.PromptYesNo("Use different site for installation?", false); - } - else - { - ask = false; - } + ask = runLevel.HasFlag(RunLevel.Advanced) ? + await inputService.PromptYesNo("Use different site for installation?", false) : + false; } if (ask) { diff --git a/src/main.lib/Plugins/StorePlugins/CentralSsl/CentralSsl.cs b/src/main.lib/Plugins/StorePlugins/CentralSsl/CentralSsl.cs index fdd8782..45b0282 100644 --- a/src/main.lib/Plugins/StorePlugins/CentralSsl/CentralSsl.cs +++ b/src/main.lib/Plugins/StorePlugins/CentralSsl/CentralSsl.cs @@ -51,8 +51,10 @@ namespace PKISharp.WACS.Plugins.StorePlugins _log.Information("Saving certificate to Central SSL location {dest}", dest); try { - var collection = new X509Certificate2Collection(); - collection.Add(input.Certificate); + var collection = new X509Certificate2Collection + { + input.Certificate + }; collection.AddRange(input.Chain.ToArray()); File.WriteAllBytes(dest, collection.Export(X509ContentType.Pfx, _password)); } diff --git a/src/main.lib/Plugins/ValidationPlugins/Tls/SelfHosting/SelfHosting.cs b/src/main.lib/Plugins/ValidationPlugins/Tls/SelfHosting/SelfHosting.cs index 4470890..d43d58b 100644 --- a/src/main.lib/Plugins/ValidationPlugins/Tls/SelfHosting/SelfHosting.cs +++ b/src/main.lib/Plugins/ValidationPlugins/Tls/SelfHosting/SelfHosting.cs @@ -26,7 +26,6 @@ namespace PKISharp.WACS.Plugins.ValidationPlugins.Tls private readonly IUserRoleService _userRoleService; private readonly CancellationTokenSource _tokenSource = new CancellationTokenSource(); - private bool HasListener => _listener != null; private TcpListener Listener { get diff --git a/src/main.lib/RenewalExecutor.cs b/src/main.lib/RenewalExecutor.cs index a4a8eb3..edcad65 100644 --- a/src/main.lib/RenewalExecutor.cs +++ b/src/main.lib/RenewalExecutor.cs @@ -147,7 +147,7 @@ namespace PKISharp.WACS var errors = challenge?.Error; if (errors != null) { - return new RenewResult($"Authorization failed: {errors.ToString()}"); + return new RenewResult($"Authorization failed: {errors}"); } else { diff --git a/src/main.lib/RenewalManager.cs b/src/main.lib/RenewalManager.cs index 0410339..f9f57a2 100644 --- a/src/main.lib/RenewalManager.cs +++ b/src/main.lib/RenewalManager.cs @@ -372,17 +372,6 @@ namespace PKISharp.WACS return await chosen.Invoke(); } - /// <summary> - /// Filter specific renewals by list index - /// </summary> - /// <param name="current"></param> - /// <returns></returns> - private async Task<IEnumerable<Renewal>> FilterRenewalsById(IEnumerable<Renewal> current) - { - var rawInput = await _input.RequestString("Please input the list index of the renewal(s) you'd like to select"); - return await FilterRenewalsById(current, rawInput); - } - private async Task<IEnumerable<Renewal>> FilterRenewalsById(IEnumerable<Renewal> current, string input) { var parts = input.ParseCsv(); |