This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws GeneralSecurityException, IOException { | |
// we don't need this, but java gets sad if it is missing | |
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); | |
keyManagerFactory.init(getKeyStore(getTrustStoreFile(), KEYSTORE_PASSWORD.toCharArray()), // you should be able to use org.picketbox.util.KeyStoreUtil.getKeyStore() in the TS | |
KEYSTORE_PASSWORD.toCharArray()); | |
// trust store factory setup | |
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); | |
trustManagerFactory.init(getKeyStore(getTrustStoreFile(), KEYSTORE_PASSWORD.toCharArray())); |