ArrayList<String> emails = CertTools.getEmailFromDN(altName);
if (!emails.isEmpty()) {
Iterator<String> iter = emails.iterator();
while (iter.hasNext()) {
GeneralName gn = new GeneralName(1, new DERIA5String((String)iter.next()));
vec.add(gn);
}
}
ArrayList<String> dns = CertTools.getPartsFromDN(altName, CertTools.DNS);
if (!dns.isEmpty()) {
Iterator<String> iter = dns.iterator();
while (iter.hasNext()) {
GeneralName gn = new GeneralName(2, new DERIA5String((String)iter.next()));
vec.add(gn);
}
}
String directoryName = getDirectoryStringFromAltName(altName);
if (directoryName != null) {
X509Name x509DirectoryName = new X509Name(directoryName);
GeneralName gn = new GeneralName(4, x509DirectoryName);
vec.add(gn);
}
ArrayList<String> uri = CertTools.getPartsFromDN(altName, CertTools.URI);
if (!uri.isEmpty()) {
Iterator<String> iter = uri.iterator();
while (iter.hasNext()) {
GeneralName gn = new GeneralName(6, new DERIA5String((String)iter.next()));
vec.add(gn);
}
}
uri = CertTools.getPartsFromDN(altName, CertTools.URI1);
if (!uri.isEmpty()) {
Iterator<String> iter = uri.iterator();
while (iter.hasNext()) {
GeneralName gn = new GeneralName(6, new DERIA5String((String)iter.next()));
vec.add(gn);
}
}
uri = CertTools.getPartsFromDN(altName, CertTools.URI2);
if (!uri.isEmpty()) {
Iterator<String> iter = uri.iterator();
while (iter.hasNext()) {
GeneralName gn = new GeneralName(6, new DERIA5String((String)iter.next()));
vec.add(gn);
}
}