Skip to content

Commit

Permalink
Removed unnecessary loading of Redshift CA certs into default truststore
Browse files Browse the repository at this point in the history
  • Loading branch information
bhvkshah committed Dec 13, 2023
1 parent ff8264d commit a504374
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 70 deletions.
9 changes: 2 additions & 7 deletions src/main/java/com/amazon/redshift/ssl/LibPQFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,6 @@ private KeyStore getDefaultKeystore() throws RedshiftException
keystore.load(keystoreStream, passphraseArray);
keystoreStream.close();

loadDefaultCA(keystore, "redshift.crt");
loadDefaultCA(keystore, "bjs.redshift.crt");
loadDefaultCA(keystore, "pdt.redshift.crt");
return keystore;
}
catch (Exception e)
Expand Down Expand Up @@ -426,10 +423,7 @@ private KeyStore fallbackKeyStores(String keystorePath,
}
keystore.load(keystoreStream, passphraseArray);
keystoreStream.close();

loadDefaultCA(keystore, "redshift.crt");
loadDefaultCA(keystore, "bjs.redshift.crt");
loadDefaultCA(keystore, "pdt.redshift.crt");

return keystore;
}
catch (RedshiftException rsex)
Expand Down Expand Up @@ -460,6 +454,7 @@ private KeyStore fallbackKeyStores(String keystorePath,
private void loadDefaultCA(KeyStore keystore, String name)
throws IOException, GeneralSecurityException
{
// This method is no longer used, and kept around for historical purposes
InputStream is = null;

try
Expand Down
20 changes: 0 additions & 20 deletions src/main/resources/com/amazon/redshift/ssl/bjs.redshift.crt

This file was deleted.

22 changes: 0 additions & 22 deletions src/main/resources/com/amazon/redshift/ssl/pdt.redshift.crt

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/resources/com/amazon/redshift/ssl/redshift.crt

This file was deleted.

0 comments on commit a504374

Please sign in to comment.