diff --git a/Libraries/Opc.Ua.Client/Session.cs b/Libraries/Opc.Ua.Client/Session.cs index b1367a6028..0973fd1257 100644 --- a/Libraries/Opc.Ua.Client/Session.cs +++ b/Libraries/Opc.Ua.Client/Session.cs @@ -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 {