if (temp.startsWith("//")) {
temp = temp.substring(1);
}
if (temp.equals(RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH +
RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE)) {
ServerConfiguration config = ServerConfiguration.getInstance();
String file = new File(config.getFirstProperty(RegistryResources
.SecurityManagement.SERVER_PRIMARY_KEYSTORE_FILE)).getAbsolutePath();
String name = KeyStoreUtil.getKeyStoreFileName(file);
data.setPrivateStore(name);
} else {
temp = temp.substring(temp.lastIndexOf("/") + 1);
data.setPrivateStore(temp);
}
}
Association[] tstedStores = registry.getAssociations(servicePath,
SecurityConstants.ASSOCIATION_TRUSTED_KEYSTORE);
String[] trustedStores = new String[tstedStores.length];
for (int i = 0; i < tstedStores.length; i++) {
String temp = tstedStores[i].getDestinationPath();
if (temp.startsWith("//")) {
temp = temp.substring(1);
}
if (temp.equals(RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH +
RegistryResources.SecurityManagement.PRIMARY_KEYSTORE_PHANTOM_RESOURCE)) {
ServerConfiguration config = ServerConfiguration.getInstance();
String file = new File(config.getFirstProperty(RegistryResources
.SecurityManagement.SERVER_PRIMARY_KEYSTORE_FILE)).getAbsolutePath();
String name = KeyStoreUtil.getKeyStoreFileName(file);
trustedStores[i] = name;
} else {
temp = temp.substring(temp.lastIndexOf("/") + 1);