|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.spi.pki.PKIMessage
This class represents certification requests, responses to certification requests, or other messages passed between and among the end entity, certificate authority (CA) and registration authority (RA). It contains the PKI message information that is common to all message types. Not all of the fields of the class are used by every service provider or every message type.
Note: Objects that are passed to a constructor or method or returned from a method of this class are shared. No copy is made. If a copy is needed, make a copy of the object, either before passing it to a constructor or method of this class, or after getting it from a method of this class. Copyright © RSA Security Inc., 1999-2001. All rights reserved.
Field Summary |
|
static int |
WRAP_ENVELOPE
Indicates that the message is encrypted for the recipient. |
static int |
WRAP_ENVELOPE_THEN_SIGN
Indicates that the message is first encrypted for the recipient and then signed by the sender. |
static int |
WRAP_NONE
Indicates that the message is not cryptographically protected or signed by the sender. |
static int |
WRAP_SIGN
Indicates that the message is signed by the sender. |
static int |
WRAP_SIGN_THEN_ENVELOPE
Indicates that the message is first signed by the sender and then encrypted for the recipient. |
Constructor Summary |
|
PKIMessage()
Constructs an empty |
Method Summary |
|
getEncryptionName()
Returns the name of the content-encryption algorithm used to envelope a message. |
|
int[] |
getEncryptionParams()
Returns an array of parameters for the content-encryption algorithm used with enveloping. |
getExtraCerts()
Returns the extra certificates accompanying the message that may be useful to the recipient. |
|
CRL[] |
getExtraCRLs()
Returns the extra CRLs accompanying the message that may be useful to the recipient. |
String[] |
getFreeText()
Returns a list of text strings that contain context-specific information to accompany the message. |
getMessageTime()
Returns the time when the message was sent. |
|
getProviderData()
Returns provider-specific information associated with this message. |
|
getRecipient()
Returns information about the recipient of this message. |
|
getSender()
Returns information about the sender of this message. |
|
byte[] |
getTransactionID()
Returns the transaction ID of this object. |
int |
getVersion()
Returns the PKI protocol-specific version number associated with the encoded message format. |
int |
getWrapType()
Returns the flag value specifying the type of message protection to be performed. |
void |
setExtraCerts(Certificate[] extraCerts)
Sets the extra certificates of this object. |
void |
setExtraCRLs(CRL[] extraCRLs)
Sets the extra CRLs of this object. |
void |
setFreeText(String[] freeText)
Sets the free text of this object. |
void |
setMessageTime(Date messageTime)
Sets the time when the message was sent to the value given by the argument. |
void |
setProviderData(Object providerData)
Sets the provider data inside this object. |
void |
setTransactionID(byte[] transactionID)
Sets the transaction ID of this object. |
void |
setVersion(int version)
Sets the PKI protocol-specific version number of the encoded-message format to the value of version. |
void |
setWrapInfo(int wrapType,
SignerInfo sender,
RecipientInfo recipient,
String encryptionName,
int[] encryptionParams)
Populates this object with cryptographic wrapping information, such as signer information if a signature is used to protect the message. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int WRAP_NONE
public static final int WRAP_SIGN
public static final int WRAP_ENVELOPE
public static final int WRAP_SIGN_THEN_ENVELOPE
public static final int WRAP_ENVELOPE_THEN_SIGN
Constructor Detail |
public PKIMessage()
PKIMessage
object.
To populate this object with necessary information, use
setWrapInfo
, setTransactionID
,
setFreeText
, setExtraCerts
,
and setExtraCRLs
.See Also
setWrapInfo(int, com.rsa.certj.pkcs7.SignerInfo, com.rsa.certj.pkcs7.RecipientInfo, java.lang.String, int[])
setTransactionID(byte[])
setFreeText(java.lang.String[])
setExtraCerts(com.rsa.certj.cert.Certificate[])
setExtraCRLs(com.rsa.certj.cert.CRL[])
Method Detail |
public void setWrapInfo(int wrapType, SignerInfo sender, RecipientInfo recipient, String encryptionName, int[] encryptionParams)
Parameters
wrapType | An | ||
sender | A | ||
recipient | A | ||
encryptionName | A | ||
encryptionParams | An |
public int getWrapType()
PKI_MSGFLAGS_WRAP_*
values.
Returns
int
specifying the type of message
protection.public SignerInfo getSender()
Returns
SignerInfo
representing sender
information.public RecipientInfo getRecipient()
Returns
RecipientInfo
representing recipient
information.public String getEncryptionName()
Returns
String
that indicates the
content-encryption algorithm.public int[] getEncryptionParams()
Returns
int
array that contains the parameters
of the content-encryption algorithm.public int getVersion()
Returns
int
representing the version number of
the message format.public void setVersion(int version)
Parameters
version | An |
public Date getMessageTime()
Returns
Date
object representing the time when the
message was sent.public void setMessageTime(Date messageTime)
Parameters
messageTime | A |
public Object getProviderData()
Returns
Object
representing provider specific
information.public void setProviderData(Object providerData)
Parameters
providerData | An |
public byte[] getTransactionID()
Returns
byte
array representing the transaction
ID.public void setTransactionID(byte[] transactionID)
Parameters
transactionID | A |
public String[] getFreeText()
Returns
String
array that contains the free text found
in the message.public void setFreeText(String[] freeText)
Parameters
freeText | A |
public Certificate[] getExtraCerts()
Returns
Certificate
representing the
the extra certificates for this message.public void setExtraCerts(Certificate[] extraCerts)
Parameters
extraCerts | A |
public CRL[] getExtraCRLs()
Returns
CRL
array representing the
the extra CRLs for this message.public void setExtraCRLs(CRL[] extraCRLs)
Parameters
extraCRLs | A |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |