use of com.github.zhenwei.provider.x509.PKIXAttrCertChecker in project LinLong-Java by zhenwei1108.
the class RFC3281CertPathUtilities method processAttrCert7.
protected static void processAttrCert7(X509AttributeCertificate attrCert, CertPath certPath, CertPath holderCertPath, PKIXExtendedParameters pkixParams, Set attrCertCheckers) throws CertPathValidatorException {
// TODO:
// AA Controls
// Attribute encryption
// Proxy
Set set = attrCert.getCriticalExtensionOIDs();
// target information checked in step 6 / X509AttributeCertStoreSelector
if (set.contains(TARGET_INFORMATION)) {
try {
TargetInformation.getInstance(CertPathValidatorUtilities.getExtensionValue(attrCert, TARGET_INFORMATION));
} catch (AnnotatedException e) {
throw new ExtCertPathValidatorException("Target information extension could not be read.", e);
} catch (IllegalArgumentException e) {
throw new ExtCertPathValidatorException("Target information extension could not be read.", e);
}
}
set.remove(TARGET_INFORMATION);
for (Iterator it = attrCertCheckers.iterator(); it.hasNext(); ) {
((PKIXAttrCertChecker) it.next()).check(attrCert, certPath, holderCertPath, set);
}
if (!set.isEmpty()) {
throw new CertPathValidatorException("Attribute certificate contains unsupported critical extensions: " + set);
}
}
Aggregations