use of org.xipki.ca.qa.internal.QaInhibitAnyPolicy in project xipki by xipki.
the class ExtensionsChecker method checkExtensionInhibitAnyPolicy.
// method checkExtensionPolicyMappings
private void checkExtensionInhibitAnyPolicy(StringBuilder failureMsg, byte[] extensionValue, Extensions requestedExtensions, ExtensionControl extControl) {
QaInhibitAnyPolicy conf = inhibitAnyPolicy;
if (conf == null) {
byte[] expected = getExpectedExtValue(Extension.inhibitAnyPolicy, requestedExtensions, extControl);
if (!Arrays.equals(expected, extensionValue)) {
addViolation(failureMsg, "extension values", extensionValue, (expected == null) ? "not present" : hex(expected));
}
return;
}
ASN1Integer asn1Int = ASN1Integer.getInstance(extensionValue);
int isSkipCerts = asn1Int.getPositiveValue().intValue();
if (isSkipCerts != conf.getSkipCerts()) {
addViolation(failureMsg, "skipCerts", isSkipCerts, conf.getSkipCerts());
}
}
Aggregations