Merge pull request #1157 from inoshperera/master

The device identity certificate's subject name has a hardcoded value
This commit is contained in:
inoshperera 2018-01-17 08:21:21 +05:30 committed by GitHub
commit a49cdd9113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,7 +427,10 @@ public class CertificateGenerator {
Date validityBeginDate = commonUtil.getValidityStartDate();
Date validityEndDate = commonUtil.getValidityEndDate();
X500Name certSubject = new X500Name(CertificateManagementConstants.DEFAULT_PRINCIPAL);
X500Name certSubject = request.getSubject();
if (certSubject == null) { //This is highly unlikely as the csr must have a subject name.
certSubject = new X500Name(CertificateManagementConstants.DEFAULT_PRINCIPAL);
}
Attribute attributes[] = request.getAttributes();
RDN[] certUniqueIdRDN;