Get attribute implementation

4.x.x
Dilshan Edirisuriya 9 years ago
parent 4500aacd38
commit ccffdb2252

@ -62,6 +62,7 @@
org.bouncycastle.asn1, org.bouncycastle.asn1,
org.bouncycastle.asn1.x500, org.bouncycastle.asn1.x500,
org.bouncycastle.asn1.x509, org.bouncycastle.asn1.x509,
org.bouncycastle.asn1.pkcs,
org.bouncycastle.cert, org.bouncycastle.cert,
org.bouncycastle.cert.jcajce, org.bouncycastle.cert.jcajce,
org.bouncycastle.cms, org.bouncycastle.cms,

@ -20,6 +20,7 @@ package org.wso2.carbon.certificate.mgt.core.impl;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.bouncycastle.asn1.pkcs.Attribute;
import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x509.KeyUsage; import org.bouncycastle.asn1.x509.KeyUsage;
import org.bouncycastle.asn1.x509.X509Extension; import org.bouncycastle.asn1.x509.X509Extension;
@ -344,6 +345,7 @@ public class CertificateGenerator {
Date validityEndDate = commonUtil.getValidityEndDate(); Date validityEndDate = commonUtil.getValidityEndDate();
X500Name certSubject = request.getSubject(); X500Name certSubject = request.getSubject();
Attribute attributes[] = request.getAttributes();
if (certSubject == null) { if (certSubject == null) {
certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);

Loading…
Cancel
Save