diff --git a/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs b/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs index f407ac294..ad861f80b 100644 --- a/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs +++ b/Libraries/Opc.Ua.Configuration/ApplicationInstance.cs @@ -29,7 +29,6 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.IO; using System.Linq; using System.Net; @@ -601,7 +600,7 @@ private async Task CheckCertificateTypeAsync( if (!DisableCertificateAutoCreation) { certificate = await CreateApplicationInstanceCertificateAsync(configuration, id, - minimumKeySize, lifeTimeInMonths, ct).ConfigureAwait(false); + lifeTimeInMonths, ct).ConfigureAwait(false); } else { @@ -858,14 +857,12 @@ private static async Task CheckDomainsInCertificateAsync( /// /// The configuration. /// The certificate identifier. - /// Size of the key. /// The lifetime in months. /// /// The new certificate private static async Task CreateApplicationInstanceCertificateAsync( ApplicationConfiguration configuration, CertificateIdentifier id, - ushort keySize, ushort lifeTimeInMonths, CancellationToken ct) { @@ -901,7 +898,7 @@ private static async Task CreateApplicationInstanceCertificate id.CertificateType == ObjectTypeIds.RsaSha256ApplicationCertificateType) { id.Certificate = builder - .SetRSAKeySize(keySize) + .SetRSAKeySize(CertificateFactory.DefaultKeySize) .CreateForRSA(); Utils.LogCertificate("Certificate created for RSA.", id.Certificate);