Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Oct 31, 2024
1 parent 2be2914 commit f58b03c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 22 deletions.
8 changes: 4 additions & 4 deletions src/CertificateManager/CertificateUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,22 @@ public string CreateIssuerOrSubject(DistinguishedName distinguishedName)

if (!string.IsNullOrEmpty(distinguishedName.Organisation))
{
sb.Append($", O={ distinguishedName.Organisation}");
sb.Append($", O={distinguishedName.Organisation}");
}

if (!string.IsNullOrEmpty(distinguishedName.OrganisationUnit))
{
sb.Append($", OU={ distinguishedName.OrganisationUnit}");
sb.Append($", OU={distinguishedName.OrganisationUnit}");
}

if (!string.IsNullOrEmpty(distinguishedName.Locality))
{
sb.Append($", L={ distinguishedName.Locality}");
sb.Append($", L={distinguishedName.Locality}");
}

if (!string.IsNullOrEmpty(distinguishedName.StateProvince))
{
sb.Append($", ST={ distinguishedName.StateProvince}");
sb.Append($", ST={distinguishedName.StateProvince}");
}

return sb.ToString();
Expand Down
6 changes: 1 addition & 5 deletions src/CertificateManager/PemTypes.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 CertificateManager
namespace CertificateManager
{
public static class PemTypes
{
Expand Down
4 changes: 2 additions & 2 deletions src/CertificateManagerTests/BuildChainUtil.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Security.Cryptography;
using CertificateManager;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using CertificateManager;

namespace CertificateManagerTests
{
Expand Down
1 change: 0 additions & 1 deletion src/CertificateManagerTests/RsaKeySizeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Xunit;

namespace CertificateManagerTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Microsoft.Extensions.DependencyInjection;
using CertificateManager;
using CertificateManager.Models;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using CertificateManager;
using System.Security.Cryptography;
using CertificateManager.Models;
using System.Security.Cryptography.X509Certificates;

namespace CreateChainedCertsConsoleDemo
{
Expand Down
9 changes: 4 additions & 5 deletions src/CreateChainedCertsConsoleDemo/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using CertificateManager;
using CertificateManager;
using CertificateManager.Models;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.IO;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;

namespace CreateChainedCertsConsoleDemo
{
Expand Down
1 change: 0 additions & 1 deletion src/IoTHubVerifyCertificate/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CertificateManager;
using CertificateManager.Models;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.IO;
Expand Down

0 comments on commit f58b03c

Please sign in to comment.