|
|
@ -324,9 +324,14 @@ public class CertificateGenerator {
|
|
|
|
KeyStoreReader keyStoreReader = new KeyStoreReader();
|
|
|
|
KeyStoreReader keyStoreReader = new KeyStoreReader();
|
|
|
|
if (distinguishedName != null && !distinguishedName.isEmpty()) {
|
|
|
|
if (distinguishedName != null && !distinguishedName.isEmpty()) {
|
|
|
|
if (distinguishedName.contains("/CN=")) {
|
|
|
|
if (distinguishedName.contains("/CN=")) {
|
|
|
|
String[] dnSplits = distinguishedName.split("/CN=");
|
|
|
|
String[] dnSplits = distinguishedName.split("/");
|
|
|
|
String commonNameExtracted = dnSplits[dnSplits.length - 1];
|
|
|
|
for (String dnPart : dnSplits) {
|
|
|
|
lookUpCertificate = keyStoreReader.getCertificateBySerial(commonNameExtracted);
|
|
|
|
if (dnPart.contains("CN=")) {
|
|
|
|
|
|
|
|
String commonNameExtracted = dnPart.replace("CN=", "");
|
|
|
|
|
|
|
|
lookUpCertificate = keyStoreReader.getCertificateBySerial(commonNameExtracted);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
LdapName ldapName;
|
|
|
|
LdapName ldapName;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|