truststorePassword =
System.getProperty("javax.net.ssl.trustStorePassword");
}
- if( truststorePassword == null ) {
- truststorePassword = getKeystorePassword();
- }
if(log.isDebugEnabled()) {
log.debug("TrustPass = " + truststorePassword);
}
log.debug("trustProvider = " + truststoreProvider);
}
- if (truststoreFile != null && truststorePassword != null){
+ if (truststoreFile != null){
trustStore = getStore(truststoreType, truststoreProvider,
truststoreFile, truststorePassword);
}
}
istream = new FileInputStream(keyStoreFile);
}
-
- ks.load(istream, pass.toCharArray());
+
+ char[] storePass = null;
+ if (pass != null) {
+ storePass = pass.toCharArray();
+ }
+ ks.load(istream, storePass);
} catch (FileNotFoundException fnfe) {
log.error(sm.getString("jsse.keystore_load_failed", type, path,
fnfe.getMessage()), fnfe);
<attribute name="truststorePass" required="false">
<p>The password to access the trust store. The default is the value of the
<code>javax.net.ssl.trustStorePassword</code> system property. If that
- property is null, the value of <code>keystorePass</code> is used as the
- default. If neither this attribute, the default system property nor
- <code>keystorePass</code>is set, no trust store will be configured.</p>
+ property is null, no trust store password will be configured.</p>
</attribute>
<attribute name="truststoreProvider" required="false">