Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 1.05.04-json-encode…
Browse files Browse the repository at this point in the history
…r-fixes
  • Loading branch information
randy-armstrong committed Feb 26, 2024
2 parents e141b38 + a64c5a9 commit d91973a
Show file tree
Hide file tree
Showing 256 changed files with 36,772 additions and 51,746 deletions.
9 changes: 0 additions & 9 deletions .azurepipelines/signlistDebug.txt
@@ -1,19 +1,15 @@
Stack\Opc.Ua.Core\bin\Debug\netstandard2.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\netstandard2.1\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\net48\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\net6.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\net8.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\netstandard2.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\netcoreapp3.1\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net48\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net6.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net8.0\Opc.Ua.Bindings.Https.dll
Libraries\Opc.Ua.Server\bin\Debug\netstandard2.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\netstandard2.1\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net48\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net6.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net8.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Client\bin\Debug\netstandard2.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\netstandard2.1\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\net48\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\net6.0\Opc.Ua.Client.dll
Expand All @@ -22,27 +18,22 @@ Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\netstandard2.1\Opc.Ua.Client.Comp
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net48\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net6.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net8.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Configuration\bin\Debug\netstandard2.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\netstandard2.1\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net48\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net6.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net8.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\netstandard2.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\netstandard2.1\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net48\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net6.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net8.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\netstandard2.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\netstandard2.1\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net48\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net6.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net8.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\netstandard2.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\netstandard2.1\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net48\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net6.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net8.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.PubSub\bin\Debug\netstandard2.0\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\netstandard2.1\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\net48\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\net6.0\Opc.Ua.PubSub.dll
Expand Down
9 changes: 0 additions & 9 deletions .azurepipelines/signlistRelease.txt
@@ -1,19 +1,15 @@
Stack\Opc.Ua.Core\bin\Release\netstandard2.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\netstandard2.1\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\net48\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\net6.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\net8.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\netstandard2.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\netcoreapp3.1\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net48\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net6.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net8.0\Opc.Ua.Bindings.Https.dll
Libraries\Opc.Ua.Server\bin\Release\netstandard2.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\netstandard2.1\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net48\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net6.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net8.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Client\bin\Release\netstandard2.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\netstandard2.1\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\net48\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\net6.0\Opc.Ua.Client.dll
Expand All @@ -22,27 +18,22 @@ Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\netstandard2.1\Opc.Ua.Client.Co
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net48\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net6.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net8.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Configuration\bin\Release\netstandard2.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\netstandard2.1\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net48\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net6.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net8.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\netstandard2.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\netstandard2.1\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net48\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net6.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net8.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\netstandard2.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\netstandard2.1\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net48\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net6.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net8.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\netstandard2.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\netstandard2.1\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net48\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net6.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net8.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.PubSub\bin\Release\netstandard2.0\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\netstandard2.1\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\net48\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\net6.0\Opc.Ua.PubSub.dll
Expand Down
6 changes: 6 additions & 0 deletions .editorconfig
Expand Up @@ -327,9 +327,15 @@ dotnet_diagnostic.CA1507.severity =
# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = none

# CA1711: Identifiers should not have incorrect suffix
dotnet_diagnostic.CA1711.severity = silent

# IDE1005: Simplify delegate invocation
dotnet_diagnostic.IDE1005.severity = warning

# CA1305: Specify IFormatProvider
dotnet_diagnostic.CA1305.severity = warning

# exclude generated code
[**/Generated/*.cs]
generated_code = true
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/buildandtest.yml
Expand Up @@ -3,7 +3,7 @@ name: Build and Test .NET 8.0
on:
push:
pull_request:
branches: [ master ]
branches: [ master, main ]
paths:
- '**.cs'
- '**.csproj'
Expand All @@ -12,9 +12,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

jobs:
build-and-test:
name: test-${{matrix.os}}-${{matrix.csproj}}
Expand Down Expand Up @@ -68,10 +65,10 @@ jobs:
if: ${{ always() }}

- name: Upload to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
name: codecov-umbrella
#token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
directory: ${{ env.TESTRESULTS }}
env_vars: CSPROJ,OS,DOTNET_VERSION,CONFIGURATION
fail_ci_if_error: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Expand Up @@ -51,7 +51,7 @@ jobs:

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3.1
uses: microsoft/setup-msbuild@v2.0.0


- name: Restore Packages
Expand Down
Expand Up @@ -351,7 +351,7 @@ protected override void UpdateItem(ListViewItem listItem, object item)
}

// look up domains.
IList<string> domains = X509Utils.GetDomainsFromCertficate(certificate);
IList<string> domains = X509Utils.GetDomainsFromCertificate(certificate);

StringBuilder buffer = new StringBuilder();

Expand Down
Expand Up @@ -125,7 +125,7 @@ public bool Match(X509Certificate2 certificate)

if (!String.IsNullOrEmpty(m_domain))
{
IList<string> domains = X509Utils.GetDomainsFromCertficate(certificate);
IList<string> domains = X509Utils.GetDomainsFromCertificate(certificate);

bool found = false;

Expand Down
Expand Up @@ -489,14 +489,14 @@ private string GetValueText(object value)
{
if (array.Rank > 1)
{
int[] lenghts = new int[array.Rank];
int[] lengths = new int[array.Rank];

for (int i = 0; i < array.Rank; ++i)
{
lenghts[i] = array.GetLength(i);
lengths[i] = array.GetLength(i);
}

return Utils.Format("{0}[{1}]", value.GetType().GetElementType().Name, string.Join(",", lenghts));
return Utils.Format("{0}[{1}]", value.GetType().GetElementType().Name, string.Join(",", lengths));
}
else
{
Expand Down
Expand Up @@ -263,7 +263,7 @@ public static bool HandleDomainCheckError(string caption, ServiceResult serviceR
buffer.AppendFormat("Valid From: {0}\r\n", certificate.NotBefore);
buffer.AppendFormat("Valid To: {0}\r\n", certificate.NotAfter);
buffer.AppendFormat("Thumbprint: {0}\r\n\r\n", certificate.Thumbprint);
var domains = X509Utils.GetDomainsFromCertficate(certificate);
var domains = X509Utils.GetDomainsFromCertificate(certificate);
if (domains.Count > 0)
{
bool comma = false;
Expand Down
Expand Up @@ -148,7 +148,7 @@ public async Task<bool> ShowDialog(CertificateIdentifier certificate)
// fill in domains.
buffer = new StringBuilder();

foreach (string domain in X509Utils.GetDomainsFromCertficate(data))
foreach (string domain in X509Utils.GetDomainsFromCertificate(data))
{
if (buffer.Length > 0)
{
Expand Down
Expand Up @@ -329,7 +329,7 @@ private void BuildEndpointDescription()
#endregion

#region Public Interface
public EndpointDescriptionCollection AvailableEnpoints
public EndpointDescriptionCollection AvailableEndpoints
{
get { return m_availableEndpoints; }
}
Expand Down
12 changes: 6 additions & 6 deletions Applications/ClientControls.Net4/UA Client Controls.csproj
Expand Up @@ -73,7 +73,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Browse\AttrbuteListCtrl.Designer.cs">
<Compile Include="Browse\AttributeListCtrl.Designer.cs">
<DependentUpon>AttributeListCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Browse\AttributeListCtrl.cs">
Expand Down Expand Up @@ -112,11 +112,11 @@
<Compile Include="Common\ClientUtils.Designer.cs">
<DependentUpon>ClientUtils.cs</DependentUpon>
</Compile>
<Compile Include="Common\Client\AttrributesListViewCtrl.cs">
<Compile Include="Common\Client\AttributesListViewCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Common\Client\AttrributesListViewCtrl.Designer.cs">
<DependentUpon>AttrributesListViewCtrl.cs</DependentUpon>
<Compile Include="Common\Client\AttributesListViewCtrl.Designer.cs">
<DependentUpon>AttributesListViewCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Common\Client\BrowseNodeCtrl.cs">
<SubType>UserControl</SubType>
Expand Down Expand Up @@ -656,8 +656,8 @@
<DependentUpon>ClientUtils.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Common\Client\AttrributesListViewCtrl.resx">
<DependentUpon>AttrributesListViewCtrl.cs</DependentUpon>
<EmbeddedResource Include="Common\Client\AttributesListViewCtrl.resx">
<DependentUpon>AttributesListViewCtrl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Common\Client\BrowseNodeCtrl.resx">
Expand Down
Expand Up @@ -30,7 +30,7 @@
<StorePath>%LocalApplicationData%/OPC Foundation/pki/trusted</StorePath>
</TrustedPeerCertificates>

<!-- The directory used to store invalid certficates for later review by the administrator. -->
<!-- The directory used to store invalid certificates for later review by the administrator. -->
<RejectedCertificateStore>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/rejected</StorePath>
Expand All @@ -40,7 +40,7 @@
for easy debugging purposes ONLY and turned off for production deployments! -->
<AutoAcceptUntrustedCertificates>false</AutoAcceptUntrustedCertificates>

<!-- WARNING: SHA1 signed certficates are by default rejected and should be phased out.
<!-- WARNING: SHA1 signed certificates are by default rejected and should be phased out.
only nano and embedded profiles are allowed to use sha1 signed certificates. -->
<RejectSHA1SignedCertificates>true</RejectSHA1SignedCertificates>
<RejectUnknownRevocationStatus>true</RejectUnknownRevocationStatus>
Expand Down
3 changes: 2 additions & 1 deletion Applications/ConsoleReferenceClient/UAClient.cs
Expand Up @@ -190,7 +190,8 @@ public async Task<bool> ConnectAsync(string serverUrl, bool useSecurity = true,
m_configuration.ApplicationName,
SessionLifeTime,
UserIdentity,
null
null,
ct
).ConfigureAwait(false);

// Assign the created session
Expand Down
2 changes: 1 addition & 1 deletion Applications/ConsoleReferencePublisher/README.md
Expand Up @@ -86,7 +86,7 @@ After this step the Publisher will publish data as configured.

## Publisher Configuration

The Publisher configuration is a subset of the [PubSub Configuration](../../Docs/PubSub.md#pubsub-configuration). A functional *Publisher* application needs to have a configuration (*PubSubConfgurationDataType* instance) that contains a list of published data sets (*PublishedDataSetDataType* instances) and at least one connection (*PubSubConnectionDataType* instance) with at least one writer group configuration (*WriterGroupDataType* instance). The writer group contains at least one data set writer (*DataSetWriterDataType* instance) pointing to a published data set from the current configuration.
The Publisher configuration is a subset of the [PubSub Configuration](../../Docs/PubSub.md#pubsub-configuration). A functional *Publisher* application needs to have a configuration (*PubSubConfigurationDataType* instance) that contains a list of published data sets (*PublishedDataSetDataType* instances) and at least one connection (*PubSubConnectionDataType* instance) with at least one writer group configuration (*WriterGroupDataType* instance). The writer group contains at least one data set writer (*DataSetWriterDataType* instance) pointing to a published data set from the current configuration.

The diagram shows the subset of classes involved in an *OPC UA Publisher* configuration.

Expand Down
9 changes: 7 additions & 2 deletions Applications/ConsoleReferenceServer/ConsoleUtils.cs
Expand Up @@ -29,6 +29,7 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -319,14 +320,18 @@ public static class ConsoleUtils
if (logConsole)
{
loggerConfiguration.WriteTo.Console(
restrictedToMinimumLevel: (LogEventLevel)consoleLogLevel
restrictedToMinimumLevel: (LogEventLevel)consoleLogLevel,
formatProvider: CultureInfo.InvariantCulture
);
}
#if DEBUG
else
{
loggerConfiguration
.WriteTo.Debug(restrictedToMinimumLevel: (LogEventLevel)consoleLogLevel);
.WriteTo.Debug(
restrictedToMinimumLevel: (LogEventLevel)consoleLogLevel,
formatProvider: CultureInfo.InvariantCulture
);
}
#endif
LogLevel fileLevel = LogLevel.Information;
Expand Down
Expand Up @@ -30,7 +30,7 @@
<StorePath>./OPC Foundation/pki/trusted</StorePath>
</TrustedPeerCertificates>

<!-- The directory used to store invalid certficates for later review by the administrator. -->
<!-- The directory used to store invalid certificates for later review by the administrator. -->
<RejectedCertificateStore>
<StoreType>Directory</StoreType>
<StorePath>./OPC Foundation/pki/rejected</StorePath>
Expand All @@ -40,7 +40,7 @@
for easy debugging purposes ONLY and turned off for production deployments! -->
<AutoAcceptUntrustedCertificates>false</AutoAcceptUntrustedCertificates>

<!-- WARNING: SHA1 signed certficates are by default rejected and should be phased out.
<!-- WARNING: SHA1 signed certificates are by default rejected and should be phased out.
The setting below to allow them is only required for UACTT (1.02.336.244) which uses SHA-1 signed certs. -->
<RejectSHA1SignedCertificates>false</RejectSHA1SignedCertificates>
<MinimumCertificateKeySize>2048</MinimumCertificateKeySize>
Expand Down
Expand Up @@ -30,7 +30,7 @@
<StorePath>%LocalApplicationData%/OPC Foundation/pki/trusted</StorePath>
</TrustedPeerCertificates>

<!-- The directory used to store invalid certficates for later review by the administrator. -->
<!-- The directory used to store invalid certificates for later review by the administrator. -->
<RejectedCertificateStore>
<StoreType>Directory</StoreType>
<StorePath>%LocalApplicationData%/OPC Foundation/pki/rejected</StorePath>
Expand All @@ -40,7 +40,7 @@
for easy debugging purposes ONLY and turned off for production deployments! -->
<AutoAcceptUntrustedCertificates>false</AutoAcceptUntrustedCertificates>

<!-- WARNING: SHA1 signed certficates are by default rejected and should be phased out.
<!-- WARNING: SHA1 signed certificates are by default rejected and should be phased out.
only nano and embedded profiles are allowed to use sha1 signed certificates. -->
<RejectSHA1SignedCertificates>true</RejectSHA1SignedCertificates>
<RejectUnknownRevocationStatus>true</RejectUnknownRevocationStatus>
Expand Down

0 comments on commit d91973a

Please sign in to comment.