|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.Provider | +--com.rsa.certj.provider.pki.cmp.CMP
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.
Copyright © RSA Security Inc., 2000-2001. All rights reserved.
Field Summary |
|
static int |
CMP1999
Indicates CMP version 1, which is not supported. |
static int |
CMP2000
Indicates CMP version 2, which is the supported version. |
static int |
CMPTCP_ERROR_CLIENT
Indicates a client-side error. |
static int |
CMPTCP_ERROR_MSGTYPE
Indicates that the type of a message is wrong. |
static int |
CMPTCP_ERROR_NONE
Indicates that no error has occurred. |
static int |
CMPTCP_ERROR_POLLID
Indicates the poll ID is invalid. |
static int |
CMPTCP_ERROR_SERVER
Indicates a server-side error. |
static int |
CMPTCP_ERROR_VERSION
Indicates that CMP version is wrong. |
static int |
CMPTCP_FLAGS_CLOSE_CONN
Indicates that it will ask the server to close the connection after it sends a response. |
static int |
CMPTCP_FLAGS_NO_AUTOPOLL
Indicates that it does not send a polling request message when a polling response message is received from the server. |
static int |
DEFAULT_CMPTCP_PORT
Indicates the default value used for a cmptcp port. |
Constructor Summary |
|
CMP(String name,
File configFile)
Constructs a |
|
CMP(String name,
InputStream configStream)
Constructs a |
|
CMP(String name,
String configFileName)
Constructs a |
Method Summary |
|
instantiate(CertJ certJ)
Creates a |
|
void |
saveCertificate(PKIResponseMessage response)
Does not do anything. |
void |
saveData(byte[] data,
String fileName)
Does not do anything. |
void |
saveMessage(byte[] bytes,
PKIMessage message,
ProtectInfo protectInfo)
Does not do anything. |
void |
setCMPTCPOptions(int cmptcpFlags,
int pollDuration)
Sets cmptcp protocol specific options. |
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 |
Field Detail |
public static final int CMP1999
public static final int CMP2000
public static final int DEFAULT_CMPTCP_PORT
public static final int CMPTCP_ERROR_NONE
public static final int CMPTCP_ERROR_VERSION
public static final int CMPTCP_ERROR_CLIENT
public static final int CMPTCP_ERROR_MSGTYPE
public static final int CMPTCP_ERROR_POLLID
public static final int CMPTCP_ERROR_SERVER
public static final int CMPTCP_FLAGS_CLOSE_CONN
public static final int CMPTCP_FLAGS_NO_AUTOPOLL
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.Constructor Detail |
public CMP(String name, InputStream configStream) throws InvalidParameterException
CMP
object, using a
configStream that is given as an
InputStream
.Parameters
name | A | ||
configStream | An 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 |
Throws
InvalidParameterException
- If any
argument is invalid.public CMP(String name, File configFile) throws InvalidParameterException
CMP
object, using a
configFile that is given as a File
.Parameters
name | A | ||
configFile | A 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 |
Throws
InvalidParameterException
- If any
argument is invalid.public CMP(String name, String configFileName) throws InvalidParameterException
CMP
object using a
configFileName that is given as a String
.Parameters
name | A | ||
configFileName | A 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 |
Throws
InvalidParameterException
- If any
argument is invalid.Method Detail |
public void setCMPTCPOptions(int cmptcpFlags, int pollDuration)
Parameters
cmptcpFlags | An | ||
pollDuration | An |
public ProviderImplementation instantiate(CertJ certJ) throws ProviderManagementException
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.Overrides
instantiate
in class Provider
Parameters
certJ | A |
Returns
ProviderImplementation
object that
provides the SPI implementations for CMP PKI providers.
Throws
ProviderManagementException
- If
instantiation of the CMP PKI provider fails.public void saveMessage(byte[] bytes, PKIMessage message, ProtectInfo protectInfo) throws CMPException
saveMessage
in interface PKIDebug
Parameters
bytes | A | ||
message | A | ||
protectInfo | A |
Throws
CMPException
- If saving the message
fails.public void saveCertificate(PKIResponseMessage response) throws CMPException
saveCertificate
in interface PKIDebug
Parameters
response | A |
Throws
CMPException
- If saving the certificate
returned fails.public void saveData(byte[] data, String fileName) throws CMPException
saveData
in interface PKIDebug
Parameters
data | A | ||
fileName | A |
Throws
CMPException
- If saving the data
fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |