lordgamez commented on a change in pull request #1216:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1216#discussion_r758368918



##########
File path: extensions/opc/src/opcbase.cpp
##########
@@ -84,45 +83,41 @@ namespace processors {
 
     auto certificatePathRes = context->getProperty(CertificatePath.getName(), 
certpath_);
     auto keyPathRes = context->getProperty(KeyPath.getName(), keypath_);
-    auto trustedPathRes = context->getProperty(TrustedPath.getName(), 
trustpath_);
-    if (certificatePathRes != keyPathRes || keyPathRes != trustedPathRes) {
-      throw Exception(PROCESS_SCHEDULE_EXCEPTION, "All or none of Certificate 
path, Key path and Trusted server certificate path should be provided!");
+    context->getProperty(TrustedPath.getName(), trustpath_);
+    if (certificatePathRes != keyPathRes) {
+      throw Exception(PROCESS_SCHEDULE_EXCEPTION, "All or none of Certificate 
path and Key path should be provided!");
     }
 
-    if (!password_.empty() && (certpath_.empty() || keypath_.empty() || 
trustpath_.empty() || applicationURI_.empty())) {
-      throw Exception(PROCESS_SCHEDULE_EXCEPTION, "Certificate path, Key path, 
Trusted server certificate path and Application URI must be provided in case 
Password is provided!");

Review comment:
       I realized why I removed this condition. Username and password 
authentication can be used unencrypted as OPC UA allows it, so I think we 
should not enforce encryption if the user does not want to.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to