You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ferencerdei (via GitHub)" <gi...@apache.org> on 2023/03/31 07:01:57 UTC

[GitHub] [nifi] ferencerdei commented on a diff in pull request #7098: NIFI-11344 Make MiNiFi FIPS compatible

ferencerdei commented on code in PR #7098:
URL: https://github.com/apache/nifi/pull/7098#discussion_r1154089484


##########
minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/configuration/ingestors/RestChangeIngestor.java:
##########
@@ -172,39 +182,53 @@ private void createConnector(Properties properties) {
         http.setIdleTimeout(30000L);
         jetty.addConnector(http);
 
-        logger.info("Added an http connector on the host '{}' and port '{}'", new Object[]{http.getHost(), http.getPort()});
+        logger.info("Added an http connector on the host '{}' and port '{}'", http.getHost(), http.getPort());
     }
 
     private void createSecureConnector(Properties properties) {
-        SslContextFactory ssl = new SslContextFactory();
-
-        if (properties.getProperty(KEYSTORE_LOCATION_KEY) != null) {
-            ssl.setKeyStorePath(properties.getProperty(KEYSTORE_LOCATION_KEY));
-            ssl.setKeyStorePassword(properties.getProperty(KEYSTORE_PASSWORD_KEY));
-            ssl.setKeyStoreType(properties.getProperty(KEYSTORE_TYPE_KEY));
+        KeyStore keyStore;
+        KeyStore truststore = null;
+
+        try (FileInputStream keyStoreStream = new FileInputStream(properties.getProperty(KEYSTORE_LOCATION_KEY))) {

Review Comment:
   There is a check already before we call the createSecureConnector, that's why I removed the duplicated check. I'm going to extend the exception message.



-- 
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: issues-unsubscribe@nifi.apache.org

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