RSA BSAFE CERT-J

Certificate Management Components for Java

Javadoc Search  Print

CMP Class Reference

This class provides the necessary functionality to send certificate requests to and receive certificate responses from a CA which implements CMP as its protocol access mechanism.

In the current release, CMP PKI Service Provider will only support the following nine types of PKI messages: ir, ip, cr, cp, rr, rp, certconf, pkiconf and error.

Inheritance diagram for CMP:

Provider PKIDebug CMPDebug List of all members.

Public Methods

 CMP (String name, InputStream configStream) throws InvalidParameterException
 Constructs a CMP object, using a configStream that is given as an InputStream. More...

 CMP (String name, File configFile) throws InvalidParameterException
 Constructs a CMP object, using a configFile that is given as a File. More...

 CMP (String name, String configFileName) throws InvalidParameterException
 Constructs a CMP object using a configFileName that is given as a String. More...

synchronized void CMP:: setCMPTCPOptions (int cmptcpFlags, int pollDuration)
 Sets cmptcp protocol specific options. More...

ProviderImplementation CMP:: instantiate (CertJ certJ) throws ProviderManagementException
 Creates a ProviderImplementation object that handles CMP PKI SPI methods. More...

void CMP:: saveMessage (byte[] bytes, PKIMessage message, ProtectInfo protectInfo) throws CMPException
 Does not do anything. More...

void CMP:: saveCertificate (PKIResponseMessage response) throws CMPException
 Does not do anything. More...

void CMP:: saveData (byte[] data, String fileName) throws CMPException
 Does not do anything. More...


Static Public Attributes

final int CMP:: CMP1999
 Indicates CMP version 1, which is not supported.

final int CMP:: CMP2000
 Indicates CMP version 2, which is the supported version.

final int CMP:: DEFAULT_CMPTCP_PORT
 Indicates the default value used for a cmptcp port.

final int CMP:: CMPTCP_ERROR_NONE
 Indicates that no error has occurred.

final int CMP:: CMPTCP_ERROR_VERSION
 Indicates that CMP version is wrong.

final int CMP:: CMPTCP_ERROR_CLIENT
 Indicates a client-side error.

final int CMP:: CMPTCP_ERROR_MSGTYPE
 Indicates that the type of a message is wrong.

final int CMP:: CMPTCP_ERROR_POLLID
 Indicates the poll ID is invalid.

final int CMP:: CMPTCP_ERROR_SERVER
 Indicates a server-side error.

final int CMP:: CMPTCP_FLAGS_CLOSE_CONN
 Indicates that it will ask the server to close the connection after it sends a response. More...

final int CMP:: CMPTCP_FLAGS_NO_AUTOPOLL
 Indicates that it does not send a polling request message when a polling response message is received from the server. More...


Static Protected Methods

byte [] CMP:: derEncodeProtectedPart (byte[] headerDER, int headerOffset, int headerLen, byte[] bodyDER, int bodyOffset, int bodyLen) throws CMPException
 PKIProtection ::= BIT STRING ProtectedPart ::= SEQUENCE { header PKIHeader, body PKIBody }.


Static Protected Attributes

final byte [] CMP:: PASSWORD_BASED_MAC_OID
 PasswordBasedMac ::= OBJECT IDENTIFIER --{1 2 840 113533 7 66 13}.


Constructor & Destructor Documentation

CMP::CMP String    name,
InputStream    configStream
throws InvalidParameterException [inline];
 

Constructs a CMP object, using a configStream that is given as an InputStream.

Parameters:
name A String specifying the name of this provider.
configStream An InputStream indicating the stream that contains the configuration information for this provider instance.

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

dest is used to specify the location(s) of the OnSite CMP auto-responder(s).

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
                                            profile=Keon
                                            timoutSecs=3
                                         

Exceptions:
InvalidParameterException If any argument is invalid.

CMP::CMP String    name,
File    configFile
throws InvalidParameterException [inline];
 

Constructs a CMP 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, profile, and timeoutSecs.

dest is used to specify the location(s) of the OnSite CMP auto-responder(s).

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
                                        profile=Keon
                                        timoutSecs=3
                                     

Exceptions:
InvalidParameterException If any argument is invalid.

CMP::CMP String    name,
String    configFileName
throws InvalidParameterException [inline];
 

Constructs a CMP object using a configFileName that is given as a String.

Parameters:
name A String specifying the name of this provider.
configFileName A String indicating the name of the file that contains the configuration information for this provider instance.

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

dest is used to specify the location(s) of the OnSite CMP auto-responder(s).

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
                                                profile=Keon
                                                timoutSecs=3
                                             

Exceptions:
InvalidParameterException If any argument is invalid.


Member Function Documentation

ProviderImplementation CMP::instantiate CertJ    certJ throws ProviderManagementException [inline];
 

Creates a ProviderImplementation object that handles CMP PKI SPI methods. This method is called by CertJ.registerService when an object of the CMP class is being registered; application do not have to call this method.

Parameters:
certJ A CertJ object for which the created provider is registered.
Returns:
A ProviderImplementation object that provides the SPI implementations for CMP PKI providers.

Exceptions:
ProviderManagementException If instantiation of the CMP PKI provider fails.

Reimplemented from Provider.

void CMP::saveCertificate PKIResponseMessage    response throws CMPException [inline];
 

Does not do anything. It is a place holder for a subclass of this class that provide this method for debugging purposes.

Parameters:
response A PKIResponseMessage object with which a certificate may have returned.

Exceptions:
CMPException If saving the certificate returned fails.

Reimplemented in CMPDebug.

void CMP::saveData byte    data[],
String    fileName
throws CMPException [inline];
 

Does not do anything. It is a place holder for a subclass of this class that provide this method for debugging purposes.

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.

Exceptions:
CMPException If saving the data fails.

Reimplemented in CMPDebug.

void CMP::saveMessage byte    bytes[],
PKIMessage    message,
ProtectInfo    protectInfo
throws CMPException [inline];
 

Does not do anything. It is a place holder for a subclass of this class that provide this method for debugging purposes.

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.

Exceptions:
CMPException If saving the message fails.

Reimplemented in CMPDebug.

synchronized void CMP::setCMPTCPOptions int    cmptcpFlags,
int    pollDuration
[inline];
 

Sets cmptcp protocol specific options.

Parameters:
cmptcpFlags An int indicating options used when communicating over a cmptcp channel.
pollDuration An int indicating the duration of poll messages in seconds. After this amount of time has passed, no poll message will be sent. The application wishes to always send a poll message, provide a negative number.


Member Data Documentation

final int CMP::CMPTCP_FLAGS_CLOSE_CONN [static]
 

Indicates that it will ask the server to close the connection after it sends a response. If this flag is set, the performance may suffer due to extrat time needed to establish connection each time a request is sent.

final int CMP::CMPTCP_FLAGS_NO_AUTOPOLL [static]
 

Indicates that it does not send a polling request message when a polling response message is received from the server. If this flag is set, it will return a PKIResult object with a waiting status indicated. If this flag is not set, it will automatically send a polling request message to get a response back from the server.


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 001-047001-212-001-001 - 2.1.2