有人可以帮我解决以下问题吗?
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);