demo.x509.ocsp
Class OCSPClient

java.lang.Object
  |
  +--demo.x509.ocsp.OCSP
        |
        +--demo.x509.ocsp.OCSPClient

public class OCSPClient
extends OCSP

A simple OCSP client.

This client is part of the IAIK OCSP client - server demo.

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 SetupKeyStore program.
This class extends the OCSP class for using its request creation/response parsing methods.

If you want to connect to another OCSP server than the IAIK OCSP demo server (listening on localhost, port 9999) you may specify the URL of the server and the target cert chain to be asked for revocation status when starting the client:

 java  OCSPClient [responderUrl targetCertsFile]
 
The certs given in the target cert file may be in X.509 or PKCS#7 format and shall contain the target cert at index 0.

If you want to send a signed request, you additionally may specify the PKCS#12 from where to read certs and key for signing the request:

 java  OCSPClient [responderUrl targetCertsFile [pkcs12File password]]
 

Version:
File Revision 15
See Also:
OCSPServer, OCSPServerThread, OCSP

Constructor Summary
OCSPClient()
          Default constructor.
 
Method Summary
static void main(String[] argv)
          The main method.
 void start(String[] argv)
          Starts the OCSP client.
 
Methods inherited from class demo.x509.ocsp.OCSP
createOCSPRequest, createOCSPRequest, createOCSPResponse, parseOCSPResponse, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OCSPClient

public OCSPClient()
           throws IOException
Default constructor. Reads required keys and certificates from the dem keystore.
Throws:
IOException - if an error occurs when loading the keystore
Method Detail

start

public void start(String[] argv)
           throws OCSPException
Starts the OCSP client. If responder URL and target cert file have not been supplied via command line, a request is created for the the target certs read from the demo keystore and posted to http://localhost:9999 where the IAIK OCSP demo server is assumed to listen.
Parameters:
argv[] - responder URL and target cert file or null if connecting to localhost and reading target certs from the keystore

main

public static void main(String[] argv)
                 throws Exception
The main method. Starts the client.
Parameters:
argv[] - responder URL and target cert file or null if connecting to localhost and reading target certs from the keystore
Throws:
Exception - if an error occurs when reading required keys and certificates from files

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