if (response.getStatus() != 0)
{
fail("response status not zero.");
}
BasicOCSPResp brep = (BasicOCSPResp)response.getResponseObject();
chain = brep.getCerts("BC");
if (!brep.verify(chain[0].getPublicKey(), "BC"))
{
fail("response 1 failed to verify.");
}
//
// test 2
//
SingleResp[] singleResp = brep.getResponses();
response = new OCSPResp(new ByteArrayInputStream(testResp2));
if (response.getStatus() != 0)
{
fail("response status not zero.");
}
brep = (BasicOCSPResp)response.getResponseObject();
chain = brep.getCerts("BC");
if (!brep.verify(chain[0].getPublicKey(), "BC"))
{
fail("response 2 failed to verify.");
}
singleResp = brep.getResponses();
//
// simple response generation
//
OCSPRespGenerator respGen = new OCSPRespGenerator();