/** verify the signature against the tbsResponseData object we contain. */ public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws OCSPException { try { ContentVerifier verifier = verifierProvider.get(resp.getSignatureAlgorithm()); OutputStream vOut = verifier.getOutputStream(); vOut.write(resp.getTbsResponseData().getDEREncoded()); vOut.close(); return verifier.verify(this.getSignature()); } catch (Exception e) { throw new OCSPException("exception processing sig: " + e, e); } }
/** * Return the DER encoding of the tbsResponseData field. * * @return DER encoding of tbsResponseData */ public byte[] getTBSResponseData() { return resp.getTbsResponseData().getDEREncoded(); }
public BasicOCSPResp(BasicOCSPResponse resp) { this.resp = resp; this.data = resp.getTbsResponseData(); this.extensions = resp.getTbsResponseData().getResponseExtensions(); }