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;
}
Aggregations