private TestResult unsignedRequest() { try { ASN1InputStream aIn = new ASN1InputStream(new ByteArrayInputStream(unsignedReq)); OCSPRequest req = OCSPRequest.getInstance(aIn.readObject()); if (!isSameAs(req.getEncoded(), unsignedReq)) { return new SimpleTestResult(false, getName() + ": OCSP unsigned request failed to re-encode"); } return new SimpleTestResult(true, getName() + ": Okay"); } catch (Exception e) { return new SimpleTestResult(false, getName() + ": failed unsigned exception - " + e.toString(), e); } }
private TestResult signedRequest() { try { ASN1InputStream aIn = new ASN1InputStream(new ByteArrayInputStream(signedReq)); OCSPRequest req = OCSPRequest.getInstance(aIn.readObject()); if (!isSameAs(req.getEncoded(), signedReq)) { return new SimpleTestResult(false, getName() + ": OCSP signed request failed to re-encode"); } return new SimpleTestResult(true, getName() + ": Okay"); } catch (Exception e) { return new SimpleTestResult(false, getName() + ": failed signed exception - " + e.toString(), e); } }
public OCSPReq( OCSPRequest req) { this.req = req; this.extensions = req.getTbsRequest().getRequestExtensions(); }
public OCSPReq( OCSPRequest req) { this.req = req; }