private static boolean isCritical(final X509Certificate certificate, final String extensionOid) {
        val criticalOids = certificate.getCriticalExtensionOIDs();
        return criticalOids != null && !criticalOids.isEmpty() && criticalOids.contains(extensionOid);
    }
Checks if critical extension oids contain the extension oid.

@param certificate  the certificate
@param extensionOid the extension oid
@return true, if  critical
support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/handler/support/X509CredentialsAuthenticationHandler.java