Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
webprofusion-chrisc committed Nov 2, 2024
1 parent e979dc7 commit efc01de
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 21 deletions.
2 changes: 0 additions & 2 deletions src/Certify.CLI/CertifyCLI,StoredCredentials.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Certify.Models;
using Certify.Models.Config;
using Newtonsoft.Json;

Expand Down
2 changes: 1 addition & 1 deletion src/Certify.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private static async Task<int> Main(string[] args)
{
await p.UpdateStoredCredential(args);
}

if (command == "credential" && args.Contains("list"))
{
await p.ListStoredCredentials(args);
Expand Down
2 changes: 1 addition & 1 deletion src/Certify.Client/ManagementServerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public async Task ConnectAsync()
};

opts.UseStatefulReconnect = true;

})
.WithAutomaticReconnect()
.AddMessagePackProtocol()
Expand Down
2 changes: 1 addition & 1 deletion src/Certify.Core/Management/BindingDeploymentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public async Task<List<ActionStep>> StoreAndDeploy(IBindingDeploymentTarget depl

if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
actions.Add(new ActionStep { Title = "Certificate Store and Deploy Skipped", Category = "CertificateStorage", Description = "Platform not supported for certificate store, skipping"});
actions.Add(new ActionStep { Title = "Certificate Store and Deploy Skipped", Category = "CertificateStorage", Description = "Platform not supported for certificate store, skipping" });
return actions;
}

Expand Down
6 changes: 1 addition & 5 deletions src/Certify.Models/API/VersionInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Certify.Models.API
namespace Certify.Models.API
{
public class VersionInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Certify.Client;
using Certify.Models.Providers;
using Certify.Server.Api.Public.Services;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Certify.Server.Api.Public.Controllers
Expand Down
2 changes: 1 addition & 1 deletion src/Certify.Server/Certify.Server.Api.Public/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void ConfigureServices(IServiceCollection services)
.AddSignalR(opt => opt.MaximumReceiveMessageSize = null)

.AddMessagePackProtocol();

services.AddResponseCompression(opts =>
{
opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
Expand Down
4 changes: 2 additions & 2 deletions src/Certify.Shared/Management/CertificateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public static async Task<X509Certificate2> StoreCertificate(
{
var pfxBytes = File.ReadAllBytes(pfxFile);
certificate = X509CertificateLoader.LoadPkcs12(pfxBytes, pwd, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable);

}
catch (CryptographicException)
{
Expand All @@ -389,7 +389,7 @@ public static async Task<X509Certificate2> StoreCertificate(
pwd = "";
}
#else
try
try
{
certificate = new X509Certificate2(pfxFile, pwd, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Certify.SourceGenerators/PublicAPISourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void Initialize(GeneratorInitializationContext context)
// then add a watch on
if (!Debugger.IsAttached)
{
// Debugger.Launch();
// Debugger.Launch();
}
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public async Task TestRunPostTasksWithTaskFailTrigger()

//ensure 3rd task runs because task 1 failed
var expectedFailureTaskStepKey = managedCertificate.PostRequestTasks.First(t => t.TaskName == "Post Task 3 (on task fail)").Id;

var skippedStep = result
.Actions.Find(s => s.Key == "PostRequestTasks")
.Substeps.Find(s => s.Key == expectedFailureTaskStepKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void TestDemoDataGeneration()
[TestMethod, Description("Source gen test")]
public void TestSourceGen()
{
var typeName = SourceGenerators.ApiMethods.GetFormattedTypeName(typeof(string));
var typeName = SourceGenerators.ApiMethods.GetFormattedTypeName(typeof(string));

Assert.AreEqual("System.String", typeName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var renewalDueCheck
Assert.AreEqual(renewalDueCheck.HoldHrs, 48, "Hold should be for 48 Hrs");

managedCertificate.DateLastRenewalAttempt = DateTimeOffset.UtcNow.AddHours(-49);

// perform check as if last attempt was over 48rs ago, item should require renewal and not be on hold
renewalDueCheck = ManagedCertificate.CalculateNextRenewalAttempt(managedCertificate, renewalPeriodDays, renewalIntervalMode, true);

Expand Down
1 change: 0 additions & 1 deletion src/Certify.UI.Shared/Windows/EditAccountDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Windows.Data;
using System.Windows.Input;
using Certify.Models;
using Org.BouncyCastle.Asn1.Pkcs;
using Org.BouncyCastle.Crypto.EC;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Security;
Expand Down

0 comments on commit efc01de

Please sign in to comment.