KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > protocol > ocsp > IOCSPExtension


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.protocol.ocsp;
15
16 import java.security.cert.X509Certificate JavaDoc;
17 import java.util.Hashtable JavaDoc;
18
19 import javax.servlet.ServletConfig JavaDoc;
20 import javax.servlet.http.HttpServletRequest JavaDoc;
21
22 import org.bouncycastle.ocsp.CertificateStatus;
23
24 /** Interface that must be implemented by OCSP extensions that are added to the OCSPServlet
25  *
26  * @author tomas
27  * @version $Id: IOCSPExtension.java,v 1.3 2006/02/08 07:31:47 anatom Exp $
28  * @see org.ejbca.ui.web.protocol.OCSPServlet
29  *
30  */

31 public interface IOCSPExtension {
32
33     /** Called after construction
34      *
35      * @param config ServletConfig that can be used to read init-params from web-xml
36      */

37     public void init(ServletConfig JavaDoc config);
38     
39     /** Called by OCSP responder when the configured extension is found in the request.
40      *
41      * @param request HttpServletRequest that can be used to find out information about caller, TLS certificate etc.
42      * @param cert X509Certificate the caller asked for in the OCSP request
43      * @return Hashtable with X509Extensions <String oid, X509Extension ext> that will be added to responseExtensions by OCSP responder, or null if an error occurs
44      */

45     public Hashtable JavaDoc process(HttpServletRequest JavaDoc request, X509Certificate JavaDoc cert, CertificateStatus status);
46     
47     /** Returns the last error that occured during process(), when process returns null
48      *
49      * @return error code as defined by implementing class
50      */

51     public int getLastErrorCode();
52 }
53
Popular Tags