提交 0f1a95f2 编写于 作者: M mullan

7179715: OCSP revocation checking fails if the signer certificate is identified using the key ID

Reviewed-by: vinnie
上级 f698a8d9
...@@ -157,8 +157,6 @@ public final class OCSPResponse { ...@@ -157,8 +157,6 @@ public final class OCSPResponse {
private final AlgorithmId sigAlgId; private final AlgorithmId sigAlgId;
private final byte[] signature; private final byte[] signature;
private final byte[] tbsResponseData; private final byte[] tbsResponseData;
private final X500Principal responderName;
private final byte[] responderKey;
private final byte[] responseNonce; private final byte[] responseNonce;
/* /*
...@@ -195,8 +193,6 @@ public final class OCSPResponse { ...@@ -195,8 +193,6 @@ public final class OCSPResponse {
sigAlgId = null; sigAlgId = null;
signature = null; signature = null;
tbsResponseData = null; tbsResponseData = null;
responderName = null;
responderKey = null;
responseNonce = null; responseNonce = null;
return; return;
} }
...@@ -268,15 +264,17 @@ public final class OCSPResponse { ...@@ -268,15 +264,17 @@ public final class OCSPResponse {
// responderID // responderID
short tag = (byte)(seq.tag & 0x1f); short tag = (byte)(seq.tag & 0x1f);
if (tag == NAME_TAG) { if (tag == NAME_TAG) {
responderName =
new X500Principal(new ByteArrayInputStream(seq.toByteArray()));
if (debug != null) { if (debug != null) {
X500Principal responderName =
new X500Principal(seq.getData().toByteArray());
debug.println("OCSP Responder name: " + responderName); debug.println("OCSP Responder name: " + responderName);
} }
responderKey = null;
} else if (tag == KEY_TAG) { } else if (tag == KEY_TAG) {
responderKey = seq.getOctetString(); if (debug != null) {
responderName = null; byte[] responderKey = seq.getData().getOctetString();
debug.println("OCSP Responder key: " +
Debug.toString(responderKey));
}
} else { } else {
throw new IOException("Bad encoding in responderID element of " + throw new IOException("Bad encoding in responderID element of " +
"OCSP response: expected ASN.1 context specific tag 0 or 1"); "OCSP response: expected ASN.1 context specific tag 0 or 1");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册