use of org.xipki.ca.api.profile.CertprofileException in project xipki by xipki.
the class XmlX509Certprofile method initialize.
// method initialize
public void initialize(X509ProfileType conf) throws CertprofileException {
ParamUtil.requireNonNull("conf", conf);
reset();
try {
initialize0(conf);
} catch (RuntimeException ex) {
LogUtil.error(LOG, ex);
throw new CertprofileException("caught RuntimeException while initializing certprofile: " + ex.getMessage());
}
}
use of org.xipki.ca.api.profile.CertprofileException 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