}
}
protected OCSPReq buildRequest(final X509Certificate certificate, final X509Certificate issuer) throws CertificateEncodingException, IOException, OperatorCreationException, OCSPException {
OCSPReqBuilder builder = new OCSPReqBuilder();
DigestCalculatorProvider provider = new BcDigestCalculatorProvider();
X509CertificateHolder holder = new X509CertificateHolder(issuer.getEncoded());
CertificateID certificateID = new CertificateID(provider.get(CertificateID.HASH_SHA1), holder, certificate.getSerialNumber());
BigInteger nonce = BigInteger.valueOf(System.currentTimeMillis());
builder.addRequest(certificateID);
ExtensionsGenerator extensionsGenerator = new ExtensionsGenerator();
extensionsGenerator.addExtension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce, false, new DEROctetString(nonce.toByteArray()));