Methods Summary |
---|
public java.util.Set | getCriticalExtensionOIDs()
return getExtensionOIDs(true);
|
public byte[] | getEncoded()
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
DEROutputStream dOut = new DEROutputStream(bOut);
try
{
dOut.writeObject(c);
return bOut.toByteArray();
}
catch (IOException e)
{
throw new CRLException(e.toString());
}
|
private java.util.Set | getExtensionOIDs(boolean critical)
X509Extensions extensions = c.getExtensions();
if ( extensions != null )
{
HashSet set = new HashSet();
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (critical == ext.isCritical())
{
set.add(oid.getId());
}
}
return set;
}
return null;
|
public byte[] | getExtensionValue(java.lang.String oid)
X509Extensions exts = c.getExtensions();
if (exts != null)
{
X509Extension ext = exts.getExtension(new DERObjectIdentifier(oid));
if (ext != null)
{
return ext.getValue().getOctets();
}
}
return null;
|
public java.util.Set | getNonCriticalExtensionOIDs()
return getExtensionOIDs(false);
|
public java.util.Date | getRevocationDate()
return c.getRevocationDate().getDate();
|
public java.math.BigInteger | getSerialNumber()
return c.getUserCertificate().getValue();
|
public boolean | hasExtensions()
return c.getExtensions() != null;
|
public boolean | hasUnsupportedCriticalExtension()Will return true if any extensions are present and marked
as critical as we currently dont handle any extensions!
Set extns = getCriticalExtensionOIDs();
if ( extns != null && !extns.isEmpty() )
{
return true;
}
return false;
|
public java.lang.String | toString()
StringBuffer buf = new StringBuffer();
String nl = System.getProperty("line.separator");
buf.append(" userCertificate: " + this.getSerialNumber() + nl);
buf.append(" revocationDate: " + this.getRevocationDate() + nl);
X509Extensions extensions = c.getExtensions();
if ( extensions != null )
{
Enumeration e = extensions.oids();
if ( e.hasMoreElements() )
{
buf.append(" crlEntryExtensions:" + nl);
while ( e.hasMoreElements() )
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
buf.append(ext);
}
}
}
return buf.toString();
|