mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-28 22:55:49 +08:00
Allow to suppress zero nonce error (#1184)
- in addition to duplicate nonce this change allows to suppress zero nonce
This commit is contained in:
@@ -334,9 +334,10 @@ namespace Opc.Ua.Client
|
||||
// the server nonce should be validated if the token includes a secret.
|
||||
if (!Utils.Nonce.ValidateNonce(serverNonce, MessageSecurityMode.SignAndEncrypt, (uint)m_configuration.SecurityConfiguration.NonceLength))
|
||||
{
|
||||
if (channelSecurityMode == MessageSecurityMode.SignAndEncrypt)
|
||||
if (channelSecurityMode == MessageSecurityMode.SignAndEncrypt ||
|
||||
m_configuration.SecurityConfiguration.SuppressNonceValidationErrors)
|
||||
{
|
||||
Utils.Trace((int)TraceMasks.Security, "Warning: The server nonce has not the correct length or is not random enough. The error is suppressed because the channel is encrypted.");
|
||||
Utils.Trace((int)TraceMasks.Security, "Warning: The server nonce has not the correct length or is not random enough. The error is suppressed by user setting or because the channel is encrypted.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user