瀏覽代碼

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

Julius Pfrommer 7 年之前
父節點
當前提交
32bf04e672
共有 1 個文件被更改,包括 3 次插入0 次删除
  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;
 }