#include <ArchiveTimestamp.h>
ArchiveTimeStamp ::= SEQUENCE { digestAlgorithm [0] AlgorithmIdentifier OPTIONAL, attributes [1] Attributes OPTIONAL, reducedHashtree [2] SEQUENCE OF PartialHashtree OPTIONAL, timeStamp ContentInfo}
An evidence record contains one or more ArchiveTimeStamps. There are essentially three types of ArchiveTimeStamps:
TSP-enforcing: No
Definition at line 65 of file ArchiveTimestamp.h.
Public Member Functions | |
CPKIFArchiveTimestamp (void) | |
virtual | ~CPKIFArchiveTimestamp (void) |
void | SetArchiveTimeStampType (ArchiveTimeStampType atst) |
ArchiveTimeStampType | GetArchiveTimeStampType () const |
CPKIFAlgorithmIdentifierPtr | GetDigestAlgorithm () const |
CPKIFAlgorithmIdentifierPtr | GetEffectiveDigestAlgorithm () const |
CPKIFPartialHashtreeListPtr | GetReducedHashtree () const |
CPKIFContentInfoPtr | GetTimestamp () const |
void | SetDigestAlgorithm (CPKIFAlgorithmIdentifierPtr &hashtree) |
void | SetReducedHashtree (CPKIFPartialHashtreeListPtr &reducedHashtree) |
void | SetTimestamp (CPKIFContentInfoPtr ×tamp) |
CPKIFBufferPtr | Encode () const |
void | Decode (CPKIFBufferPtr &msg) |
CPKIFArchiveTimestamp::CPKIFArchiveTimestamp | ( | void | ) |
Interface: External
Default constructor for CPKIFArchiveTimestamp class
Definition at line 188 of file ArchiveTimestamp.cpp.
CPKIFArchiveTimestamp::~CPKIFArchiveTimestamp | ( | void | ) | [virtual] |
Interface: External
Default destructor for CPKIFArchiveTimestamp class
Definition at line 199 of file ArchiveTimestamp.cpp.
void CPKIFArchiveTimestamp::SetArchiveTimeStampType | ( | ArchiveTimeStampType | atst | ) |
Interface: External
This function is used to set archive timestamp type to
enum ArchiveTimeStampType { iATS = 0, //Initial ArchiveTimeStamp (covers data being archived) trATS, //Timestamp Renewal ArchiveTimeStamp (covers ArchiveTimeStamp that precedes it in an ArchiveTimeStampChain) hrATS //Hashtree Renewal ArchiveTimeStamp (covers ArchiveTimeStampChain that precedes it in an ArchiveTimeStampSequence) };
Definition at line 445 of file ArchiveTimestamp.cpp.
ArchiveTimeStampType CPKIFArchiveTimestamp::GetArchiveTimeStampType | ( | ) | const |
Interface: External
This function is used to get archive timestamp type;
Definition at line 456 of file ArchiveTimestamp.cpp.
CPKIFAlgorithmIdentifierPtr CPKIFArchiveTimestamp::GetDigestAlgorithm | ( | ) | const |
Interface: External
This function retrieves digest algorithm of Archive Timestamp
Definition at line 214 of file ArchiveTimestamp.cpp.
References LOG_STRING_DEBUG, m_impl, and TOOLKIT_ERS_ASN.
Referenced by GetEffectiveDigestAlgorithm().
CPKIFAlgorithmIdentifierPtr CPKIFArchiveTimestamp::GetEffectiveDigestAlgorithm | ( | ) | const |
Interface: External
This function retrives effective digest algorithms
Definition at line 467 of file ArchiveTimestamp.cpp.
References CPKIFTSTInfo::Decode(), CPKIFSignedData::Decode(), GetDigestAlgorithm(), CPKIFSignedData::GetEncapsulatedContent(), CPKIFTSTInfo::GetMessageImprint(), and GetTimestamp().
CPKIFPartialHashtreeListPtr CPKIFArchiveTimestamp::GetReducedHashtree | ( | ) | const |
Interface: External
This function is currently not implemented
Definition at line 244 of file ArchiveTimestamp.cpp.
CPKIFContentInfoPtr CPKIFArchiveTimestamp::GetTimestamp | ( | ) | const |
Interface: External
This function is used to retrieve timestamp from Archive Timestamp object
Definition at line 256 of file ArchiveTimestamp.cpp.
References CACASNWRAPPER_CREATE, LOG_STRING_DEBUG, m_impl, and TOOLKIT_ERS_ASN.
Referenced by GetEffectiveDigestAlgorithm().
void CPKIFArchiveTimestamp::SetDigestAlgorithm | ( | CPKIFAlgorithmIdentifierPtr & | hashtree | ) |
Interface: External
This function is used to set Digest Algorithm
Definition at line 285 of file ArchiveTimestamp.cpp.
void CPKIFArchiveTimestamp::SetReducedHashtree | ( | CPKIFPartialHashtreeListPtr & | reducedHashtree | ) |
Interface: External
This function is used to set partial hash tree
Definition at line 296 of file ArchiveTimestamp.cpp.
void CPKIFArchiveTimestamp::SetTimestamp | ( | CPKIFContentInfoPtr & | timestamp | ) |
Interface: External
This function is used to set timestamp
Definition at line 307 of file ArchiveTimestamp.cpp.
CPKIFBufferPtr CPKIFArchiveTimestamp::Encode | ( | ) | const |
Interface: External
This function encodes an archive timestamp containing information obtained via calls to a combination of calls to SetDigestAlgorithm, SetReducedHashtree, SetTimestamp and Decode.
ArchiveTimeStamp ::= SEQUENCE { digestAlgorithm [0] AlgorithmIdentifier OPTIONAL, attributes [1] Attributes OPTIONAL, reducedHashtree [2] SEQUENCE OF PartialHashtree OPTIONAL, timeStamp ContentInfo}
Definition at line 326 of file ArchiveTimestamp.cpp.
References CACASNWRAPPER_CREATE, ConvertStringToASN1OBJID(), CopyOID(), and Decode().
void CPKIFArchiveTimestamp::Decode | ( | CPKIFBufferPtr & | msg | ) |
Interface: External
This function is used to decode Archive Timestamp
Definition at line 405 of file ArchiveTimestamp.cpp.
References COMMON_INVALID_INPUT, LOG_STRING_DEBUG, MSG_DECODE_FAILED, and TOOLKIT_ERS_ASN.
Referenced by Encode().