if (!keystore_file1.exists()) {
keystore_file1.getParentFile().mkdirs();
m_agent1Test.createAgent(false);
AgentConfiguration agent_config1 = m_agent1Test.getAgent().getConfiguration();
ServiceContainerConfiguration server_config1 = agent_config1.getServiceContainerPreferences();
SecurityUtil.createKeyStore(server_config1.getConnectorSecurityKeystoreFile(), server_config1
.getConnectorSecurityKeystoreAlias(), "CN=RHQ, OU=RedHat, O=redhat.com, C=US", server_config1
.getConnectorSecurityKeystorePassword(), server_config1.getConnectorSecurityKeystoreKeyPassword(),
"DSA", 36500);
}
File keystore_file2 = new File("target/testdata2/keystore.dat");
if (!keystore_file2.exists()) {
keystore_file2.getParentFile().mkdirs();
m_agent2Test.createAgent(false);
AgentConfiguration agent_config2 = m_agent2Test.getAgent().getConfiguration();
ServiceContainerConfiguration server_config2 = agent_config2.getServiceContainerPreferences();
SecurityUtil.createKeyStore(server_config2.getConnectorSecurityKeystoreFile(), server_config2
.getConnectorSecurityKeystoreAlias(), "CN=RHQ, OU=RedHat, O=redhat.com, C=US", server_config2
.getConnectorSecurityKeystorePassword(), server_config2.getConnectorSecurityKeystoreKeyPassword(),
"DSA", 36500);
}
}