| 
 | Oracle Fusion Middleware PKI SDK CMP Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10666-03 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
   oracle.security.crypto.cmp.PKIMessageHeader
oracle.security.crypto.cmp.PKIMessageHeader
public class PKIMessageHeader
The header structure for a CMP message. The header must, at a minimum, contain the sender name, recipient name and CMP version; all other fields are optional.
| Constructor Summary | |
|---|---|
| PKIMessageHeader()Creates a new, empty PKIMessageHeader. | |
| PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender, oracle.security.crypto.cert.GeneralName recipient)Create a new PKIMessageHeaderwith the given sender and recipient names, and the default versionPKIMessage.Version.CMP2000. | |
| PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender, oracle.security.crypto.cert.GeneralName recipient, PKIMessage.Version version)Create a new PKIMessageHeaderwith the given sender and recipient names and CMP version. | |
| PKIMessageHeader(java.io.InputStream is) | |
| Method Summary | |
|---|---|
|  void | addFreeText(java.lang.String text) | 
|  void | addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type) | 
|  void | addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value) | 
|  void | addGeneralInfo(InfoTypeAndValue info) | 
|  byte[] | generateSenderNonce()Generates and sets a random 128-bit sender nonce. | 
|  java.util.Vector | getFreeText() | 
|  oracle.security.crypto.cert.AttributeTypeAndValueList | getGeneralInfo() | 
|  java.util.Date | getMessageTime() | 
|  oracle.security.crypto.core.AlgorithmIdentifier | getProtectionAlgID() | 
|  oracle.security.crypto.cert.GeneralName | getRecipient() | 
|  byte[] | getRecipKID() | 
|  byte[] | getRecipNonce() | 
|  oracle.security.crypto.cert.GeneralName | getSender() | 
|  byte[] | getSenderKID() | 
|  byte[] | getSenderNonce() | 
|  byte[] | getTransactionID() | 
|  PKIMessage.Version | getVersion() | 
|  void | input(java.io.InputStream is) | 
|  int | length() | 
|  void | output(java.io.OutputStream os) | 
|  void | setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier macAlgID, byte[] password)Sets up message protection using a password-based MAC value, for the given PBMacAlgID. | 
|  void | setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier sigAlgID, java.security.PrivateKey privKey)Sets up message protection using a signature value. | 
|  void | setMessageProtection(byte[] password)Sets up message protection using a password-based MAC value, with the default PBMacAlgIDparamter values. | 
|  void | setMessageProtection(java.security.PrivateKey privKey)Sets up message protection using a signature value, with the default signature algorithm for the given key. | 
|  void | setMessageTime(java.util.Date messageTime) | 
|  void | setRecipKID(byte[] recipKID) | 
|  void | setRecipNonce(byte[] recipNonce) | 
|  void | setSenderKID(byte[] senderKID) | 
|  void | setSenderNonce(byte[] senderNonce) | 
|  void | setTransactionID(byte[] transactionID) | 
|  java.lang.String | toString() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public PKIMessageHeader()
PKIMessageHeader. Since a valid instance must have the sender, recipient and version defined, this constructor is intended primarily for use in conjuntion with the input(java.io.InputStream) method.
public PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender,
                        oracle.security.crypto.cert.GeneralName recipient)
PKIMessageHeader with the given sender and recipient names, and the default version PKIMessage.Version.CMP2000.
public PKIMessageHeader(oracle.security.crypto.cert.GeneralName sender,
                        oracle.security.crypto.cert.GeneralName recipient,
                        PKIMessage.Version version)
PKIMessageHeader with the given sender and recipient names and CMP version.
PKIMessage.Version
public PKIMessageHeader(java.io.InputStream is)
                 throws java.io.IOException
java.io.IOException| Method Detail | 
|---|
public oracle.security.crypto.cert.GeneralName getSender()
public oracle.security.crypto.cert.GeneralName getRecipient()
public PKIMessage.Version getVersion()
public void setMessageTime(java.util.Date messageTime)
public java.util.Date getMessageTime()
public void setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier macAlgID,
                                 byte[] password)
                          throws oracle.security.crypto.core.AlgorithmIdentifierException
PBMacAlgID.macAlgID - The MAC algorithm identifier for message protection. Must be oracle.security.crypto.core.PBMacAlgID.password - The password for the password-based MAC.oracle.security.crypto.core.AlgorithmIdentifierException
public void setMessageProtection(byte[] password)
                          throws oracle.security.crypto.core.AlgorithmIdentifierException
PBMacAlgID paramter values.oracle.security.crypto.core.AlgorithmIdentifierException
public void setMessageProtection(oracle.security.crypto.core.AlgorithmIdentifier sigAlgID,
                                 java.security.PrivateKey privKey)
                          throws java.security.NoSuchAlgorithmException,
                                 java.security.InvalidKeyException
Note the changes in the method signature
Previously public void setMessageProtection (AlgorithmIdentifier, oracle.security.crypto.core.PrivateKey )
Now public void setMessageProtection (AlgorithmIdentifier , java.security.PrivateKey )
Note the changes in the exceptions thrown
Exceptions no longer thrown -- AlgorithmIdentifierException
Exceptions introduced -- NoSuchAlgorithmException, java.security.InvalidKeyException
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyException
public void setMessageProtection(java.security.PrivateKey privKey)
                          throws java.security.NoSuchAlgorithmException,
                                 java.security.InvalidKeyException
Note the changes in the method signature
Previously public void setMessageProtection (oracle.security.crypto.core.PrivateKey )
Now public void setMessageProtection (java.security.PrivateKey )
Note the changes in the exceptions thrown
Exceptions no longer thrown -- AlgorithmIdentifierException
Exceptions introduced -- NoSuchAlgorithmException, java.security.InvalidKeyException
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionpublic oracle.security.crypto.core.AlgorithmIdentifier getProtectionAlgID()
public void setSenderKID(byte[] senderKID)
public byte[] getSenderKID()
public void setRecipKID(byte[] recipKID)
public byte[] getRecipKID()
public void setTransactionID(byte[] transactionID)
public byte[] getTransactionID()
public void setSenderNonce(byte[] senderNonce)
public byte[] generateSenderNonce()
                           throws java.security.NoSuchAlgorithmException
Note the changes in the exceptions thrown
Exceptions introduced -- NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic byte[] getSenderNonce()
public void setRecipNonce(byte[] recipNonce)
public byte[] getRecipNonce()
public void addFreeText(java.lang.String text)
public java.util.Vector getFreeText()
public void addGeneralInfo(InfoTypeAndValue info)
public void addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type,
                           oracle.security.crypto.asn1.ASN1Object value)
public void addGeneralInfo(oracle.security.crypto.asn1.ASN1ObjectID type)
public oracle.security.crypto.cert.AttributeTypeAndValueList getGeneralInfo()
public java.lang.String toString()
toString in class java.lang.Object
public void input(java.io.InputStream is)
           throws java.io.IOException
input in interface oracle.security.crypto.util.Streamablejava.io.IOException
public void output(java.io.OutputStream os)
            throws java.io.IOException
output in interface oracle.security.crypto.util.Streamablejava.io.IOExceptionpublic int length()
length in interface oracle.security.crypto.util.Streamable| 
 | Oracle Fusion Middleware PKI SDK CMP Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10666-03 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||