Skip to content

Commit

Permalink
Add SetHiResClockDisabled & fix Rejected Store Creation in Applicatio…
Browse files Browse the repository at this point in the history
…nConfigurationBuilder (#2909)

Add the method SetHiResClockDisabled to IApplicationConfigurationBuilder
Fix the type of RejectedStore Created by the Builder to: CertificateStoreIdentifier
  • Loading branch information
romanett authored and mregen committed Jan 8, 2025
1 parent df881be commit d133ec1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ public ApplicationConfigurationBuilder(ApplicationInstance applicationInstance)

#region Public Methods
/// <inheritdoc/>
public IApplicationConfigurationBuilderGlobalConfiguration SetHiResClockDisabled(bool disableHiResClock)
{
ApplicationConfiguration.DisableHiResClock = disableHiResClock;
return this;
}
/// <inheritdoc/>
public IApplicationConfigurationBuilderClientSelected AsClient()
{
switch (ApplicationInstance.ApplicationType)
Expand Down Expand Up @@ -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)
},
Expand Down Expand Up @@ -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)
},
Expand Down
15 changes: 15 additions & 0 deletions Libraries/Opc.Ua.Configuration/IApplicationConfigurationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ string issuerRoot
/// Add security options to the configuration.
/// </summary>
public interface IApplicationConfigurationBuilderSecurityOptions :
IApplicationConfigurationBuilderGlobalConfiguration,
IApplicationConfigurationBuilderTraceConfiguration,
IApplicationConfigurationBuilderExtension,
IApplicationConfigurationBuilderCreate
Expand Down Expand Up @@ -542,6 +543,20 @@ public interface IApplicationConfigurationBuilderExtension :
IApplicationConfigurationBuilderExtension AddExtension<T>(XmlQualifiedName elementName, object value);
}

/// <summary>
/// Add some global configuration settings.
/// </summary>
public interface IApplicationConfigurationBuilderGlobalConfiguration :
IApplicationConfigurationBuilderCreate,
IApplicationConfigurationBuilderTraceConfiguration
{
/// <summary>
/// Set the high resolution clock to disabled or enabled.
/// </summary>
/// <param name="hiResClockDisabled"><value><c>true</c> if high resolution clock is disabled; otherwise, <c>false</c>.</value></param>
IApplicationConfigurationBuilderGlobalConfiguration SetHiResClockDisabled(bool hiResClockDisabled);
}

/// <summary>
/// Add the trace configuration.
/// </summary>
Expand Down

0 comments on commit d133ec1

Please sign in to comment.