CRL处理中比较interim_reasons_mask和reasons_mask的原因

RFC5280中的 6.3.3。CRL处理部分有一个步骤:

验证 interim_reasons_mask 是否包含 reasons_mask 中未包含的一个或多个原因。

有人可以解释一下这张支票的意义是什么。当我尝试使用指向某个 URL 的分发点验证证书时,它在 DistributionPointFetcher:591 中失败。reasonsMasks 设置为 9 true's 所以我不知道怎么可能通过这个检查原因因为它已经初始化它从未改变过。

更新

初始化原因掩码的代码:链接

在 DistributionPointFetcher 中传递原因掩码以进行处理的代码:链接


浮云间
浏览 96回答 1
1回答

阿波罗的战车

reasons_mask:&nbsp;此变量包含到目前为止处理的 CRL 和增量 CRL 支持的一组撤销原因。interim_reasons_mask:&nbsp;这包含当前正在处理的 CRL 或 delta CRL 支持的一组撤销原因。据我所知,此处理的目的是收集 CRL 以支持尽可能多的撤销原因。因此,如果当前 CRL 支持任何先前 CRL 不支持的任何撤销原因,它只会将当前 CRL 添加到列表中。如果您reasons_mask包含所有内容true,那么之前的 CRL 已经涵盖了所有撤销原因,或者没有给出它支持的特定撤销原因导致设置特殊值all-reasons(所有标志为真),这意味着不需要涵盖进一步的撤销原因,因此它不会进一步检查。sun.security.provider.certpath.DistributionPointFetcher.java...// compute interim reasons maskboolean[] interimReasonsMask = new boolean[9];ReasonFlags reasons = null;if (idpExt != null) {&nbsp; &nbsp; reasons = (ReasonFlags) idpExt.get(IssuingDistributionPointExtension.REASONS);}boolean[] pointReasonFlags = point.getReasonFlags();if (reasons != null) {&nbsp; &nbsp; if (pointReasonFlags != null) {&nbsp; &nbsp; &nbsp; &nbsp; // set interim reasons mask to the intersection of&nbsp; &nbsp; &nbsp; &nbsp; // reasons in the DP and onlySomeReasons in the IDP&nbsp; &nbsp; &nbsp; &nbsp; boolean[] idpReasonFlags = reasons.getFlags();&nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i < interimReasonsMask.length; i++) {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; interimReasonsMask[i] = (i < idpReasonFlags.length && idpReasonFlags[i])&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; && (i < pointReasonFlags.length && pointReasonFlags[i]);&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; } else {&nbsp; &nbsp; &nbsp; &nbsp; // set interim reasons mask to the value of&nbsp; &nbsp; &nbsp; &nbsp; // onlySomeReasons in the IDP (and clone it since we may&nbsp; &nbsp; &nbsp; &nbsp; // modify it)&nbsp; &nbsp; &nbsp; &nbsp; interimReasonsMask = reasons.getFlags().clone();&nbsp; &nbsp; }} else if (idpExt == null || reasons == null) {&nbsp; &nbsp; if (pointReasonFlags != null) {&nbsp; &nbsp; &nbsp; &nbsp; // set interim reasons mask to the value of DP reasons&nbsp; &nbsp; &nbsp; &nbsp; interimReasonsMask = pointReasonFlags.clone();&nbsp; &nbsp; } else {&nbsp; &nbsp; &nbsp; &nbsp; // set interim reasons mask to the special value all-reasons&nbsp; &nbsp; &nbsp; &nbsp; Arrays.fill(interimReasonsMask, true);&nbsp; // ### SEE HERE ###&nbsp; &nbsp; }}// verify that interim reasons mask includes one or more reasons// not included in the reasons maskboolean oneOrMore = false;for (int i = 0; i < interimReasonsMask.length && !oneOrMore; i++) {&nbsp; &nbsp; if (interimReasonsMask[i] && !(i < reasonsMask.length && reasonsMask[i])) {&nbsp; &nbsp; &nbsp; &nbsp; oneOrMore = true;&nbsp; &nbsp; }}if (!oneOrMore) {&nbsp; &nbsp; return false;}...
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java