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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]