mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' of https://github.com/wso2/carbon-device-mgt
This commit is contained in:
commit
86935ac16c
@ -348,18 +348,20 @@ public class CertificateGenerator {
|
||||
Date validityBeginDate = commonUtil.getValidityStartDate();
|
||||
Date validityEndDate = commonUtil.getValidityEndDate();
|
||||
|
||||
X500Name certSubject = request.getSubject();
|
||||
X500Name certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
|
||||
//X500Name certSubject = request.getSubject();
|
||||
|
||||
Attribute attributes[] = request.getAttributes();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
// 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(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user