Module: CPKIFEvidenceRecordVerifier
Definition in file EvidenceRecordVerifier.cpp.
#include "pkif.h"
#include "PKIFAlgorithm.h"
#include "PKIFCryptUtils.h"
#include "PKIFCMS.h"
#include "ArchiveTimestamp.h"
#include "EvidenceRecord.h"
#include "EvidenceRecordVerifier.h"
#include "IPKIFSecuritySuitability.h"
#include "PKIFTSP.h"
#include <stdexcept>
#include <cstring>
#include <iterator>
Go to the source code of this file.
Functions | |
CPKIFTimePtr | GetTimeFromTimestamp (CPKIFContentInfoPtr &ci) |
CPKIFAlgorithmIdentifierPtr | GetHashAlgorithmFromTimestamp (CPKIFContentInfoPtr &ci) |
CPKIFBufferPtr | HashBuffer (CPKIFAlgorithm *ha, CPKIFBufferPtr &bp, IPKIFMediatorPtr &m) |
CPKIFAlgorithmIdentifierPtr GetHashAlgorithmFromTimestamp | ( | CPKIFContentInfoPtr & | ci | ) |
Interface: Module
This function retrieves hash algorithm value from a timestamp
ci | [in] Smart pointer to evidence record from which to extract the most recent hash algorithm |
Definition at line 228 of file EvidenceRecordVerifier.cpp.
References CPKIFSignedData::Decode(), and CPKIFSignedData::GetEncapsulatedContent().
Referenced by CPKIFEvidenceRecordVerifier::Verify().
CPKIFTimePtr GetTimeFromTimestamp | ( | CPKIFContentInfoPtr & | ci | ) |
Interface: Module
This function retrieves time value from a timestamp
ci | [in] Smart pointer to evidence record from which to extract the most recent hash algorithm |
Definition at line 180 of file EvidenceRecordVerifier.cpp.
References CPKIFSignedData::Decode(), and CPKIFSignedData::GetEncapsulatedContent().
Referenced by CPKIFEvidenceRecordVerifier::Verify().
CPKIFBufferPtr HashBuffer | ( | CPKIFAlgorithm * | ha, | |
CPKIFBufferPtr & | bp, | |||
IPKIFMediatorPtr & | m | |||
) |
Interface: Module
HashBuffer takes a hash algorithm, a buffer to hash and an optional mediator/colleague collection. If the IPKIFCryptoMisc interface is available from the m parameter, then it is used to calculate the hash. If the interface is not available then the interface pointer returned by GetPlatformCryptoMisc is used. If an error occurs during the hash operation, NULL is returned.
ha | [in] Enum value indicating hash alg to use |
bp | [in] Smart pointer to a buffer containing the data to hash |
m | [in] Mediator/colleague set containing necessary crypto interface |
Definition at line 286 of file EvidenceRecordVerifier.cpp.
References CPKIFAlgorithm::DigestSize(), GetPlatformCryptoMisc(), CPKIFAlgorithm::HashAlg(), IPKIFCryptoMisc::HashFinal(), IPKIFCryptoMisc::HashInit(), and IPKIFCryptoMisc::HashUpdate().