CPKIFTSTInfo Class Reference

#include <TSTInfo.h>

Inheritance diagram for CPKIFTSTInfo:

Inheritance graph
[legend]
Collaboration diagram for CPKIFTSTInfo:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 51 of file TSTInfo.h.


Public Member Functions

 CPKIFTSTInfo ()
virtual ~CPKIFTSTInfo (void)
int GetVersion () const
void SetPolicy (CPKIFOIDPtr &policy)
CPKIFOIDPtr GetPolicy () const
void SetMessageImprint (CPKIFMessageImprintPtr &messageImprint)
CPKIFMessageImprintPtr GetMessageImprint () const
void SetSerialNumber (CPKIFStringPtr &serialNumber)
const char * GetSerialNumber () const
void SetGeneralizedTime (CPKIFTimePtr &genTime)
void GetExtensionByOID (const CPKIFOID &oid, CPKIFX509ExtensionPtr &ref)
void GetEncodedExtensions (CPKIFBufferPtr &buf)
CPKIFTimePtr GetGeneralizedTime () const
void SetAccuracy (CPKIFAccuracyPtr &accuracy)
CPKIFAccuracyPtr GetAccuracy () const
void SetOrdering (bool ordering)
bool GetOrdering () const
void SetNonce (CPKIFStringPtr &nonce)
const char * GetNonce () const
void SetTSA (CPKIFGeneralNamePtr &tsa)
CPKIFGeneralNamePtr GetTSA () const
CPKIFBufferPtr Encode ()
void Decode (CPKIFBufferPtr &bp)
bool ExtensionsPresent () const
template<class T>
boost::shared_ptr< T > GetExtension ()

Constructor & Destructor Documentation

CPKIFTSTInfo::CPKIFTSTInfo (  ) 

Interface: External

This function creates and initializes an instance of CPKIFTSTInfo. The Version property is initialized to 1. The Ordering property is initialized to false.

Returns:
None

Definition at line 230 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

CPKIFTSTInfo::~CPKIFTSTInfo ( void   )  [virtual]

Interface: External

This function destroys an instance of CPKIFTSTInfo.

Returns:
None

Definition at line 247 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.


Member Function Documentation

int CPKIFTSTInfo::GetVersion (  )  const

Interface: External

This function returns the version number of a TSTInfo object. PKIF only supports version 1 TSP structures.

Returns:
The version number of a TSTInfo object

Definition at line 267 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by CPKIFTimestampVerifier::Verify().

void CPKIFTSTInfo::SetPolicy ( CPKIFOIDPtr &  policy  ) 

Interface: External

This function is used to set the policy identifier contained by a TSTInfo object.

Returns:
None
Parameters:
policy  [in] Reference to a smart pointer to a CPKIFOID object specifying the policy included in a TSTInfo object

Definition at line 286 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

CPKIFOIDPtr CPKIFTSTInfo::GetPolicy (  )  const

Interface: External

This function is used to get the policy identifier contained by a TSTInfo object.

Returns:
The GetPolicy function returns a smart pointer to a CPKIFOID object containing the policy included in a TSTInfo object, or NULL if no policy has been specified.

Definition at line 303 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by Encode().

void CPKIFTSTInfo::SetMessageImprint ( CPKIFMessageImprintPtr &  messageImprint  ) 

Interface: External

This function is used to set the message imprint contained by a TSTInfo object.

Returns:
None
Parameters:
messageImprint  [in] Reference to a CPKIFMessageImprint object containing message digest information of the data that was timestamped

Definition at line 323 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

CPKIFMessageImprintPtr CPKIFTSTInfo::GetMessageImprint (  )  const

Interface: External

This function is used to get the message imprint contained by a TSTInfo object

Returns:
The GetMessageImprint function returns a smart pointer to a CPKIFMessageImprint object containing the message imprint included in a TSTInfo object, or NULL if no message imprint has been specified.

Definition at line 340 of file TSTInfo.cpp.

References CACASNWRAPPER_CREATE, data, LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by Encode(), CPKIFArchiveTimestamp::GetEffectiveDigestAlgorithm(), and CPKIFTimestampVerifier::Verify().

void CPKIFTSTInfo::SetSerialNumber ( CPKIFStringPtr serialNumber  ) 

Interface: External

This function is used to set the serial number of a TSTInfo object.

Returns:
None
Parameters:
serialNumber  [in] Reference to a CPKIFStringPtr object containing a NULL terminated ASCII Hex string representation

Definition at line 370 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

const char * CPKIFTSTInfo::GetSerialNumber (  )  const

Interface: External

This function is used to get the serial number of a TSTInfo object.

Returns:
The GetSerialNumber function returns a const pointer to a buffer containing a NULL terminated string or NULL if no serial number has been specified. The string contains an ASCII hexadecimal representation of the serial number contained in a TSTInfo object.

Definition at line 388 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by Encode().

void CPKIFTSTInfo::SetGeneralizedTime ( CPKIFTimePtr &  genTime  ) 

Interface: External

This function is used to set the generalized time of a TSTInfo object.

Returns:
None
Parameters:
genTime  [in] Reference to a smart pointer to a CPKIFTime object containing the time asserted by a TSA in a TSTInfo object

Definition at line 412 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

void CPKIFTSTInfo::GetExtensionByOID ( const CPKIFOID oid,
CPKIFX509ExtensionPtr &  ref 
) [virtual]

Interface: External

This function retrives the extension identified by CPKIFOID object

Returns:
None
Parameters:
oid  [in] Identifies the extension sought
ref  [out] The extension (if present).

Implements IPKIFHasExtensions.

Definition at line 201 of file TSTInfo.cpp.

void CPKIFTSTInfo::GetEncodedExtensions ( CPKIFBufferPtr &  buf  )  [virtual]

Interface: External

This function returns a smart pointer to CPKIFBuffer object which will contain the encoded extensions

Returns:
A smart pointer to CPKIFBuffer object which will contain the encoded extensions
Parameters:
buf  [out] A reference to a smart pointer to CPKIFBuffer object which will contain the encoded extensions

Implements IPKIFHasExtensions.

Definition at line 812 of file TSTInfo.cpp.

References CACASNWRAPPER_CREATE, and data.

CPKIFTimePtr CPKIFTSTInfo::GetGeneralizedTime (  )  const

Interface: External

This function is used to get the generalized time of a TSTInfo object.

Returns:
The GetGeneralizedTime function returns a smart pointer to a CPKIFTime object containing the time asserted by a TSA in a TSTInfo object.

Definition at line 429 of file TSTInfo.cpp.

References CPKIFTime, LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by Encode(), and CPKIFTimestampVerifier::Verify().

void CPKIFTSTInfo::SetAccuracy ( CPKIFAccuracyPtr &  accuracy  ) 

Interface: External

This function is used to set the accuracy of a TSTInfo object.

Returns:
None
Parameters:
accuracy  [in] Reference to a smart pointer to a CPKIFAccuracy object containing information that when applied to the GeneralizedTime value determines the time window in which the timestamp token was generated.

Definition at line 450 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

CPKIFAccuracyPtr CPKIFTSTInfo::GetAccuracy (  )  const

Interface: External

This function is used to get the accuracy of a TSTInfo object.

Returns:
The GetAccuracy function returns a smart pointer to a CPKIFAccuracy object containing the time asserted by a TSA in a TSTInfo object.

Definition at line 468 of file TSTInfo.cpp.

References CACASNWRAPPER_CREATE, data, LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by Encode().

void CPKIFTSTInfo::SetOrdering ( bool  ordering  ) 

Interface: External

This function is used to set the ordering flag of a TSTInfo object.

Returns:
None
Parameters:
ordering  [in] Boolean value to set/unset the Ordering property.

Definition at line 499 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

bool CPKIFTSTInfo::GetOrdering (  )  const

Interface: External

This function is used to get the ordering flag of a TSTInfo object

Returns:
The GetOrdering function returns the Boolean value of the Ordering property.

Definition at line 515 of file TSTInfo.cpp.

Referenced by Encode().

void CPKIFTSTInfo::SetNonce ( CPKIFStringPtr nonce  ) 

Interface: External

This function is used to set the nonce of a TSTInfo object.

Returns:
None
Parameters:
nonce  [in] Reference to a CPKIFStringPtr object containing a NULL terminated ASCII Hexadecimal representation of the nonce value included in a TSTInfo object prefixed with "0x"

Definition at line 526 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

const char * CPKIFTSTInfo::GetNonce (  )  const

Interface: External

This function is used to get the nonce of a TSTInfo object.

Returns:
The GetNonce function returns a const pointer to a buffer containing a NULL terminated string representation of the nonce value or NULL if no nonce value has been specified. The value is an ASCII hexadecimal representation of the nonce prefixed with "0x".

Definition at line 545 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by Encode().

void CPKIFTSTInfo::SetTSA ( CPKIFGeneralNamePtr &  tsa  ) 

Interface: External

This function is used to set the TSA name contained by a TSTInfo object.

Returns:
None
Parameters:
tsa  [in] Reference to a smart pointer to a CPKIFName object containing the name of the TSA

Definition at line 569 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

CPKIFGeneralNamePtr CPKIFTSTInfo::GetTSA (  )  const

Interface: External

This function is used to get the TSA name contained by a TSTInfo object.

Returns:
A smart pointer to a CPKIFName object containing the name of the TSA

Definition at line 585 of file TSTInfo.cpp.

References CACASNWRAPPER_CREATE, LOG_STRING_DEBUG, m_impl, and TOOLKIT_TSP_ASN.

Referenced by Encode().

CPKIFBufferPtr CPKIFTSTInfo::Encode (  ) 

Interface: External

This function is used to encode a TSTInfo object. This function may generate an exception containing the following error code TSP_MISSING_REQUIRED_FIELD.

Returns:
A smart pointer to CPKIFBuffer object containing the encoded TSTInfo
Exceptions:
CPKIFTSPException(TSP_MISSING_REQUIRED_FIELD) 
CPKIFTSPException(COMMON_NOT_IMPLEMENTED) 

Definition at line 642 of file TSTInfo.cpp.

References CACASNWRAPPER_CREATE, COMMON_NOT_IMPLEMENTED, ConvertStringToASN1OBJID(), CopyGeneralName(), CopyOID(), g_nullParams, GetAccuracy(), GetGeneralizedTime(), GetMessageImprint(), GetNonce(), GetOrdering(), GetPolicy(), GetSerialNumber(), GetTSA(), LOG_STRING_DEBUG, PKIFTSPMemoryHelper::pTSTInfo, and TOOLKIT_TSP_ASN.

void CPKIFTSTInfo::Decode ( CPKIFBufferPtr &  msg  ) 

Interface: External

This function is used to decode an encoded TSTInfo object.

Returns:
None
Parameters:
msg  [in] Reference to a smart pointer to a CPKIFBuffer object containing a TSTInfo object to decode

Definition at line 776 of file TSTInfo.cpp.

References ASN1_DECODE_ERROR, COMMON_INVALID_INPUT, LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

Referenced by _tmain(), CPKIFArchiveTimestamp::GetEffectiveDigestAlgorithm(), and CPKIFTimestampVerifier::Verify().

bool CPKIFTSTInfo::ExtensionsPresent (  )  const

Interface: External

This function returns true if the TSTInfo object contains extension and false otherwise. PKIF does not support creation of TSTInfo objects containing extensions.

Return values:
True if the TSTInfo object contains extension
False if the TSTInfo object does not contain extension

Definition at line 622 of file TSTInfo.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_TSP_ASN.

template<class T>
boost::shared_ptr<T> CPKIFTSTInfo::GetExtension (  )  [inline]

this function should be used to retrieve extensions in a type-safe manner you pass a type as a param and the function returns a default smart pointer to that type Interface: External

This function is used to retrieve an extension from an IPKIFHasExtensions object. It takes the type of extension sought by an application as a template parameter and returns a smart pointer to that type (containing a NULL pointer if the extension was not found).

Returns:
A smart pointer to the appropriate extension

Reimplemented from IPKIFHasExtensions.


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:20:48 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6