use of com.adaptris.security.keystore.ConfiguredUrl in project interlok by adaptris.
the class TestDefaultSecurityService method setUp.
@Before
public void setUp() throws Exception {
config = Config.getInstance().getProperties();
if (config == null) {
fail("No Configuration(!) available");
}
ConfiguredUrl configuredKeystore = new ConfiguredUrl();
configuredKeystore.setUrl(config.getProperty(Config.KEYSTORE_TEST_URL) + "&" + Constants.KEYSTORE_PASSWORD + "=" + config.getProperty(Config.KEYSTORE_COMMON_KEYSTORE_PW));
Config.getInstance().buildKeystore(config.getProperty(Config.KEYSTORE_TEST_URL), null, true);
service = SecurityServiceFactory.defaultInstance().createService();
service.registerKeystore(configuredKeystore);
EncryptionAlgorithm alg = new EncryptionAlgorithm(config.getProperty(Config.SECURITY_ALG), config.getProperty(Config.SECURITY_ALGSIZE));
service.setEncryptionAlgorithm(alg);
us = new Alias(config.getProperty(Config.KEYSTORE_COMMON_PRIVKEY_ALIAS), config.getProperty(Config.KEYSTORE_COMMON_PRIVKEY_PW));
them = new Alias(config.getProperty(Config.KEYSTORE_COMMON_PRIVKEY_ALIAS));
}
Aggregations