Browse Source

Don't encrypt username/password over an already encrypted SecureChannel

Julius Pfrommer 7 years ago
parent
commit
32bf04e672
1 changed files with 3 additions and 0 deletions
  1. 3 0
      plugins/ua_accesscontrol_default.c

+ 3 - 0
plugins/ua_accesscontrol_default.c

@@ -234,6 +234,9 @@ UA_AccessControl_default(UA_Boolean allowAnonymous, size_t usernamePasswordLogin
     if(usernamePasswordLoginSize > 0) {
         ac.userTokenPolicies[policies].tokenType = UA_USERTOKENTYPE_USERNAME;
         ac.userTokenPolicies[policies].policyId = UA_STRING_ALLOC(USERNAME_POLICY);
+        /* No encryption of username/password supported at the moment */
+        ac.userTokenPolicies[policies].securityPolicyUri =
+            UA_STRING_ALLOC("http://opcfoundation.org/UA/SecurityPolicy#None");
     }
     return ac;
 }