Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mregen committed Nov 28, 2024
1 parent a414d18 commit 83e2bc2
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Libraries/Opc.Ua.Configuration/ApplicationInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ private static async Task<bool> ApproveMessageAsync(string message, bool silent)
return false;
}
}
#endregion
#endregion

#region Private Fields
private string m_applicationName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
namespace System.Security.Cryptography.X509Certificates
{
/// <summary>
///
/// A helper to support the .NET 9 certificate loader primitives on older .NET versions.
/// </summary>
public static class X509CertificateLoader
{
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Opc.Ua.Server/Configuration/TrustList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ private ServiceResult AddCertificate(
result = StatusCodes.BadCertificateInvalid;
}

var storeIdentifier = isTrustedCertificate? m_trustedStore : m_issuerStore;
var storeIdentifier = isTrustedCertificate ? m_trustedStore : m_issuerStore;
ICertificateStore store = storeIdentifier.OpenStore();
try
{
Expand Down
64 changes: 32 additions & 32 deletions Stack/Opc.Ua.Core/Security/Certificates/CertificateFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,39 +433,39 @@ public static X509Certificate2 CreateCertificateWithPEMPrivateKey(
return X509Utils.CreateCertificateFromPKCS12(pfxData, passcode);
}
#endif
#endregion

#region Internal Methods
/// <summary>
/// Creates a self-signed, signed or CA certificate.
/// </summary>
/// <param name="applicationUri">The application uri (created if not specified).</param>
/// <param name="applicationName">Name of the application (optional if subjectName is specified).</param>
/// <param name="subjectName">The subject used to create the certificate (optional if applicationName is specified).</param>
/// <param name="domainNames">The domain names that can be used to access the server machine (defaults to local computer name if not specified).</param>
/// <param name="keySize">Size of the key (1024, 2048 or 4096).</param>
/// <param name="startTime">The start time.</param>
/// <param name="lifetimeInMonths">The lifetime of the key in months.</param>
/// <param name="hashSizeInBits">The hash size in bits.</param>
/// <param name="isCA">if set to <c>true</c> then a CA certificate is created.</param>
/// <param name="issuerCAKeyCert">The CA cert with the CA private key.</param>
/// <param name="publicKey">The public key if no new keypair is created.</param>
/// <param name="pathLengthConstraint">The path length constraint for CA certs.</param>
/// <returns>The certificate with a private key.</returns>
[Obsolete("Use the new CreateCertificate methods with CertificateBuilder.")]
#endregion

#region Internal Methods
/// <summary>
/// Creates a self-signed, signed or CA certificate.
/// </summary>
/// <param name="applicationUri">The application uri (created if not specified).</param>
/// <param name="applicationName">Name of the application (optional if subjectName is specified).</param>
/// <param name="subjectName">The subject used to create the certificate (optional if applicationName is specified).</param>
/// <param name="domainNames">The domain names that can be used to access the server machine (defaults to local computer name if not specified).</param>
/// <param name="keySize">Size of the key (1024, 2048 or 4096).</param>
/// <param name="startTime">The start time.</param>
/// <param name="lifetimeInMonths">The lifetime of the key in months.</param>
/// <param name="hashSizeInBits">The hash size in bits.</param>
/// <param name="isCA">if set to <c>true</c> then a CA certificate is created.</param>
/// <param name="issuerCAKeyCert">The CA cert with the CA private key.</param>
/// <param name="publicKey">The public key if no new keypair is created.</param>
/// <param name="pathLengthConstraint">The path length constraint for CA certs.</param>
/// <returns>The certificate with a private key.</returns>
[Obsolete("Use the new CreateCertificate methods with CertificateBuilder.")]
internal static X509Certificate2 CreateCertificate(
string applicationUri,
string applicationName,
string subjectName,
IList<String> domainNames,
ushort keySize,
DateTime startTime,
ushort lifetimeInMonths,
ushort hashSizeInBits,
bool isCA = false,
X509Certificate2 issuerCAKeyCert = null,
byte[] publicKey = null,
int pathLengthConstraint = 0)
string applicationUri,
string applicationName,
string subjectName,
IList<String> domainNames,
ushort keySize,
DateTime startTime,
ushort lifetimeInMonths,
ushort hashSizeInBits,
bool isCA = false,
X509Certificate2 issuerCAKeyCert = null,
byte[] publicKey = null,
int pathLengthConstraint = 0)
{
ICertificateBuilder builder = null;
if (isCA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ public void ValidateDomains(X509Certificate2 serverCertificate, ConfiguredEndpoi
}
}
}
#endregion
#endregion

#region Private Methods
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ public Task<bool> DeleteCRL(X509CRL crl)

return Task.FromResult(false);
}
#endregion
#endregion

#region Private Methods
/// <summary>
Expand Down Expand Up @@ -1014,7 +1014,7 @@ private FileInfo WriteFile(byte[] data, string fileName, bool includePrivateKey,

return fileInfo;
}
#endregion
#endregion

#region Private Class
private class Entry
Expand Down

0 comments on commit 83e2bc2

Please sign in to comment.