diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/impl/CertificateGenerator.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/impl/CertificateGenerator.java index c97d84472d1..7735922f51c 100755 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/impl/CertificateGenerator.java +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/main/java/org/wso2/carbon/certificate/mgt/core/impl/CertificateGenerator.java @@ -348,18 +348,20 @@ public class CertificateGenerator { Date validityBeginDate = commonUtil.getValidityStartDate(); Date validityEndDate = commonUtil.getValidityEndDate(); - X500Name certSubject = request.getSubject(); - Attribute attributes[] = request.getAttributes(); + X500Name certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); + //X500Name certSubject = request.getSubject(); - if (certSubject == null) { - certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); - } else { - org.bouncycastle.asn1.x500.RDN[] rdn = certSubject.getRDNs(); + Attribute attributes[] = request.getAttributes(); - if (rdn == null || rdn.length == 0) { - certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); - } - } +// if (certSubject == null) { +// certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); +// } else { +// org.bouncycastle.asn1.x500.RDN[] rdn = certSubject.getRDNs(); +// +// if (rdn == null || rdn.length == 0) { +// certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); +// } +// } X509v3CertificateBuilder certificateBuilder = new X509v3CertificateBuilder( new X500Name(issueSubject), CommonUtil.generateSerialNumber(), diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgres.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql similarity index 100% rename from features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgres.sql rename to features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql