You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/11/26 03:53:50 UTC

[GitHub] [nifi] exceptionfactory commented on a change in pull request #4587: NIFI-7895 - Fix NPE in ConsumeMQTT with truststore only SSL CS

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



##########
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:
       The changes and unit test look good.




----------------------------------------------------------------
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:
users@infra.apache.org