Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check server application Uri with the create session response #2731

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Libraries/Opc.Ua.Client/ReverseConnectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,21 @@
}

/// <summary>
/// Register with the server certificate.
/// Register with the server certificate to extract the application Uri.
/// </summary>
/// <param name="serverCertificate"></param>
/// <param name="endpointUrl"></param>
/// <param name="onConnectionWaiting"></param>
/// <remarks>
/// The first Uri in the subject alternate name field is considered the application Uri.
/// </remarks>
/// <param name="serverCertificate">The server certificate with the application Uri.</param>
/// <param name="endpointUrl">The endpoint Url of the server.</param>
/// <param name="onConnectionWaiting">The connection to use.</param>
public Registration(
X509Certificate2 serverCertificate,
Uri endpointUrl,
EventHandler<ConnectionWaitingEventArgs> onConnectionWaiting) :
this(endpointUrl, onConnectionWaiting)
{
ServerUri = X509Utils.GetApplicationUriFromCertificate(serverCertificate);
ServerUri = X509Utils.GetApplicationUrisFromCertificate(serverCertificate).FirstOrDefault();

Check warning on line 169 in Libraries/Opc.Ua.Client/ReverseConnectManager.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Client/ReverseConnectManager.cs#L169

Added line #L169 was not covered by tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need logic to pick the right one.

}

private Registration(
Expand Down
100 changes: 64 additions & 36 deletions Libraries/Opc.Ua.Client/Session/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,6 @@

if (requireEncryption)
{
ValidateServerCertificateApplicationUri(serverCertificate);
if (checkDomain)
{
m_configuration.CertificateValidator.Validate(serverCertificateChain, m_endpoint);
Expand Down Expand Up @@ -2417,24 +2416,24 @@
if (!successCreateSession)
{
base.CreateSession(
null,
clientDescription,
m_endpoint.Description.Server.ApplicationUri,
m_endpoint.EndpointUrl.ToString(),
sessionName,
clientNonce,
clientCertificateChainData != null ? clientCertificateChainData : clientCertificateData,
sessionTimeout,
(uint)MessageContext.MaxMessageSize,
out sessionId,
out sessionCookie,
out m_sessionTimeout,
out serverNonce,
out serverCertificateData,
out serverEndpoints,
out serverSoftwareCertificates,
out serverSignature,
out m_maxRequestMessageSize);
null,
clientDescription,
m_endpoint.Description.Server.ApplicationUri,
m_endpoint.EndpointUrl.ToString(),
sessionName,
clientNonce,
clientCertificateChainData != null ? clientCertificateChainData : clientCertificateData,
sessionTimeout,
(uint)MessageContext.MaxMessageSize,
out sessionId,
out sessionCookie,
out m_sessionTimeout,
out serverNonce,
out serverCertificateData,
out serverEndpoints,
out serverSoftwareCertificates,
out serverSignature,
out m_maxRequestMessageSize);
}

// save session id.
Expand All @@ -2456,6 +2455,8 @@

ValidateServerEndpoints(serverEndpoints);

ValidateServerCertificateApplicationUri(m_endpoint, serverCertificate);

ValidateServerSignature(serverCertificate, serverSignature, clientCertificateData, clientCertificateChainData, clientNonce);

HandleSignedSoftwareCertificates(serverSoftwareCertificates);
Expand Down Expand Up @@ -5352,26 +5353,53 @@
!String.IsNullOrEmpty(identityPolicy.SecurityPolicyUri);
}
}

/// <summary>
/// Validates the ServerCertificate ApplicationUri to match the ApplicationUri of the Endpoint for an open call (Spec Part 4 5.4.1)
/// Validates the ServerCertificate ApplicationUri to match the ApplicationUri
/// of the Endpoint (Spec Part 4 5.4.1) returned by the CreateSessionResponse.
/// Ensure the endpoint was matched in <see cref="ValidateServerEndpoints"/>
/// with the applicationUri of the server description before the validation.
/// </summary>
private void ValidateServerCertificateApplicationUri(
X509Certificate2 serverCertificate)
private static void ValidateServerCertificateApplicationUri(ConfiguredEndpoint endpoint, X509Certificate2 serverCertificate)
{
var applicationUri = m_endpoint?.Description?.Server?.ApplicationUri;
//check is only neccessary if the ApplicatioUri is specified for the Endpoint
if (string.IsNullOrEmpty(applicationUri))
if (serverCertificate != null)
{
throw ServiceResultException.Create(
StatusCodes.BadSecurityChecksFailed,
"No ApplicationUri is specified for the server in the EndpointDescription.");
}
string certificateApplicationUri = X509Utils.GetApplicationUriFromCertificate(serverCertificate);
if (!string.Equals(certificateApplicationUri, applicationUri, StringComparison.Ordinal))
{
throw ServiceResultException.Create(
StatusCodes.BadSecurityChecksFailed,
"Server did not return a Certificate matching the ApplicationUri specified in the EndpointDescription.");
var applicationUri = endpoint?.Description?.Server?.ApplicationUri;

// check that an ApplicatioUri is specified for the Endpoint
if (string.IsNullOrEmpty(applicationUri))
{
throw ServiceResultException.Create(
StatusCodes.BadCertificateUriInvalid,
"Server did not return an ApplicationUri in the EndpointDescription.");

Check warning on line 5374 in Libraries/Opc.Ua.Client/Session/Session.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Client/Session/Session.cs#L5373-L5374

Added lines #L5373 - L5374 were not covered by tests
}

var certificateApplicationUris = X509Utils.GetApplicationUrisFromCertificate(serverCertificate);
if (certificateApplicationUris.Count == 0)
{
throw ServiceResultException.Create(
StatusCodes.BadCertificateUriInvalid,

Check warning on line 5381 in Libraries/Opc.Ua.Client/Session/Session.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Client/Session/Session.cs#L5379-L5381

Added lines #L5379 - L5381 were not covered by tests
"The Server Certificate ({1}) does not contain an applicationUri.",
serverCertificate.Subject);
}

Check warning on line 5385 in Libraries/Opc.Ua.Client/Session/Session.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Client/Session/Session.cs#L5385

Added line #L5385 was not covered by tests
bool noMatch = true;
foreach (var certificateApplicationUri in certificateApplicationUris)
{

Check warning on line 5388 in Libraries/Opc.Ua.Client/Session/Session.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Client/Session/Session.cs#L5388

Added line #L5388 was not covered by tests
if (string.Equals(certificateApplicationUri, applicationUri, StringComparison.Ordinal))
{
noMatch = false;
break;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not noMatch = certificateApplicationUris .Where(x => String.Equals(certificateApplicationUri, applicationUri, StringComparison.Ordinal).Any()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you never know what Linq is up to...


if (noMatch)
{
throw ServiceResultException.Create(
StatusCodes.BadCertificateUriInvalid,
"The Application in the EndpointDescription ({0}) is not in the Server Certificate ({1}).",

Check warning on line 5400 in Libraries/Opc.Ua.Client/Session/Session.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Client/Session/Session.cs#L5398-L5400

Added lines #L5398 - L5400 were not covered by tests
applicationUri, serverCertificate.Subject);
}
}
}

Expand Down Expand Up @@ -5538,7 +5566,7 @@
}
}

// find the matching description (TBD - check domains against certificate).
// find the matching description (TBD - check domains and application URI against certificate).
bool found = false;

var foundDescription = FindMatchingDescription(serverEndpoints, m_endpoint.Description, true);
Expand Down
3 changes: 2 additions & 1 deletion Libraries/Opc.Ua.Client/Session/SessionAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public async Task OpenAsync(

if (requireEncryption)
{
ValidateServerCertificateApplicationUri(serverCertificate);
if (checkDomain)
{
await m_configuration.CertificateValidator.ValidateAsync(serverCertificateChain, m_endpoint, ct).ConfigureAwait(false);
Expand Down Expand Up @@ -201,6 +200,8 @@ public async Task OpenAsync(

ValidateServerEndpoints(serverEndpoints);

ValidateServerCertificateApplicationUri(m_endpoint, serverCertificate);

ValidateServerSignature(serverCertificate, serverSignature, clientCertificateData, clientCertificateChainData, clientNonce);

HandleSignedSoftwareCertificates(serverSoftwareCertificates);
Expand Down
31 changes: 23 additions & 8 deletions Libraries/Opc.Ua.Configuration/ApplicationInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -671,23 +671,38 @@
}
}

// check uri.
string applicationUri = X509Utils.GetApplicationUriFromCertificate(certificate);
// default application uri
string applicationUri = configuration.ApplicationUri;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a better way to pick the right one.

if (String.IsNullOrEmpty(applicationUri))
// check certificate Uri and find a match
var applicationUris = X509Utils.GetApplicationUrisFromCertificate(certificate);
bool foundMatch = false;
foreach (var appUri in applicationUris)
{
string message = "The Application URI could not be read from the certificate. Use certificate anyway?";
if (!await ApplicationInstance.ApproveMessageAsync(message, silent).ConfigureAwait(false))
if (configuration.ApplicationUri.Equals(appUri, StringComparison.Ordinal))
{
return false;
foundMatch = true;
break;
}
}
else if (!configuration.ApplicationUri.Equals(applicationUri, StringComparison.Ordinal))

if (!foundMatch && applicationUris.Count > 0)
{
Utils.LogInfo("Updated the ApplicationUri: {0} --> {1}", configuration.ApplicationUri, applicationUri);
foundMatch = true;
applicationUri = applicationUris[0];
Utils.LogInfo("Updating the ApplicationUri: {0} --> {1}", configuration.ApplicationUri, applicationUris[0]);

Check warning on line 693 in Libraries/Opc.Ua.Configuration/ApplicationInstance.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Configuration/ApplicationInstance.cs#L691-L693

Added lines #L691 - L693 were not covered by tests
configuration.ApplicationUri = applicationUri;
}

if (!foundMatch)
{
string message = "The Application URI could not be found in the certificate. Use certificate anyway?";

Check warning on line 699 in Libraries/Opc.Ua.Configuration/ApplicationInstance.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Configuration/ApplicationInstance.cs#L699

Added line #L699 was not covered by tests
if (!await ApplicationInstance.ApproveMessageAsync(message, silent).ConfigureAwait(false))
{
return false;

Check warning on line 702 in Libraries/Opc.Ua.Configuration/ApplicationInstance.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Configuration/ApplicationInstance.cs#L702

Added line #L702 was not covered by tests
}
}

Utils.LogInfo("Using the ApplicationUri: {0}", applicationUri);

// update configuration.
Expand Down
3 changes: 2 additions & 1 deletion Libraries/Opc.Ua.Gds.Client.Common/CertificateWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Security.Cryptography.X509Certificates;
using Opc.Ua.Security.Certificates;
Expand Down Expand Up @@ -213,7 +214,7 @@
{
try
{
return X509Utils.GetApplicationUriFromCertificate(Certificate);
return X509Utils.GetApplicationUrisFromCertificate(Certificate).FirstOrDefault();

Check warning on line 217 in Libraries/Opc.Ua.Gds.Client.Common/CertificateWrapper.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Gds.Client.Common/CertificateWrapper.cs#L217

Added line #L217 was not covered by tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a better way to pick the right one.

}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
/// Creates an extension from ASN.1 encoded data.
/// </summary>
public X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)
: this(encodedExtension.Oid, encodedExtension.RawData, critical)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 88 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(AsnEncodedData encodedExtension, bool critical)', validate parameter 'encodedExtension' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
{
}

Expand Down Expand Up @@ -113,12 +113,28 @@
/// <param name="applicationUri">The application Uri</param>
/// <param name="domainNames">The domain names. DNS Hostnames, IPv4 or IPv6 addresses</param>
public X509SubjectAltNameExtension(
string applicationUri,

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Configuration

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client.ComplexTypes

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-PubSub

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Gds

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Gds

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Configuration

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client.ComplexTypes

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Client.ComplexTypes

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-PubSub

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Gds

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-PubSub

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Security.Certificates

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Server

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)

Check warning on line 116 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Change the type of parameter 'applicationUri' of method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' from 'string' to 'System.Uri', or provide an overload to 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string, IEnumerable<string>)' that allows 'applicationUri' to be passed as a 'System.Uri' object (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054)
IEnumerable<string> domainNames)
{
Oid = new Oid(SubjectAltName2Oid, kFriendlyName);
Critical = false;
Initialize(applicationUri, domainNames);
Initialize(new string[] { applicationUri }, domainNames);

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 121 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(string applicationUri, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
RawData = Encode();
m_decoded = true;
}

/// <summary>
/// Build the Subject Alternative name extension (for OPC UA application certs).
/// </summary>
/// <param name="applicationUris">The application Uri</param>
/// <param name="domainNames">The domain names. DNS Hostnames, IPv4 or IPv6 addresses</param>
public X509SubjectAltNameExtension(
IEnumerable<string> applicationUris,
IEnumerable<string> domainNames)
{
Oid = new Oid(SubjectAltName2Oid, kFriendlyName);
Critical = false;
Initialize(applicationUris, domainNames);

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client.ComplexTypes

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Configuration

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Security.Certificates

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Core

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Gds

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-PubSub

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-macOS-latest-Server

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-ubuntu-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / test-windows-latest-Client

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'domainNames' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 137 in Libraries/Opc.Ua.Security.Certificates/Extensions/X509SubjectAltNameExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

In externally visible method 'X509SubjectAltNameExtension.X509SubjectAltNameExtension(IEnumerable<string> applicationUris, IEnumerable<string> domainNames)', validate parameter 'applicationUris' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
RawData = Encode();
m_decoded = true;
}
Expand Down Expand Up @@ -402,14 +418,17 @@
/// <summary>
/// Initialize the Subject Alternative name extension.
/// </summary>
/// <param name="applicationUri">The application Uri</param>
/// <param name="applicationUris">The application Uris</param>
/// <param name="generalNames">The general names. DNS Hostnames, IPv4 or IPv6 addresses</param>
private void Initialize(string applicationUri, IEnumerable<string> generalNames)
private void Initialize(IEnumerable<string> applicationUris, IEnumerable<string> generalNames)
{
var uris = new List<string>();
var domainNames = new List<string>();
var ipAddresses = new List<string>();
uris.Add(applicationUri);
foreach (string applicationUri in applicationUris)
{
uris.Add(applicationUri);
}
foreach (string generalName in generalNames)
{
switch (Uri.CheckHostName(generalName))
Expand Down
43 changes: 27 additions & 16 deletions Libraries/Opc.Ua.Server/Server/StandardServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,23 +380,34 @@

if (context.SecurityPolicyUri != SecurityPolicies.None)
{
string certificateApplicationUri = X509Utils.GetApplicationUriFromCertificate(parsedClientCertificate);

// verify if applicationUri from ApplicationDescription matches the applicationUri in the client certificate.
if (!String.IsNullOrEmpty(certificateApplicationUri) &&
!String.IsNullOrEmpty(clientDescription.ApplicationUri) &&
certificateApplicationUri != clientDescription.ApplicationUri)
// verify if applicationUri from ApplicationDescription matches the applicationUris in the client certificate.
if (!String.IsNullOrEmpty(clientDescription.ApplicationUri))
{
// report the AuditCertificateDataMismatch event for invalid uri
ServerInternal?.ReportAuditCertificateDataMismatchEvent(parsedClientCertificate, null, clientDescription.ApplicationUri, StatusCodes.BadCertificateUriInvalid);
bool noMatch = true;
var certificateApplicationUris = X509Utils.GetApplicationUrisFromCertificate(parsedClientCertificate);
foreach (var certificateApplicationUri in certificateApplicationUris)
{
if (!String.IsNullOrEmpty(certificateApplicationUri) &&
certificateApplicationUri == clientDescription.ApplicationUri)
{
noMatch = false;
break;
}
}

throw ServiceResultException.Create(
StatusCodes.BadCertificateUriInvalid,
"The URI specified in the ApplicationDescription {0} does not match the URI in the Certificate: {1}.",
clientDescription.ApplicationUri, certificateApplicationUri);
}
if (noMatch)
{
// report the AuditCertificateDataMismatch event for invalid uri
ServerInternal?.ReportAuditCertificateDataMismatchEvent(parsedClientCertificate, null, clientDescription.ApplicationUri, StatusCodes.BadCertificateUriInvalid);

throw ServiceResultException.Create(
StatusCodes.BadCertificateUriInvalid,
"The URI specified in the ApplicationDescription {0} does not match the URIs in the Certificate.",
clientDescription.ApplicationUri);

Check warning on line 406 in Libraries/Opc.Ua.Server/Server/StandardServer.cs

View check run for this annotation

Codecov / codecov/patch

Libraries/Opc.Ua.Server/Server/StandardServer.cs#L403-L406

Added lines #L403 - L406 were not covered by tests
}

CertificateValidator.Validate(clientCertificateChain);
CertificateValidator.Validate(clientCertificateChain);
}
}
}
catch (Exception e)
Expand Down Expand Up @@ -2327,7 +2338,7 @@
{
client.RegisterServer(requestHeader, m_registrationInfo);
}

m_registeredWithDiscoveryServer = m_registrationInfo.IsOnline;
return true;
}
Expand Down Expand Up @@ -3082,7 +3093,7 @@
// attempt graceful shutdown the server.
try
{

if (m_maxRegistrationInterval > 0 && m_registeredWithDiscoveryServer)
{
// unregister from Discovery Server if registered before
Expand Down
4 changes: 2 additions & 2 deletions Stack/Opc.Ua.Core/Security/Certificates/CertificateFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ public static byte[] CreateSigningRequest(
}
}

string applicationUri = X509Utils.GetApplicationUriFromCertificate(certificate);
var applicationUris = X509Utils.GetApplicationUrisFromCertificate(certificate);

// Subject Alternative Name
var subjectAltName = new X509SubjectAltNameExtension(applicationUri, domainNames);
var subjectAltName = new X509SubjectAltNameExtension(applicationUris, domainNames);
request.CertificateExtensions.Add(new X509Extension(subjectAltName, false));

using (RSA rsa = certificate.GetRSAPrivateKey())
Expand Down
Loading
Loading