com.rsa.certj.provider.pki.cmp

Class CMPDebug

java.lang.Object
  |
  +--com.rsa.certj.Provider
        |
        +--com.rsa.certj.provider.pki.cmp.CMP
              |
              +--com.rsa.certj.provider.pki.cmp.CMPDebug
All Implemented Interfaces:
PKIDebug

public final class CMPDebug
extends CMP

This class collects debugging information while using the CMP class.

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


Fields inherited from class com.rsa.certj.provider.pki.cmp.CMP
CMP1999, CMP2000, CMPTCP_ERROR_CLIENT, CMPTCP_ERROR_MSGTYPE, CMPTCP_ERROR_NONE, CMPTCP_ERROR_POLLID, CMPTCP_ERROR_SERVER, CMPTCP_ERROR_VERSION, CMPTCP_FLAGS_CLOSE_CONN, CMPTCP_FLAGS_NO_AUTOPOLL, DEFAULT_CMPTCP_PORT
 

Constructor Summary

CMPDebug(String name, File configFile, File messageStore)

Constructs a CMPDebug 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[] messageBytes, PKIMessage message, ProtectInfo protectInfo)

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

 
Methods inherited from class com.rsa.certj.provider.pki.cmp.CMP
instantiate, setCMPTCPOptions
 
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

CMPDebug

public CMPDebug(String name,
                File configFile,
                File messageStore)
         throws InvalidParameterException
Constructs a CMPDebug 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 is used to specify the location(s) of the OnSite CMP auto-responder(s).

http.proxy is used to specify the hostname:port of any HTTP proxies which may exist between the application and the CMP auto-responder.

profile is used to specify the particular CMP profile that is implemented by the responder, in anticipation that there may be subtle differences.

timeoutSecs is used to specify how many seconds the application should wait before giving up on socket communication.

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

    dest=cmptcp://myserver:892
    http.proxy=proxy1.mycompany.com:80
    http.proxy=proxy2.mycompany.com:80
    profile=Keon
    timoutSecs=3
 

         messageStore  

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

Throws

InvalidParameterException - If any argument is invalid.
Method Detail

saveMessage

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

Overrides

saveMessage in class CMP

Parameters

         messageBytes  

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

CMPException - If saving the message fails.

saveCertificate

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

Overrides

saveCertificate in class CMP

Parameters

         response  

A PKIResponseMessage object with which a certificate may have returned.

Throws

CMPException - If saving the certificate returned fails.

saveData

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

Overrides

saveData in class CMP

Parameters

         data  

A byte array to be stored into a file.

         fileName  

A String object indicating the name of the file to be used to store the data.

Throws

CMPException - If saving the data fails.


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