revert-70aa11f8
Dilshan Edirisuriya 9 years ago
parent 168a011376
commit 0b800b8615

@ -58,7 +58,7 @@
org.apache.commons.logging, org.apache.commons.logging,
javax.security.auth.x500, javax.security.auth.x500,
javax.xml.parsers, javax.xml.parsers,
org.apache.commons.codec.binary, org.apache.commons.codec.binary;version="${version.commons.codec}",
org.bouncycastle.asn1, org.bouncycastle.asn1,
org.bouncycastle.asn1.x500, org.bouncycastle.asn1.x500,
org.bouncycastle.asn1.x509, org.bouncycastle.asn1.x509,

@ -348,18 +348,18 @@ public class CertificateGenerator {
Date validityBeginDate = commonUtil.getValidityStartDate(); Date validityBeginDate = commonUtil.getValidityStartDate();
Date validityEndDate = commonUtil.getValidityEndDate(); Date validityEndDate = commonUtil.getValidityEndDate();
X500Name certSubject = request.getSubject(); X500Name certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
Attribute attributes[] = request.getAttributes(); Attribute attributes[] = request.getAttributes();
if (certSubject == null) { // if (certSubject == null) {
certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); // certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
} else { // } else {
org.bouncycastle.asn1.x500.RDN[] rdn = certSubject.getRDNs(); // org.bouncycastle.asn1.x500.RDN[] rdn = certSubject.getRDNs();
//
if (rdn == null || rdn.length == 0) { // if (rdn == null || rdn.length == 0) {
certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); // certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
} // }
} // }
X509v3CertificateBuilder certificateBuilder = new X509v3CertificateBuilder( X509v3CertificateBuilder certificateBuilder = new X509v3CertificateBuilder(
new X500Name(issueSubject), CommonUtil.generateSerialNumber(), new X500Name(issueSubject), CommonUtil.generateSerialNumber(),

Loading…
Cancel
Save