EvidenceRecordVerifier.cpp File Reference


Detailed Description

Subsystem: Evidence Record Syntax (PKIFERS)

Module: CPKIFEvidenceRecordVerifier

Id
EvidenceRecordVerifier.cpp 11929 2010-10-21 19:32:24Z agalustyan

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>

Include dependency graph for EvidenceRecordVerifier.cpp:

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)


Function Documentation

CPKIFAlgorithmIdentifierPtr GetHashAlgorithmFromTimestamp ( CPKIFContentInfoPtr &  ci  ) 

Interface: Module

This function retrieves hash algorithm value from a timestamp

Returns:
A smart pointer to CPKIFAlgorithmIdentifier object containg hash alg
Parameters:
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

Returns:
A smart pointer to CPKIFTime object containg time value
Parameters:
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.

Returns:
CPKIFBufferPtr containing the hash of bp parameter contents calculated using algorithm indicated by ha or NULL
Parameters:
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().


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