createTrustStore(config, masterPassword);
} catch(RepositoryException re) {
String msg = _strMgr.getString("SomeProblemWithKeytool", re.getMessage());
System.err.println(msg);
try {
PEFileLayout lo = getFileLayout(config);
File src = lo.getKeyStoreTemplate();
File dest = lo.getKeyStore();
FileUtils.copy(src, dest); //keystore goes first
src = lo.getTrustStoreTemplate();
dest = lo.getTrustStore();
FileUtils.copy(src, dest); //and then cacerts with CA-signed certs
} catch(Exception e) {
logger.log(Level.SEVERE, null, e);
}