9

有人可以帮我解决以下问题吗?
RFC2560 定义了何时可以接受 OCSP 响应者证书(签署响应):

   1. Matches a local configuration of OCSP signing authority for the
   certificate in question; or

   2. Is the certificate of the CA that issued the certificate in
   question; or

   3. Includes a value of id-ad-ocspSigning in an ExtendedKeyUsage
   extension and is issued by the CA that issued the certificate in
   question."

我的问题是:
如果 OCSP 响应者的证书是由验证路径的 Trust Anchor 签名的,它是否也被认为是接受的?
我的印象应该是,但是上面没有从 RFC 明确说明,也找不到对此的明确参考。

从我对 RFC 的阅读来看,即使它是由 TA 签名的,它仍然对 OCSP 响应无效。
任何帮助表示赞赏
注意:我正在使用java,以防万一

更新:
在 RFC 的第 2.2 节中:

所有确定的响应消息都应进行数字签名。用于签署响应的密钥
必须属于以下之一:

-- 颁发相关证书的 CA
-- 其公钥受请求者信任的 Trusted Responder
-- 持有 CA 直接颁发的特殊标记证书的 CA 指定响应者(Authorized Responder),表明响应者可以为该 CA 发出 OCSP 响应

第2点对我来说似乎模棱两可。
这可能意味着:
a)任何 PK 受信任,因此 Trust Anchor 是可以接受的

b)具有第一个引号中第 (1) 点的含义,这意味着预配置一个证书(任何)以信任为 OCSP 响应者,例如在这里用java完成:

   Security.setProperty("ocsp.responderCertSubjectName",ocspCert.getSubjectDN().getName));
   List<X509Certificate> list = new ArrayList<X509Certificate>();
   list.add(ocspCert);
   CollectionCertStoreParameters p = new CollectionCertStoreParameters(list);  
   CertStore store = CertStore.getInstance("Collection", p);
   PKIXParameters params = new PKIXParameters(Collections.singleton(anchor));
   params.addCertStore(store);      
4

1 回答 1

3

在 RFC 2560 中,这些意味着:

1. Matches a local configuration of OCSP signing authority for the
certificate in question; or

→ 只要您始终清楚自己在做什么,您就可以做您想做的事。这是“包罗万象”的条款,这意味着无论您做什么,您都将很可能符合 RFC 2560。但是,如果您是 OCSP 响应的生产者,您将希望避免使用该标准许可,因为您希望您的响应的用户接受它们,即使他们没有与您相同的“本地配置”。

2. Is the certificate of the CA that issued the certificate in
question; or

→ 棘手的一点是信任锚一个 CA。它不是由证书正式表示的(尽管在许多系统中,信任锚被编码为自签名证书);但它颁发证书,因此是一个认证机构。如果 OCSP 响应使用 TA 密钥签名,则属于这种情况。

3. Includes a value of id-ad-ocspSigning in an ExtendedKeyUsage
extension and is issued by the CA that issued the certificate in
question."

→ 与上述类似,OCSP 响应者签署证书 X 的答案,其中 X 似乎是由 TA 颁发的,可以使用也由同一个 TA 颁发的响应者证书 R——我的意思是两者X 和 R 已由您用作信任锚的名称和密钥的证书颁发机构颁发。

这三种情况描述了应该由接收到 OCSP 响应并希望将其用作证书路径验证的一部分的人执行的验证步骤。RFC 的第 2.2 节是关于 OCSP 响应者的职责:

All definitive response messages SHALL be digitally signed. The key
used to sign the response MUST belong to one of the following:

-- the CA who issued the certificate in question
-- a Trusted Responder whose public key is trusted by the requester
-- a CA Designated Responder (Authorized Responder) who holds a specially
   marked certificate issued directly by the CA, indicating that the responder
   may issue OCSP responses for that CA

这三种情况与我们上面详述的接收方的情况相匹配,按照“2、1、3”的顺序。同样,“颁发证书的 CA”可以是其名称和公钥将被接收方用作信任锚的实体。

于 2011-05-05T12:17:24.453 回答