RSA BSAFE CERT-J

Certificate Management Components for Java

Javadoc Search  Print

PKIMessage Class Reference

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.

Inheritance diagram for PKIMessage:

PKIRequestMessage PKIResponseMessage CMPRequestCommon CMPResponseCommon CMPCertConfirmMessage CMPCertRequestCommon CMPRevokeRequestMessage CMPCertResponseCommon CMPConfirmMessage CMPErrorMessage CMPRevokeResponseMessage CMPCertRequestMessage CMPInitRequestMessage CMPKeyUpdateRequestMessage CMPCertResponseMessage CMPInitResponseMessage CMPKeyUpdateResponseMessage List of all members.

Public Methods

 PKIMessage ()
 Constructs an empty PKIMessage object. More...

void PKIMessage:: 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. More...

int PKIMessage:: getWrapType ()
 Returns the flag value specifying the type of message protection to be performed. More...

SignerInfo PKIMessage:: getSender ()
 Returns information about the sender of this message. More...

RecipientInfo PKIMessage:: getRecipient ()
 Returns information about the recipient of this message. More...

String PKIMessage:: getEncryptionName ()
 Returns the name of the content-encryption algorithm used to envelope a message. More...

int [] PKIMessage:: getEncryptionParams ()
 Returns an array of parameters for the content-encryption algorithm used with enveloping. More...

int PKIMessage:: getVersion ()
 Returns the PKI protocol-specific version number associated with the encoded message format. More...

void PKIMessage:: setVersion (int version)
 Sets the PKI protocol-specific version number of the encoded-message format to the value of version. More...

Date PKIMessage:: getMessageTime ()
 Returns the time when the message was sent. More...

void PKIMessage:: setMessageTime (Date messageTime)
 Sets the time when the message was sent to the value given by the argument. More...

Object PKIMessage:: getProviderData ()
 Returns provider-specific information associated with this message. More...

void PKIMessage:: setProviderData (Object providerData)
 Sets the provider data inside this object. More...

byte [] PKIMessage:: getTransactionID ()
 Returns the transaction ID of this object. More...

void PKIMessage:: setTransactionID (byte[] transactionID)
 Sets the transaction ID of this object. More...

String [] PKIMessage:: getFreeText ()
 Returns a list of text strings that contain context-specific information to accompany the message. More...

void PKIMessage:: setFreeText (String[] freeText)
 Sets the free text of this object. More...

Certificate [] PKIMessage:: getExtraCerts ()
 Returns the extra certificates accompanying the message that may be useful to the recipient. More...

void PKIMessage:: setExtraCerts (Certificate[] extraCerts)
 Sets the extra certificates of this object. More...

CRL [] PKIMessage:: getExtraCRLs ()
 Returns the extra CRLs accompanying the message that may be useful to the recipient. More...

void PKIMessage:: setExtraCRLs (CRL[] extraCRLs)
 Sets the extra CRLs of this object. More...


Static Public Attributes

final int PKIMessage:: WRAP_NONE
 Indicates that the message is not cryptographically protected or signed by the sender.

final int PKIMessage:: WRAP_SIGN
 Indicates that the message is signed by the sender.

final int PKIMessage:: WRAP_ENVELOPE
 Indicates that the message is encrypted for the recipient.

final int PKIMessage:: WRAP_SIGN_THEN_ENVELOPE
 Indicates that the message is first signed by the sender and then encrypted for the recipient. More...

final int PKIMessage:: WRAP_ENVELOPE_THEN_SIGN
 Indicates that the message is first encrypted for the recipient and then signed by the sender.


Constructor & Destructor Documentation

PKIMessage::PKIMessage   [inline];
 

Constructs an empty PKIMessage object. To populate this object with necessary information, use setWrapInfo, setTransactionID, setFreeText, setExtraCerts, and setExtraCRLs.

See also:
setWrapInfo , setTransactionID , setFreeText , setExtraCerts , setExtraCRLs


Member Function Documentation

String PKIMessage::getEncryptionName   [inline];
 

Returns the name of the content-encryption algorithm used to envelope a message.

Returns:
A String that indicates the content-encryption algorithm.

int [] PKIMessage::getEncryptionParams   [inline];
 

Returns an array of parameters for the content-encryption algorithm used with enveloping.

Returns:
An int array that contains the parameters of the content-encryption algorithm.

Certificate [] PKIMessage::getExtraCerts   [inline];
 

Returns the extra certificates accompanying the message that may be useful to the recipient.

Returns:
An array of Certificate representing the the extra certificates for this message.

CRL [] PKIMessage::getExtraCRLs   [inline];
 

Returns the extra CRLs accompanying the message that may be useful to the recipient.

Returns:
A CRL array representing the the extra CRLs for this message.

String [] PKIMessage::getFreeText   [inline];
 

Returns a list of text strings that contain context-specific information to accompany the message. The text is meant to be displayed to a user and can contain instructions or other information for that user. Usually, multiple text strings are present only when the same text has been translated into multiple languages. Each individual string contains the text in a single language.

Returns:
A String array that contains the free text found in the message.

Date PKIMessage::getMessageTime   [inline];
 

Returns the time when the message was sent.

Returns:
A Date object representing the time when the message was sent.

Object PKIMessage::getProviderData   [inline];
 

Returns provider-specific information associated with this message.

Returns:
An Object representing provider specific information.

RecipientInfo PKIMessage::getRecipient   [inline];
 

Returns information about the recipient of this message. It identifies the intended message recipient. It may also contain information about the key-encryption algorithm and key.

Returns:
A RecipientInfo representing recipient information.

SignerInfo PKIMessage::getSender   [inline];
 

Returns information about the sender of this message. If the message was signed, it may also contain information about the message-signature algorithms and attributes that accompany the signature.

Returns:
A SignerInfo representing sender information.

byte [] PKIMessage::getTransactionID   [inline];
 

Returns the transaction ID of this object. The transaction ID is used to associate request messages with the corresponding response messages.

Returns:
A byte array representing the transaction ID.

int PKIMessage::getVersion   [inline];
 

Returns the PKI protocol-specific version number associated with the encoded message format.

Returns:
An int representing the version number of the message format.

int PKIMessage::getWrapType   [inline];
 

Returns the flag value specifying the type of message protection to be performed. The value will be one of the PKI_MSGFLAGS_WRAP_* values.

Returns:
An int specifying the type of message protection.

void PKIMessage::setExtraCerts Certificate    extraCerts[] [inline];
 

Sets the extra certificates of this object.

Note: The extraCerts parameter does not necessarily contain a certification path. The recipient might have to sort, select from, or otherwise process the extra certificates to use them.

Parameters:
extraCerts A Certificate array that contains the extra certificates accompanying the message that might be useful to the recipient. For example, this can be used by a CA or RA to present the recipient with the certificates needed to verify its own new certificate, if the CA that issued the new certificate is not a root CA for the recipient.

void PKIMessage::setExtraCRLs CRL    extraCRLs[] [inline];
 

Sets the extra CRLs of this object.

Parameters:
extraCRLs A CRL array indicating the extra CRLs accompanying the message that may be useful to the recipient. For example, extraCRLs can be used by a CA or RA to present the recipient with the CRLs needed to verify its own new certificate.

void PKIMessage::setFreeText String    freeText[] [inline];
 

Sets the free text of this object.

Parameters:
freeText A String array indicating a list of text strings that contain context-specific information to accompany the message. The text is meant to be displayed to a user, and it can contain instructions or other information for that user. Usually, multiple text strings are present only when the same text has been translated into multiple languages. Each individual string contains the text in a single language.

void PKIMessage::setMessageTime Date    messageTime [inline];
 

Sets the time when the message was sent to the value given by the argument. Generally, the application is not required to set this field. It is usually set by the PKI messaging service provider when it encodes or decodes the message.

Parameters:
messageTime A Date representing the time when the message was sent.

void PKIMessage::setProviderData Object    providerData [inline];
 

Sets the provider data inside this object.

Parameters:
providerData An Object representing provider-specific information to be stored in this object.

void PKIMessage::setTransactionID byte    transactionID[] [inline];
 

Sets the transaction ID of this object.

  • When formulating a request message, the application is not generally required to set this field. It is usually set by the PKI messaging service provider when it encodes the message.
  • When formulating a response message, the application generally copies this field from the corresponding request message.
Parameters:
transactionID A byte array indicating the transaction identifier that is used to associate request messages with the corresponding response messages.

void PKIMessage::setVersion int    version [inline];
 

Sets the PKI protocol-specific version number of the encoded-message format to the value of version.

Note: Generally, the application is not required to set this field. It is usually set by the PKI messaging service provider when it encodes or decodes the message.

Parameters:
version An int representing the version number of the message format.

void PKIMessage::setWrapInfo int    wrapType,
SignerInfo    sender,
RecipientInfo    recipient,
String    encryptionName,
int    encryptionParams[]
[inline];
 

Populates this object with cryptographic wrapping information, such as signer information if a signature is used to protect the message.

Parameters:
wrapType An int indicating the type of message wrapping to be used.
sender A SignerInfo identifying the message sender if the message is signed. It contains information about the certificate of the signing key, the message-signature algorithms, and attributes accompanying the signature.
recipient A RecipientInfo identifying the intended message recipient. It may also contain information about the key-encryption algorithm and key.
encryptionName A String indicating the content-encryption algorithm to be used if symmetric encryption or enveloping is used to protect the message.
encryptionParams An int array that contains content-encryption parameters if symmetric encryption or enveloping is used to protect the message.


Member Data Documentation

final int PKIMessage::WRAP_SIGN_THEN_ENVELOPE [static]
 

Indicates that the message is first signed by the sender and then encrypted for the recipient. (The signature is included in the encrypted content.)


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