Skip navigation links

Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10677-04


oracle.security.crypto.tsp
Class TSPTimeStampResp

java.lang.Object
  extended by oracle.security.crypto.tsp.TSPMessage
      extended by oracle.security.crypto.tsp.TSPTimeStampResp

All Implemented Interfaces:
oracle.security.crypto.util.Streamable

public class TSPTimeStampResp
extends TSPMessage

A TSP message of type TimeStampResp as defined in RFC 3161.


Constructor Summary
TSPTimeStampResp()
          Creates a new TSPTimeStampResp object with no paramters initially set.
TSPTimeStampResp(java.io.InputStream is)
          Constructs a TSPTimeStampResp object by reading in a DER-encoded TimeStampResp message from the given input stream.
TSPTimeStampResp(java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgId, oracle.security.crypto.core.AlgorithmIdentifier digestEncryptionAlgId, oracle.security.crypto.cert.AttributeSet authAttr, oracle.security.crypto.cert.AttributeSet unauthAttr, boolean useSPKI64, oracle.security.crypto.cmp.PKIStatusInfo status, oracle.security.crypto.cms.TSTInfo tstInfo, boolean includeCert)
          Creates a new TSPTimeStampResp object initialized with the given parameters.

 

Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
protected  byte[] getEncoded()
           
 boolean getIncludeCert()
          Returns true if the TSA's certificate will be included in the timeStampToken upon output.
 MessageImprint getMessageImprint()
          Returns the messageImprint included in the timeStampToken, or null if no timeStampToken is present.
 java.security.cert.X509Certificate getSignerCert()
          Returns the TSA's public certificate, or null if no certificate is associated with this message.
 oracle.security.crypto.cms.CMSSignerInfo getSignerInfo()
          Gets the SigerInfo associated with the timeStampToken, or null if no timeStampToken is present.
 oracle.security.crypto.cmp.PKIStatusInfo getStatus()
          Returns the status field of this message.
 oracle.security.crypto.cms.CMSSignedDataContentInfo getTimeStampToken()
          Returns the timeStampToken included in this message, or null if no timeStampToken is present.
 oracle.security.crypto.cms.TSTInfo getTSTInfo()
          Returns the tstInfo object associated with this message, or null if no timeStampToken is included in the message.
protected  void parseMessage(byte[] data)
           
 void setIncludeCert(boolean b)
          Specifies whether the TSA's certificate will be included in the timeStampToken upon output.
 void setSigningParameters(java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgId, oracle.security.crypto.core.AlgorithmIdentifier digestEncryptionAlgId, oracle.security.crypto.cert.AttributeSet authenticatedAttributes, oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes, boolean useSPKI6)
          Sets the paramaters to be used to sign the timeStampToken associated with this message.
 void setStatus(oracle.security.crypto.cmp.PKIStatusInfo status)
          Sets the status field of this message.
 void setTSTInfo(oracle.security.crypto.cms.TSTInfo tstInfo)
          Sets the tstInfo object to be associated with this message.
 java.lang.String toString()
          Returns a string representation of this object.

 

Methods inherited from class oracle.security.crypto.tsp.TSPMessage
input, length, output

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

TSPTimeStampResp

public TSPTimeStampResp()
Creates a new TSPTimeStampResp object with no paramters initially set.

TSPTimeStampResp

public TSPTimeStampResp(java.security.PrivateKey signerKey,
                        java.security.cert.X509Certificate signerCert,
                        oracle.security.crypto.core.AlgorithmIdentifier digestAlgId,
                        oracle.security.crypto.core.AlgorithmIdentifier digestEncryptionAlgId,
                        oracle.security.crypto.cert.AttributeSet authAttr,
                        oracle.security.crypto.cert.AttributeSet unauthAttr,
                        boolean useSPKI64,
                        oracle.security.crypto.cmp.PKIStatusInfo status,
                        oracle.security.crypto.cms.TSTInfo tstInfo,
                        boolean includeCert)
                 throws TSPException
Creates a new TSPTimeStampResp object initialized with the given parameters.

Note the changes in the method signature

Previously public TSPTimeStampResp (oracle.security.crypto.core.PrivateKey , X509, AlgorithmIdentifier , AlgorithmIdentifier,AttributeSet, AttributeSet , boolean4, PKIStatusInfo, TSTInfo , boolean )

Now public TSPTimeStampResp (java.security.PrivateKey , X509Certificate, AlgorithmIdentifier , AlgorithmIdentifier,AttributeSet, AttributeSet , boolean4, PKIStatusInfo, TSTInfo , boolean )

Parameters:
signerKey - The TSA's private key.
signerCert - The TSA's public certificate.
digetsAlgID - The digest algorithm for the timeStampToken.
digestEncryptionAlgID - The digest encryption algorithm for the timeStampToken.
authAttr - The authenticated attributes of the timeStampToken.
unauthAttr - The unauthenticatedAttributes of the timeStampToken.
useSPKI - true uses a 64 bit SPKI; false uses a 160 bit SPKI
status - The PKIStatusInfo associated with this message.
tstInfo - The TSTInfo object to be included in the timeStampToken.
includeCert - If true, the TSA's certificate will be included in the timeStampToken.
Throws:
TSPException - If an error occurs contructing the message.

TSPTimeStampResp

public TSPTimeStampResp(java.io.InputStream is)
                 throws java.io.IOException
Constructs a TSPTimeStampResp object by reading in a DER-encoded TimeStampResp message from the given input stream.
Parameters:
is - The input stream.
Throws:
If - an I/O error occurs.
java.io.IOException

Method Detail

getStatus

public oracle.security.crypto.cmp.PKIStatusInfo getStatus()
Returns the status field of this message.

setStatus

public void setStatus(oracle.security.crypto.cmp.PKIStatusInfo status)
Sets the status field of this message.
Parameters:
status - The status.

getTSTInfo

public oracle.security.crypto.cms.TSTInfo getTSTInfo()
Returns the tstInfo object associated with this message, or null if no timeStampToken is included in the message.

setTSTInfo

public void setTSTInfo(oracle.security.crypto.cms.TSTInfo tstInfo)
                throws TSPException
Sets the tstInfo object to be associated with this message.
Parameters:
tstInfo - The TSTInfo object.
Throws:
TSPException

getIncludeCert

public boolean getIncludeCert()
Returns true if the TSA's certificate will be included in the timeStampToken upon output.

setIncludeCert

public void setIncludeCert(boolean b)
                    throws TSPException
Specifies whether the TSA's certificate will be included in the timeStampToken upon output.
Parameters:
b - If <coded>true</coded>, the certificate will be included.
Throws:
TSPException

getSignerInfo

public oracle.security.crypto.cms.CMSSignerInfo getSignerInfo()
                                                       throws TSPException
Gets the SigerInfo associated with the timeStampToken, or null if no timeStampToken is present.
Throws:
TSPException - If an error occurs obtaining the signer information.

getSignerCert

public java.security.cert.X509Certificate getSignerCert()
Returns the TSA's public certificate, or null if no certificate is associated with this message. Note : This method returns a java.security.X509Certificate and not an oracle.security.crypto.core.X509 object

setSigningParameters

public void setSigningParameters(java.security.PrivateKey signerKey,
                                 java.security.cert.X509Certificate signerCert,
                                 oracle.security.crypto.core.AlgorithmIdentifier digestAlgId,
                                 oracle.security.crypto.core.AlgorithmIdentifier digestEncryptionAlgId,
                                 oracle.security.crypto.cert.AttributeSet authenticatedAttributes,
                                 oracle.security.crypto.cert.AttributeSet unauthenticatedAttributes,
                                 boolean useSPKI6)
Sets the paramaters to be used to sign the timeStampToken associated with this message.

Note the changes in the method signature

Previously public void setSigningParameters (oracle.security.crypto.core.PrivateKey , X509e, AlgorithmIdentifier , AlgorithmIdentifier ,AttributeSet , AttributeSet , boolean )

Now public void setSigningParameters (java.security.PrivateKey , X509Certificate, AlgorithmIdentifier , AlgorithmIdentifier ,AttributeSet , AttributeSet , boolean )

Parameters:
signerKey - The TSA's private key.
signerCert - The TSA's public certificate.
digetsAlgID - The digest algorithm for the timeStampToken.
digestEncryptionAlgID - The digest encryption algorithm for the timeStampToken.
authAttr - The authenticated attributes of the timeStampToken.
unauthAttr - The unauthenticatedAttributes of the timeStampToken.
useSPKI - true uses a 64 bit SPKI; false uses a 160 bit SPKI

getMessageImprint

public MessageImprint getMessageImprint()
Returns the messageImprint included in the timeStampToken, or null if no timeStampToken is present.
Specified by:
getMessageImprint in class TSPMessage

getTimeStampToken

public oracle.security.crypto.cms.CMSSignedDataContentInfo getTimeStampToken()
Returns the timeStampToken included in this message, or null if no timeStampToken is present.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
o - The other object.

toString

public java.lang.String toString()
Returns a string representation of this object.
Overrides:
toString in class java.lang.Object

parseMessage

protected void parseMessage(byte[] data)
                     throws java.io.IOException
Specified by:
parseMessage in class TSPMessage
Throws:
java.io.IOException

getEncoded

protected byte[] getEncoded()
                     throws java.io.IOException
Specified by:
getEncoded in class TSPMessage
Throws:
java.io.IOException

Skip navigation links

Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10677-04


Copyright © 2005, 2011 , Oracle. All rights reserved.