com.rsa.certj.provider.pki

Class CRSDebug

java.lang.Object
  |
  +--com.rsa.certj.Provider
        |
        +--com.rsa.certj.provider.pki.CRS
              |
              +--com.rsa.certj.provider.pki.CRSDebug
All Implemented Interfaces:
PKIDebug

public final class CRSDebug
extends CRS

This class facilitates debugging information that is collected while using the CRS class.

Copyright © RSA Security Inc., 2000-2001. All rights reserved.


Fields inherited from class com.rsa.certj.provider.pki.CRS
POP_TYPE_CSR
 

Constructor Summary

CRSDebug(String name, File configFile, File messageStore)

Constructs a CRS object, using a configFile that is given as a File.

 

Method Summary

 void

saveCertificate(PKIResponseMessage response)

Saves a certificate returned with the response message.

 void

saveData(byte[] data, String fileName)

Saves arbitrary data given in data into a file named fileName in the message storage directory.

 void

saveMessage(byte[] bytes, PKIMessage message, ProtectInfo protectInfo)

Saves a serialized message into a file in the directory specified in the constructor CRSDebug by messageStore.

 
Methods inherited from class com.rsa.certj.provider.pki.CRS
instantiate
 
Methods inherited from class com.rsa.certj.Provider
getName, getType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRSDebug

public CRSDebug(String name,
                File configFile,
                File messageStore)
         throws InvalidParameterException
Constructs a CRS object, using a configFile that is given as a File.

Parameters

         name  

A String specifying the name of this provider.

         configFile  

A File indicating the name of the file that contains the configuration information for this provider instance.

The contents of the resource pointed to by configFile are properties-style lines of text. The property names which this provider recognizes are dest, http.proxy, profile, and timeoutSecs.

dest specifies the location(s) of the OnSite CRS auto-responder(s).

http.proxy specifies the hostname:port of any HTTP proxies which may exist between the application and the CRS auto-responder.

profile specifies the particular CRS profile that is implemented by the responder, in anticipation that there may be subtle differences. The current implementation of this service provider has only been tested with the VeriSign OnSite responder, and its profile name has been chosen to be VeriSign. If this optional entry is left unspecified, it will default to VeriSign.

timeoutSecs specifies how many seconds the application should wait before giving up on socket communication.

For example, the contents of the configuration file might be:

    dest=http://onsite-admin.verisign.com/cgi-bin/crs.exe
    http.proxy=proxy1.mycompany.com:80
    http.proxy=proxy2.mycompany.com:80
    profile=VeriSign
    timoutSecs=3
 

         messageStore  

A File object indicating where to store CRS messages exchanged with a CRS server.

Throws

InvalidParameterException - If any argument is invalid.
Method Detail

saveMessage

public void saveMessage(byte[] bytes,
                        PKIMessage message,
                        ProtectInfo protectInfo)
                 throws PKIException
Saves a serialized message into a file in the directory specified in the constructor CRSDebug by messageStore. This method creates a descriptive filename.

Overrides

saveMessage in class CRS

Parameters

         bytes  

A byte array that contains a serialized request or response message to be saved.

         message  

A PKIMessage object contains information that corresponds to the serialized message.

         protectInfo  

A ProtectInfo object used to generate protection bites for the serialized message.

Throws

PKIException - If saving the message fails.

saveCertificate

public void saveCertificate(PKIResponseMessage response)
                     throws PKIException
Saves a certificate returned with the response message.

Overrides

saveCertificate in class CRS

Parameters

         response  

A PKIResponseMessage object with which a certificate may have returned.

Throws

PKIException - If saving the certificate returned fails.

saveData

public void saveData(byte[] data,
                     String fileName)
              throws PKIException
Saves arbitrary data given in data into a file named fileName in the message storage directory.

Overrides

saveData in class CRS

Parameters

         data  

A byte array to be stored into a file.

         fileName  

A String object indicating the name of the file where the data is stored.

Throws

PKIException - If saving the data fails.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000