diff --git a/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs b/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs index d64688c69..6ee1b5497 100644 --- a/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs +++ b/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs @@ -1033,7 +1033,7 @@ private static async Task ApproveMessageAsync(string message, bool silent) return false; } } -#endregion + #endregion #region Private Fields private string m_applicationName; diff --git a/Libraries/Opc.Ua.Security.Certificates/X509Certificate/X509CertificateLoader.cs b/Libraries/Opc.Ua.Security.Certificates/X509Certificate/X509CertificateLoader.cs index 930b606ce..84c163ca3 100644 --- a/Libraries/Opc.Ua.Security.Certificates/X509Certificate/X509CertificateLoader.cs +++ b/Libraries/Opc.Ua.Security.Certificates/X509Certificate/X509CertificateLoader.cs @@ -35,7 +35,7 @@ namespace System.Security.Cryptography.X509Certificates { /// - /// + /// A helper to support the .NET 9 certificate loader primitives on older .NET versions. /// public static class X509CertificateLoader { diff --git a/Libraries/Opc.Ua.Server/Configuration/TrustList.cs b/Libraries/Opc.Ua.Server/Configuration/TrustList.cs index 37a8f99ad..0fae605d8 100644 --- a/Libraries/Opc.Ua.Server/Configuration/TrustList.cs +++ b/Libraries/Opc.Ua.Server/Configuration/TrustList.cs @@ -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 { diff --git a/Stack/Opc.Ua.Core/Security/Certificates/CertificateFactory.cs b/Stack/Opc.Ua.Core/Security/Certificates/CertificateFactory.cs index 2dd9f3c6d..9ae545707 100644 --- a/Stack/Opc.Ua.Core/Security/Certificates/CertificateFactory.cs +++ b/Stack/Opc.Ua.Core/Security/Certificates/CertificateFactory.cs @@ -433,39 +433,39 @@ public static X509Certificate2 CreateCertificateWithPEMPrivateKey( return X509Utils.CreateCertificateFromPKCS12(pfxData, passcode); } #endif -#endregion - - #region Internal Methods - /// - /// Creates a self-signed, signed or CA certificate. - /// - /// The application uri (created if not specified). - /// Name of the application (optional if subjectName is specified). - /// The subject used to create the certificate (optional if applicationName is specified). - /// The domain names that can be used to access the server machine (defaults to local computer name if not specified). - /// Size of the key (1024, 2048 or 4096). - /// The start time. - /// The lifetime of the key in months. - /// The hash size in bits. - /// if set to true then a CA certificate is created. - /// The CA cert with the CA private key. - /// The public key if no new keypair is created. - /// The path length constraint for CA certs. - /// The certificate with a private key. - [Obsolete("Use the new CreateCertificate methods with CertificateBuilder.")] + #endregion + + #region Internal Methods + /// + /// Creates a self-signed, signed or CA certificate. + /// + /// The application uri (created if not specified). + /// Name of the application (optional if subjectName is specified). + /// The subject used to create the certificate (optional if applicationName is specified). + /// The domain names that can be used to access the server machine (defaults to local computer name if not specified). + /// Size of the key (1024, 2048 or 4096). + /// The start time. + /// The lifetime of the key in months. + /// The hash size in bits. + /// if set to true then a CA certificate is created. + /// The CA cert with the CA private key. + /// The public key if no new keypair is created. + /// The path length constraint for CA certs. + /// The certificate with a private key. + [Obsolete("Use the new CreateCertificate methods with CertificateBuilder.")] internal static X509Certificate2 CreateCertificate( - string applicationUri, - string applicationName, - string subjectName, - IList 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 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) diff --git a/Stack/Opc.Ua.Core/Security/Certificates/CertificateValidator.cs b/Stack/Opc.Ua.Core/Security/Certificates/CertificateValidator.cs index ef9b99ffb..2c13adf88 100644 --- a/Stack/Opc.Ua.Core/Security/Certificates/CertificateValidator.cs +++ b/Stack/Opc.Ua.Core/Security/Certificates/CertificateValidator.cs @@ -1529,7 +1529,7 @@ public void ValidateDomains(X509Certificate2 serverCertificate, ConfiguredEndpoi } } } -#endregion + #endregion #region Private Methods /// diff --git a/Stack/Opc.Ua.Core/Security/Certificates/DirectoryCertificateStore.cs b/Stack/Opc.Ua.Core/Security/Certificates/DirectoryCertificateStore.cs index 31940f605..d99147ed3 100644 --- a/Stack/Opc.Ua.Core/Security/Certificates/DirectoryCertificateStore.cs +++ b/Stack/Opc.Ua.Core/Security/Certificates/DirectoryCertificateStore.cs @@ -780,7 +780,7 @@ public Task DeleteCRL(X509CRL crl) return Task.FromResult(false); } -#endregion + #endregion #region Private Methods /// @@ -1014,7 +1014,7 @@ private FileInfo WriteFile(byte[] data, string fileName, bool includePrivateKey, return fileInfo; } -#endregion + #endregion #region Private Class private class Entry