00001 00011 #ifndef __EvidenceRecordVerifier_H__ 00012 #define __EvidenceRecordVerifier_H__ 00013 00014 //PKIF includes 00015 #include "PKIFdll.h" 00016 #include "PKIFCryptoConstants.h" 00017 00018 //PKIFERS includes 00019 #include "PKIFERSLib.h" 00020 00021 FD_SMART_PTR(CPKIFBuffer); 00022 FD_SMART_PTR(CPKIFEvidenceRecord); 00023 FD_SMART_PTR(CPKIFParallelHash); 00024 FD_SMART_PTR(CPKIFTimestampVerifier); 00025 FD_SMART_PTR(CPKIFValidity); 00026 FD_SMART_PTR(CPKIFTime); 00027 FD_SMART_PTR(CPKIFPathSettings); 00028 FD_MC_PTR(); 00029 00030 FD_SMART_PTR(IPKIFSecuritySuitability); 00031 // forward declaration 00032 struct CPKIFEvidenceRecordImpl; 00033 00034 typedef std::pair<CPKIFValidityPtr, IPKIFMediatorPtr> CPKIFExMediator; 00035 typedef std::pair<CPKIFValidityPtr, CPKIFPathSettingsPtr> CPKIFExPathSettings; 00036 DECLARE_SMART_POINTERS(CPKIFExMediator); 00037 DECLARE_SMART_POINTERS(CPKIFExPathSettings); 00038 00039 typedef std::vector<CPKIFTimestampVerifierPtr> ChainResults; 00040 DECLARE_SMART_POINTERS(ChainResults); 00041 typedef std::vector<ChainResultsPtr> SeqResults; 00042 DECLARE_SMART_POINTERS(SeqResults); 00043 00049 class PKIFERS_API CPKIFEvidenceRecordVerifier 00050 { 00051 public: 00052 CPKIFEvidenceRecordVerifier(void); 00053 ~CPKIFEvidenceRecordVerifier(void); 00054 00055 //INPUTS 00056 void SetSecuritySuitabilityPolicy(const IPKIFSecuritySuitabilityPtr & ssp); 00057 IPKIFSecuritySuitabilityPtr GetSecuritySuitabilityPolicy() const; 00058 00059 void SetCurrentMediator(IPKIFMediatorPtr& currentMediator); 00060 IPKIFMediatorPtr GetCurrentMediator(); 00061 00062 void SetCurrentPathSettings(CPKIFPathSettingsPtr& currentPS); 00063 CPKIFPathSettingsPtr GetCurrentPathSettings(); 00064 00065 void AddArchiveMediator(CPKIFExMediatorPtr& archiveMediator); 00066 void GetArchiveMediators(std::vector<CPKIFExMediatorPtr>& v) const; 00067 IPKIFMediatorPtr GetArchiveMediator(CPKIFTimePtr& t); 00068 00069 void AddArchivePathSettings(CPKIFExPathSettingsPtr& ps); 00070 void GetArchivePathSettings(std::vector<CPKIFExPathSettingsPtr>& v) const; 00071 CPKIFPathSettingsPtr GetArchivePathSettings(CPKIFTimePtr& t); 00072 00074 void SetDataComplete(CPKIFBufferPtr& origData); 00075 00077 void SetDataHashSet(CPKIFParallelHashPtr& ph); 00078 00079 CPKIFBufferPtr GetHash(PKIFCRYPTO::HASH_ALG ha, IPKIFMediatorPtr& m); 00080 00081 //OPERATIONS 00083 SeqResultsPtr Verify(CPKIFEvidenceRecordPtr& er); 00084 00085 private: 00087 CPKIFEvidenceRecordVerifier(const CPKIFEvidenceRecordVerifier& copy); 00089 CPKIFEvidenceRecordVerifier& operator=(const CPKIFEvidenceRecordVerifier& rhs); 00090 00091 struct PKIFEvidenceRecordVerifierImpl *m_impl; 00092 }; 00093 DECLARE_SMART_POINTERS(CPKIFEvidenceRecordVerifier); 00094 typedef std::vector<CPKIFEvidenceRecordVerifierPtr, PKIFAlloc<CPKIFEvidenceRecordVerifierPtr> > CPKIFEvidenceRecordVerifierList; 00095 DECLARE_SMART_POINTERS(CPKIFEvidenceRecordVerifier); 00096 00097 #endif