Skip to content

Commit

Permalink
SSL config files can now use includes, value substitutions, acripting
Browse files Browse the repository at this point in the history
  • Loading branch information
lolocohen committed Jul 6, 2019
1 parent e671d73 commit 03c708c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions common/src/java/org/jppf/ssl/SSLHelper.java
Expand Up @@ -20,8 +20,9 @@

import static org.jppf.jmx.JPPFJMXProperties.*;

import java.io.InputStream;
import java.io.*;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.util.Map;

import javax.net.ssl.*;
Expand All @@ -30,7 +31,6 @@
import org.jppf.jmx.JMXEnvHelper;
import org.jppf.utils.*;
import org.jppf.utils.configuration.*;
import org.jppf.utils.streams.StreamUtils;
import org.slf4j.*;

/**
Expand Down Expand Up @@ -127,12 +127,10 @@ private static void loadSSLProperties() throws Exception {
is = FileUtils.getFileInputStream(source);
}
if (is == null) throw new SSLConfigurationException("could not load the SSL configuration '" + source + "'");
try {
sslConfig.load(is);
try (final InputStreamReader reader = new InputStreamReader(is, StandardCharsets.ISO_8859_1)) {
sslConfig.loadAndResolve(reader);
helper = new SSLHelper2(sslConfig);
if (debugEnabled) log.debug("successfully loaded the SSL configuration from '{}'", source);
} finally {
StreamUtils.closeSilent(is);
}
}
}
Expand Down

0 comments on commit 03c708c

Please sign in to comment.