From d133ec11590d649a8bcaf4bbb26c68072b4ac59b Mon Sep 17 00:00:00 2001 From: romanett Date: Wed, 8 Jan 2025 13:20:57 +0100 Subject: [PATCH] Add SetHiResClockDisabled & fix Rejected Store Creation in ApplicationConfigurationBuilder (#2909) Add the method SetHiResClockDisabled to IApplicationConfigurationBuilder Fix the type of RejectedStore Created by the Builder to: CertificateStoreIdentifier --- .../ApplicationConfigurationBuilder.cs | 10 ++++++++-- .../IApplicationConfigurationBuilder.cs | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Libraries/Opc.Ua.Configuration/ApplicationConfigurationBuilder.cs b/Libraries/Opc.Ua.Configuration/ApplicationConfigurationBuilder.cs index 015d886d3..4ec122491 100644 --- a/Libraries/Opc.Ua.Configuration/ApplicationConfigurationBuilder.cs +++ b/Libraries/Opc.Ua.Configuration/ApplicationConfigurationBuilder.cs @@ -66,6 +66,12 @@ public ApplicationConfigurationBuilder(ApplicationInstance applicationInstance) #region Public Methods /// + public IApplicationConfigurationBuilderGlobalConfiguration SetHiResClockDisabled(bool disableHiResClock) + { + ApplicationConfiguration.DisableHiResClock = disableHiResClock; + return this; + } + /// public IApplicationConfigurationBuilderClientSelected AsClient() { switch (ApplicationInstance.ApplicationType) @@ -137,7 +143,7 @@ public IApplicationConfigurationBuilderSecurityOptions AddSecurityConfiguration( StorePath = DefaultCertificateStorePath(TrustlistType.IssuerUser, pkiRoot) }, // rejected store - RejectedCertificateStore = new CertificateTrustList() { + RejectedCertificateStore = new CertificateStoreIdentifier() { StoreType = rejectedRootType, StorePath = DefaultCertificateStorePath(TrustlistType.Rejected, rejectedRoot) }, @@ -178,7 +184,7 @@ public IApplicationConfigurationBuilderSecurityOptionStores AddSecurityConfigura StorePath = DefaultCertificateStorePath(TrustlistType.Issuer, issuerRoot) }, // rejected store - RejectedCertificateStore = new CertificateTrustList() { + RejectedCertificateStore = new CertificateStoreIdentifier() { StoreType = rejectedRootType, StorePath = DefaultCertificateStorePath(TrustlistType.Rejected, rejectedRoot) }, diff --git a/Libraries/Opc.Ua.Configuration/IApplicationConfigurationBuilder.cs b/Libraries/Opc.Ua.Configuration/IApplicationConfigurationBuilder.cs index 4d89e47a6..d8825b8a9 100644 --- a/Libraries/Opc.Ua.Configuration/IApplicationConfigurationBuilder.cs +++ b/Libraries/Opc.Ua.Configuration/IApplicationConfigurationBuilder.cs @@ -450,6 +450,7 @@ string issuerRoot /// Add security options to the configuration. /// public interface IApplicationConfigurationBuilderSecurityOptions : + IApplicationConfigurationBuilderGlobalConfiguration, IApplicationConfigurationBuilderTraceConfiguration, IApplicationConfigurationBuilderExtension, IApplicationConfigurationBuilderCreate @@ -542,6 +543,20 @@ public interface IApplicationConfigurationBuilderExtension : IApplicationConfigurationBuilderExtension AddExtension(XmlQualifiedName elementName, object value); } + /// + /// Add some global configuration settings. + /// + public interface IApplicationConfigurationBuilderGlobalConfiguration : + IApplicationConfigurationBuilderCreate, + IApplicationConfigurationBuilderTraceConfiguration + { + /// + /// Set the high resolution clock to disabled or enabled. + /// + /// true if high resolution clock is disabled; otherwise, false. + IApplicationConfigurationBuilderGlobalConfiguration SetHiResClockDisabled(bool hiResClockDisabled); + } + /// /// Add the trace configuration. ///