KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > model > ca > caadmin > extendedcaservices > OCSPCAServiceResponse


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13  
14 package org.ejbca.core.model.ca.caadmin.extendedcaservices;
15
16 import java.io.Serializable JavaDoc;
17 import java.security.cert.X509Certificate JavaDoc;
18 import java.util.ArrayList JavaDoc;
19 import java.util.Collection JavaDoc;
20 import java.util.List JavaDoc;
21
22 import org.bouncycastle.ocsp.BasicOCSPResp;
23
24 /**
25  * Class used when delevering OCSP service response from a CA.
26  *
27  * @version $Id: OCSPCAServiceResponse.java,v 1.1 2006/01/17 20:30:56 anatom Exp $
28  */

29 public class OCSPCAServiceResponse extends ExtendedCAServiceResponse implements Serializable JavaDoc {
30              
31     private List JavaDoc ocspcertificatechain = null;
32     private BasicOCSPResp basicResp = null;
33     
34         
35     public OCSPCAServiceResponse(BasicOCSPResp basicResp, List JavaDoc ocspsigningcertificatechain) {
36         this.basicResp = basicResp;
37         this.ocspcertificatechain = ocspsigningcertificatechain;
38     }
39            
40     public X509Certificate JavaDoc getOCSPSigningCertificate() { return (X509Certificate JavaDoc) this.ocspcertificatechain.get(0); }
41     public Collection JavaDoc getOCSPSigningCertificateChain() {
42         if (ocspcertificatechain != null) {
43             return this.ocspcertificatechain;
44         }
45         return new ArrayList JavaDoc();
46     }
47     public BasicOCSPResp getBasicOCSPResp() { return this.basicResp; }
48         
49 }
50
Popular Tags