1 回答

TA貢獻1862條經驗 獲得超6個贊
reasons_mask: 此變量包含到目前為止處理的 CRL 和增量 CRL 支持的一組撤銷原因。
interim_reasons_mask: 這包含當前正在處理的 CRL 或 delta CRL 支持的一組撤銷原因。
據我所知,此處理的目的是收集 CRL 以支持盡可能多的撤銷原因。因此,如果當前 CRL 支持任何先前 CRL 不支持的任何撤銷原因,它只會將當前 CRL 添加到列表中。
如果您reasons_mask
包含所有內容true
,那么之前的 CRL 已經涵蓋了所有撤銷原因,或者沒有給出它支持的特定撤銷原因導致設置特殊值all-reasons
(所有標志為真),這意味著不需要涵蓋進一步的撤銷原因,因此它不會進一步檢查。
sun.security.provider.certpath.DistributionPointFetcher.java
...
// compute interim reasons mask
boolean[] interimReasonsMask = new boolean[9];
ReasonFlags reasons = null;
if (idpExt != null) {
reasons = (ReasonFlags) idpExt.get(IssuingDistributionPointExtension.REASONS);
}
boolean[] pointReasonFlags = point.getReasonFlags();
if (reasons != null) {
if (pointReasonFlags != null) {
// set interim reasons mask to the intersection of
// reasons in the DP and onlySomeReasons in the IDP
boolean[] idpReasonFlags = reasons.getFlags();
for (int i = 0; i < interimReasonsMask.length; i++) {
interimReasonsMask[i] = (i < idpReasonFlags.length && idpReasonFlags[i])
&& (i < pointReasonFlags.length && pointReasonFlags[i]);
}
} else {
// set interim reasons mask to the value of
// onlySomeReasons in the IDP (and clone it since we may
// modify it)
interimReasonsMask = reasons.getFlags().clone();
}
} else if (idpExt == null || reasons == null) {
if (pointReasonFlags != null) {
// set interim reasons mask to the value of DP reasons
interimReasonsMask = pointReasonFlags.clone();
} else {
// set interim reasons mask to the special value all-reasons
Arrays.fill(interimReasonsMask, true); // ### SEE HERE ###
}
}
// verify that interim reasons mask includes one or more reasons
// not included in the reasons mask
boolean oneOrMore = false;
for (int i = 0; i < interimReasonsMask.length && !oneOrMore; i++) {
if (interimReasonsMask[i] && !(i < reasonsMask.length && reasonsMask[i])) {
oneOrMore = true;
}
}
if (!oneOrMore) {
return false;
}
...
添加回答
舉報