From d8fd506c710dbb6525f72627c0ad285c526fa172 Mon Sep 17 00:00:00 2001 From: Martin Haefner Date: Tue, 23 Oct 2018 12:50:50 +0200 Subject: [PATCH] No password encryption if requested by the client --- src/client/client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index 0c82ddc1..e2bc96ec 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -281,7 +281,12 @@ void UaClient::Connect(const EndpointDescription & endpoint) { sessionParameters.UserIdentityToken.setPolicyId(token.PolicyId); sessionParameters.UserIdentityToken.setUser(user, password); - EncryptPassword(sessionParameters.UserIdentityToken, createSessionResponse); + + if(token.SecurityPolicyUri != "http://opcfoundation.org/UA/SecurityPolicy#None") + { + EncryptPassword(sessionParameters.UserIdentityToken, createSessionResponse); + } + user_identify_token_found = true; break; }