if (StringUtils.isNotEmpty(crldistpoint)) {
final Iterator<String> it = StringTools.splitURIs(crldistpoint).iterator();
while (it.hasNext()) {
// 6 is URI
final String uri = (String) it.next();
final GeneralName gn = new GeneralName(GeneralName.uniformResourceIdentifier, new DERIA5String(uri));
if (log.isDebugEnabled()) {
log.debug("Added CRL distpoint: "+uri);
}
final ASN1EncodableVector vec = new ASN1EncodableVector();
vec.add(gn);
final GeneralNames gns = new GeneralNames(new DERSequence(vec));
final DistributionPointName dpn = new DistributionPointName(0, gns);
dpns.add(dpn);
}
}
// CRL issuer works much like Dist point URI. If separated by ; it is put in the same global distPoint as the URI,
// if there is more of one of them, the one with more is put in an own global distPoint.
final ArrayList<GeneralNames> issuers = new ArrayList<GeneralNames>();
if (StringUtils.isNotEmpty(crlissuer)) {
final StringTokenizer tokenizer = new StringTokenizer(crlissuer, ";", false);
while (tokenizer.hasMoreTokens()) {
final String issuer = tokenizer.nextToken();
final GeneralName gn = new GeneralName(new X509Name(issuer));
if (log.isDebugEnabled()) {
log.debug("Added CRL issuer: "+issuer);
}
final ASN1EncodableVector vec = new ASN1EncodableVector();
vec.add(gn);