use of org.xipki.ca.api.profile.x509.ExtKeyUsageControl in project xipki by xipki.
the class XmlX509CertprofileUtil method buildExtKeyUsageOptions.
// method buildKeyUsageOptions
public static Set<ExtKeyUsageControl> buildExtKeyUsageOptions(ExtendedKeyUsage extConf) {
ParamUtil.requireNonNull("extConf", extConf);
List<Usage> usages = extConf.getUsage();
Set<ExtKeyUsageControl> controls = new HashSet<>();
for (Usage m : usages) {
ExtKeyUsageControl usage = new ExtKeyUsageControl(new ASN1ObjectIdentifier(m.getValue()), m.isRequired());
controls.add(usage);
}
return Collections.unmodifiableSet(controls);
}
Aggregations