예제 #1
0
  /** 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);
    }
  }
예제 #2
0
 /**
  * Return the DER encoding of the tbsResponseData field.
  *
  * @return DER encoding of tbsResponseData
  */
 public byte[] getTBSResponseData() {
   return resp.getTbsResponseData().getDEREncoded();
 }
예제 #3
0
 public BasicOCSPResp(BasicOCSPResponse resp) {
   this.resp = resp;
   this.data = resp.getTbsResponseData();
   this.extensions = resp.getTbsResponseData().getResponseExtensions();
 }