buf.append(" Extensions: ").append(nl);
}
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier) e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (ext.getValue() != null)
{
byte[] octs = ext.getValue().getOctets();
ASN1InputStream dIn = new ASN1InputStream(octs);
buf.append(" critical(").append(
ext.isCritical()).append(") ");
try
{
if (oid.equals(X509Extensions.CRLNumber))
{
buf.append(
new CRLNumber(DERInteger.getInstance(
dIn.readObject()).getPositiveValue()))
.append(nl);
}
else if (oid.equals(X509Extensions.DeltaCRLIndicator))
{
buf.append(
"Base CRL: "
+ new CRLNumber(DERInteger.getInstance(
dIn.readObject()).getPositiveValue()))
.append(nl);
}
else if (oid
.equals(X509Extensions.IssuingDistributionPoint))
{
buf.append(
new IssuingDistributionPoint((ASN1Sequence) dIn
.readObject())).append(nl);
}
else if (oid
.equals(X509Extensions.CRLDistributionPoints))
{
buf.append(
new CRLDistPoint((ASN1Sequence) dIn
.readObject())).append(nl);
}
else if (oid.equals(X509Extensions.FreshestCRL))
{
buf.append(
new CRLDistPoint((ASN1Sequence) dIn
.readObject())).append(nl);
}
else
{
buf.append(oid.getId());
buf.append(" value = ").append(
ASN1Dump.dumpAsString(dIn.readObject()))
.append(nl);
}
}
catch (Exception ex)
{
buf.append(oid.getId());
buf.append(" value = ").append("*****").append(nl);
}
}
else
{