use of org.xipki.ca.certprofile.x509.jaxb.ExtensionsType in project xipki by xipki.
the class XmlX509Certprofile method initInhibitAnyPolicy.
private void initInhibitAnyPolicy(Set<ASN1ObjectIdentifier> extnIds, ExtensionsType extensionsType) throws CertprofileException {
ASN1ObjectIdentifier type = Extension.inhibitAnyPolicy;
if (!extensionControls.containsKey(type)) {
return;
}
extnIds.remove(type);
InhibitAnyPolicy extConf = (InhibitAnyPolicy) getExtensionValue(type, extensionsType, InhibitAnyPolicy.class);
if (extConf == null) {
return;
}
int skipCerts = extConf.getSkipCerts();
if (skipCerts < 0) {
throw new CertprofileException("negative inhibitAnyPolicy.skipCerts is not allowed: " + skipCerts);
}
ASN1Integer value = new ASN1Integer(BigInteger.valueOf(skipCerts));
this.inhibitAnyPolicy = new ExtensionValue(extensionControls.get(type).isCritical(), value);
}
Aggregations