public ExtendedCAServiceResponse extendedService(ExtendedCAServiceRequest request) throws IllegalExtendedCAServiceRequestException,ExtendedCAServiceNotActiveException { if(!(request instanceof OCSPCAServiceRequest)) throw new IllegalExtendedCAServiceRequestException(); if(this.getStatus() != ExtendedCAServiceInfo.STATUS_ACTIVE) throw new ExtendedCAServiceNotActiveException();
public ExtendedCAServiceResponse extendedService(ExtendedCAServiceRequest request) throws ExtendedCAServiceRequestException, IllegalExtendedCAServiceRequestException,ExtendedCAServiceNotActiveException { if (!(request instanceof OCSPCAServiceRequest)) { throw new IllegalExtendedCAServiceRequestException(); } if (this.getStatus() != ExtendedCAServiceInfo.STATUS_ACTIVE) { throw new ExtendedCAServiceNotActiveException(); } ExtendedCAServiceResponse returnval = null; BasicOCSPRespGenerator ocsprespgen = ((OCSPCAServiceRequest)request).getOCSPrespGenerator(); String sigAlg = ((OCSPCAServiceRequest)request).getSigAlg(); X509Certificate[] chain = (X509Certificate[])this.ocspcertificatechain.toArray(new X509Certificate[0]); try { BasicOCSPResp ocspresp = ocsprespgen.generate(sigAlg, this.ocspsigningkey, chain, new Date(), "BC" ); returnval = new OCSPCAServiceResponse(ocspresp, Arrays.asList(chain)); } catch (OCSPException ocspe) { throw new ExtendedCAServiceRequestException(ocspe); } catch (NoSuchProviderException nspe) { throw new ExtendedCAServiceRequestException(nspe); }
	public ExtendedCAServiceResponse extendedService(ExtendedCAServiceRequest request) throws IllegalExtendedCAServiceRequestException,ExtendedCAServiceNotActiveException {		if(!(request instanceof OCSPCAServiceRequest))		  throw new IllegalExtendedCAServiceRequestException();        if(this.getStatus() != ExtendedCAServiceInfo.STATUS_ACTIVE)          throw new ExtendedCAServiceNotActiveException();  		  				  				return (ExtendedCAServiceResponse) new OCSPCAServiceResponse(this.ocspcertificatechain,this.ocspsigningkey);	}