final BasicOCSPRespGenerator ocsprespgen = ((OCSPCAServiceRequest)request).getOCSPrespGenerator(); final String sigAlg = ((OCSPCAServiceRequest)request).getSigAlg();
final BasicOCSPRespGenerator ocsprespgen = (request).getOCSPrespGenerator(); final String sigAlg = (request).getSigAlg();
        OCSPCAServiceResponse sign( OCSPCAServiceRequest request) throws ExtendedCAServiceRequestException {            final BasicOCSPRespGenerator ocsprespgen = ((OCSPCAServiceRequest)request).getOCSPrespGenerator();            final String sigAlg = ((OCSPCAServiceRequest)request).getSigAlg();            m_log.debug("signing algorithm: "+sigAlg);            final X509Certificate[] chain = ((OCSPCAServiceRequest)request).includeChain() ? mChain : null;            try {                final BasicOCSPResp ocspresp = ocsprespgen.generate(sigAlg, mKey, chain, new Date(), "BC" );                m_log.debug("The OCSP response is "                            + (ocspresp.verify(chain[0].getPublicKey(), "BC") ? "" : "NOT ") + "verifying.");                return new OCSPCAServiceResponse(ocspresp, chain == null ? null : Arrays.asList(chain));                         } catch (OCSPException ocspe) {                throw new ExtendedCAServiceRequestException(ocspe);            } catch (NoSuchProviderException nspe) {                throw new ExtendedCAServiceRequestException(nspe);                        }        }