private static OCSPReq generateOCSPRequest(X509Certificate issuerCert,BigInteger serialNumber) throws OCSPException, IOException, OperatorException, CertificateEncodingException {
  Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
  CertificateID id=SignUtils.generateCertificateId(issuerCert,serialNumber,CertificateID.HASH_SHA1);
  return SignUtils.generateOcspRequestWithNonce(id);
}

private static OCSPReq generateOCSPRequest ( X509Certificate issuerCert , BigInteger serialNumber ) throws OCSPException , IOException , OperatorException , CertificateEncodingException { Security . addProvider ( new org . bouncycastle . jce . provider . BouncyCastleProvider ( ) ) ; CertificateID id = SignUtils . generateCertificateId ( issuerCert , serialNumber , CertificateID . HASH_SHA1 ) ; return SignUtils . generateOcspRequestWithNonce ( id ) ; }
generates an ocsp request using bouncycastle .
