public boolean hasUnsupportedCriticalExtension()
{
if (this.getVersion() == 3)
{
X509Extensions extensions = c.getTBSCertificate().getExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
String oidId = oid.getId();
if (oidId.equals(RFC3280CertPathUtilities.KEY_USAGE)
|| oidId.equals(RFC3280CertPathUtilities.CERTIFICATE_POLICIES)
|| oidId.equals(RFC3280CertPathUtilities.POLICY_MAPPINGS)
|| oidId.equals(RFC3280CertPathUtilities.INHIBIT_ANY_POLICY)
|| oidId.equals(RFC3280CertPathUtilities.CRL_DISTRIBUTION_POINTS)
|| oidId.equals(RFC3280CertPathUtilities.ISSUING_DISTRIBUTION_POINT)
|| oidId.equals(RFC3280CertPathUtilities.DELTA_CRL_INDICATOR)
|| oidId.equals(RFC3280CertPathUtilities.POLICY_CONSTRAINTS)
|| oidId.equals(RFC3280CertPathUtilities.BASIC_CONSTRAINTS)
|| oidId.equals(RFC3280CertPathUtilities.SUBJECT_ALTERNATIVE_NAME)
|| oidId.equals(RFC3280CertPathUtilities.NAME_CONSTRAINTS))
{
continue;
}
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical())
{
return true;
}