class AthenzUtils {

    public static boolean isRoleCertificate(X509Certificate x509Cert) {

        // let's first get the common name of the certificate

        final String principal = Crypto.extractX509CertCommonName(x509Cert);
        if (principal == null) {
            return false;
        }

        // check to see if we're dealing with role certificate which
        // has the <domain>:role.<rolename> format or service
        // certificate which has the <domain>.<service> format

        return principal.contains(AuthorityConsts.ROLE_SEP);
    }

    private  AthenzUtils();

}