demo.x509.ocsp
Class OCSPServer

java.lang.Object
  |
  +--demo.x509.ocsp.OCSPServer

public class OCSPServer
extends Object

A simple OCSP server.

This server is part of the IAIK OCSP client - server demo. When starting this server, it listens on port 9999 for OCSP requests which may be sent by the IAIK OCSP demo client. For each request posted an {@demo.x509.ocsp.OCSPServerThread OCSPServerThread} is created for handling the request.

The keys and certificates required for this demo are obtained from the IAIK-JCE demo keystore "jce.keystore" which may be generated by running the {@link demo.keystore.SetupKeyStore SetupKeyStore} program.

If you do not want to use the keys and certs from the demo keystore, you can use a {@link iaik.x509.ocsp.utils.ResponseGenerator ResponseGenerator} to be initialized by a CRL and key and cert of the response signer. For doing so you first have to create a response generator repository of cached single responses and write it to a file:

 java demo.ocsp.OCSPServer pkcs12File password crlFile [crlIssuerCert] outputFile
 
where pkcs12File holds key and certs of the response signer, password is the password to be used for decrypting the PKCS12 object, crlFile contains the CRL from which to precompute single responses, crlIssuerCert supplies the cert of the crl issuer (only required when different from the response signer, and outputFile is the file to which to write the response generator output (see {@link iaik.x509.ocsp.utils.ResponseGenerator ResponseGenerator} for more information about the response generator operation modes.

After having created a response generator repository file you can use it for initializing this server to respond to client requests:

 java demo.ocsp.OCSPServer pkcs12File password generatorContentFile
 
where pkcs12File and password have the same meaning as above, and generatorContentFile is the file created from above (named outputFile holding the single responses created from the crl.

Version:
File Revision 15
See Also:
OCSPServerThread, OCSPClient, HttpOCSPClient, ResponseGenerator

Field Summary
static boolean DEBUG
           
 
Constructor Summary
OCSPServer(ResponseGenerator responseGenerator, AlgorithmID signatureAlgorithm)
          Creates an OCSP server for the supplied OCSP object.
 
Method Summary
static void main(String[] args)
          The main method.
static void main0(String[] args)
          Starts the test.
 void start()
          Stars the OCSP Server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Constructor Detail

OCSPServer

public OCSPServer(ResponseGenerator responseGenerator,
                  AlgorithmID signatureAlgorithm)
Creates an OCSP server for the supplied OCSP object.
Parameters:
responseGenerator - a ResponseGenerator object used for request parsing and response creation tasks
signatureAlgorithm - the algorithm used for signing the response
Method Detail

start

public void start()
Stars the OCSP Server.

main0

public static void main0(String[] args)
                  throws Exception
Starts the test.

main

public static void main(String[] args)
The main method.

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK