exceptionfactory commented on a change in pull request #4587:
URL: https://github.com/apache/nifi/pull/4587#discussion_r504312716



##########
File path: 
nifi-nar-bundles/nifi-mqtt-bundle/nifi-mqtt-processors/src/main/java/org/apache/nifi/processors/mqtt/common/AbstractMQTTProcessor.java
##########
@@ -288,13 +288,27 @@ public ValidationResult validate(String subject, String 
input, ValidationContext
 
     public static Properties transformSSLContextService(SSLContextService 
sslContextService){
         Properties properties = new Properties();
-        properties.setProperty("com.ibm.ssl.protocol", 
sslContextService.getSslAlgorithm());
-        properties.setProperty("com.ibm.ssl.keyStore", 
sslContextService.getKeyStoreFile());
-        properties.setProperty("com.ibm.ssl.keyStorePassword", 
sslContextService.getKeyStorePassword());
-        properties.setProperty("com.ibm.ssl.keyStoreType", 
sslContextService.getKeyStoreType());
-        properties.setProperty("com.ibm.ssl.trustStore", 
sslContextService.getTrustStoreFile());
-        properties.setProperty("com.ibm.ssl.trustStorePassword", 
sslContextService.getTrustStorePassword());
-        properties.setProperty("com.ibm.ssl.trustStoreType", 
sslContextService.getTrustStoreType());
+        if (sslContextService.getSslAlgorithm() != null) {

Review comment:
       This is a very straightforward change, but would it be worth adding a 
unit test to verify that it resolves the problem?  The MqttTestUtils class has 
a createSslProperties() method, so a similar method that sets only the trust 
store properties could be added to support the use case described in NIFI-7895.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to