String ksName = tenantDomain.trim().replace(".", "-");
return (ksName + ".jks" );
}
private String getTenantDomainName() throws KeyStoreMgtException {
RealmService realmService = RealmServiceHolder.getRealmService();
if (realmService == null) {
String msg = "Error in getting the domain name, realm service is null.";
log.error(msg);
throw new KeyStoreMgtException(msg);
}
try {
return realmService.getTenantManager().getDomain(tenantId);
} catch (org.wso2.carbon.user.api.UserStoreException e) {
String msg = "Error in getting the domain name for the tenant id: " + tenantId;
log.error(msg, e);
throw new KeyStoreMgtException(msg, e);
}