Skip to content

Commit

Permalink
Stick with EndpointDescription if SecPol is null for the UserToken (#…
Browse files Browse the repository at this point in the history
…1324)


Co-authored-by: Alin Moldovean <aam@softing.com>
  • Loading branch information
ToSa27 and AlinMoldovean committed Mar 23, 2021
1 parent d7236ce commit 4014aa6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Libraries/Opc.Ua.Client/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2342,10 +2342,12 @@ public ReferenceDescriptionCollection FetchReferences(NodeId nodeId)
}

bool requireEncryption = securityPolicyUri != SecurityPolicies.None;

if (!requireEncryption)
{
requireEncryption = identityPolicy.SecurityPolicyUri != SecurityPolicies.None;
}
requireEncryption = identityPolicy.SecurityPolicyUri != SecurityPolicies.None &&
!String.IsNullOrEmpty(identityPolicy.SecurityPolicyUri);
}

// validate the server certificate /certificate chain.
X509Certificate2 serverCertificate = null;
Expand Down

0 comments on commit 4014aa6

Please sign in to comment.