Search in sources :

Example 1 with GeneralSubtreesType

use of org.xipki.ca.certprofile.x509.jaxb.GeneralSubtreesType in project xipki by xipki.

the class ProfileConfCreatorDemo method createNameConstraints.

private static NameConstraints createNameConstraints() {
    NameConstraints ret = new NameConstraints();
    GeneralSubtreesType permitted = new GeneralSubtreesType();
    GeneralSubtreeBaseType single = new GeneralSubtreeBaseType();
    single.setDirectoryName("O=example organization, C=DE");
    permitted.getBase().add(single);
    ret.setPermittedSubtrees(permitted);
    GeneralSubtreesType excluded = new GeneralSubtreesType();
    single = new GeneralSubtreeBaseType();
    single.setDirectoryName("OU=bad OU, O=example organization, C=DE");
    excluded.getBase().add(single);
    ret.setExcludedSubtrees(excluded);
    return ret;
}
Also used : NameConstraints(org.xipki.ca.certprofile.x509.jaxb.NameConstraints) GeneralSubtreeBaseType(org.xipki.ca.certprofile.x509.jaxb.GeneralSubtreeBaseType) GeneralSubtreesType(org.xipki.ca.certprofile.x509.jaxb.GeneralSubtreesType)

Aggregations

GeneralSubtreeBaseType (org.xipki.ca.certprofile.x509.jaxb.GeneralSubtreeBaseType)1 GeneralSubtreesType (org.xipki.ca.certprofile.x509.jaxb.GeneralSubtreesType)1 NameConstraints (org.xipki.ca.certprofile.x509.jaxb.NameConstraints)1