final X509CA x509ca = (X509CA)ca;
if(certProfile.getUseCADefinedFreshestCRL()){
freshestcrldistpoint = x509ca.getCADefinedFreshestCRL();
}
// Multiple FCDPs are separated with the ';' sign
CRLDistPoint ret = null;
if (freshestcrldistpoint != null) {
final StringTokenizer tokenizer = new StringTokenizer(freshestcrldistpoint, ";", false);
final ArrayList<DistributionPoint> distpoints = new ArrayList<DistributionPoint>();
while (tokenizer.hasMoreTokens()) {
final String uri = tokenizer.nextToken();
final GeneralName gn = new GeneralName(GeneralName.uniformResourceIdentifier, new DERIA5String(uri));
if (log.isDebugEnabled()) {
log.debug("Added freshest 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);
distpoints.add(new DistributionPoint(dpn, null, null));
}
if (!distpoints.isEmpty()) {
ret = new CRLDistPoint((DistributionPoint[])distpoints.toArray(new DistributionPoint[distpoints.size()]));
}
}
if (ret == null) {
log.error("UseFreshestCRL is true, but no URI string defined!");
}