|
|
|
@ -29,7 +29,6 @@ import io.entgra.device.mgt.core.certificate.mgt.core.util.CertificateManagement
|
|
|
|
|
import io.entgra.device.mgt.core.certificate.mgt.core.util.CommonUtil;
|
|
|
|
|
import io.entgra.device.mgt.core.certificate.mgt.core.util.Serializer;
|
|
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
|
import org.bouncycastle.asn1.ASN1Encodable;
|
|
|
|
@ -436,7 +435,7 @@ public class CertificateGenerator {
|
|
|
|
|
String orgUnit = CommonUtil.getSubjectDnAttribute(reqCert,
|
|
|
|
|
CertificateManagementConstants.ORG_UNIT_ATTRIBUTE);
|
|
|
|
|
CertificateResponse lookUpCertificate;
|
|
|
|
|
if (StringUtils.isNotEmpty(orgUnit)) {
|
|
|
|
|
if (CommonUtil.isScepOrgUnit(orgUnit)) {
|
|
|
|
|
int tenantId = Integer.parseInt(orgUnit.split(("_"))[1]);
|
|
|
|
|
lookUpCertificate = keyStoreReader.getCertificateBySerial(reqCert.getSerialNumber().toString(),
|
|
|
|
|
tenantId);
|
|
|
|
|