From ccffdb225246d1507f972969ac73d4118b0932fd Mon Sep 17 00:00:00 2001 From: Dilshan Edirisuriya Date: Mon, 7 Sep 2015 15:15:59 +0530 Subject: [PATCH] Get attribute implementation --- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 1 + .../carbon/certificate/mgt/core/impl/CertificateGenerator.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 81d6be9ba4..f22bffeab8 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -62,6 +62,7 @@ org.bouncycastle.asn1, org.bouncycastle.asn1.x500, org.bouncycastle.asn1.x509, + org.bouncycastle.asn1.pkcs, org.bouncycastle.cert, org.bouncycastle.cert.jcajce, org.bouncycastle.cms, 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 7a2538af22..3aed3f4004 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 @@ -20,6 +20,7 @@ package org.wso2.carbon.certificate.mgt.core.impl; import org.apache.commons.codec.binary.Base64; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.bouncycastle.asn1.pkcs.Attribute; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x509.KeyUsage; import org.bouncycastle.asn1.x509.X509Extension; @@ -344,6 +345,7 @@ public class CertificateGenerator { Date validityEndDate = commonUtil.getValidityEndDate(); X500Name certSubject = request.getSubject(); + Attribute attributes[] = request.getAttributes(); if (certSubject == null) { certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);