Skip to content

Commit

Permalink
0004697: Server can't open truststore after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Dec 9, 2020
1 parent 822d0ec commit f49701e
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -74,7 +74,7 @@ public KeyStore getTrustStore() {
try {
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
FileInputStream is = new FileInputStream(getTrustStoreFilename());
ks.load(is, getTrustStorePassword().toCharArray());
ks.load(is, getTrustStorePassword() == null ? null : getTrustStorePassword().toCharArray());
is.close();
return ks;
} catch (RuntimeException e) {
Expand Down Expand Up @@ -277,9 +277,7 @@ protected void initializeCipher(Cipher cipher, int mode) throws Exception {
}

protected String getTrustStorePassword() {
String password = unobfuscateIfNeeded(SecurityConstants.SYSPROP_TRUSTSTORE_PASSWORD);
password = (password != null) ? password : SecurityConstants.KEYSTORE_PASSWORD;
return password;
return unobfuscateIfNeeded(SecurityConstants.SYSPROP_TRUSTSTORE_PASSWORD);
}

protected String getKeyStorePassword() {
Expand Down

0 comments on commit f49701e

Please sign in to comment.