00001 00009 #ifndef __TIMESTAMPVERIFIER_H__ 00010 #define __TIMESTAMPVERIFIER_H__ 00011 00012 #include "PKIFCMSUtils.h" 00013 #include "PKIFCryptoConstants.h" 00014 #include "PKIFdll.h" 00015 #include "PKIFTSPDLL.h" 00016 #include "components.h" 00017 00018 // forward declaration 00019 struct CPKIFTimestampVerifierImpl; 00020 FD_MC_PTR(); 00021 00022 FD_SMART_PTR(CPKIFPathSettings); 00023 FD_SMART_PTR(CPKIFTime); 00024 FD_SMART_PTR(CPKIFBuffer); 00025 FD_SMART_PTR(CPKIFParallelHash); 00026 FD_SMART_PTR(CPKIFContentInfo); 00027 FD_SMART_PTR(CPKIFPathValidationResults); 00028 FD_SMART_PTR(CPKIFCertificate); 00029 FD_MC_PTR(); 00030 00037 class PKIFTSP_API CPKIFTimestampVerifier 00038 { 00039 public: 00040 CPKIFTimestampVerifier(); 00041 ~CPKIFTimestampVerifier(); 00042 00043 //INPUTS 00044 void SetMediator(IPKIFMediatorPtr& m); 00045 void SetMinimumVerificationStatus(CMSPathValidationStatus v); 00046 void SetPathSettings(CPKIFPathSettingsPtr& p); 00047 void SetSkew(int seconds); 00048 void SetComparisonTime(CPKIFTimePtr& time); 00049 00050 IPKIFMediatorPtr GetMediator() const; 00051 CMSPathValidationStatus GetMinimumVerificationStatus() const; 00052 CPKIFPathSettingsPtr GetPathSettings() const; 00053 int GetSkew() const; 00054 CPKIFTimePtr GetComparisonTime() const; 00055 00056 //provide several means of specifying the data that was timestamped 00057 void SetDataComplete(CPKIFBufferPtr& origData); 00058 void SetDataHash(CPKIFBufferPtr& hash, PKIFCRYPTO::HASH_ALG ha); 00059 void SetDataHashSet(CPKIFParallelHashPtr& ph); 00060 00061 CPKIFBufferPtr GetDataComplete() const; 00062 CPKIFBufferPtr GetDataHash(PKIFCRYPTO::HASH_ALG& ha) const; 00063 CPKIFParallelHashPtr GetDataHashSet() const; 00064 00065 //ACTIONS 00066 void Verify(CPKIFContentInfoPtr& timestamp); 00067 00068 //OUTPUTS 00069 CMSVerificationStatus GetVerificationStatus() const; 00070 CPKIFCertificatePathPtr GetCertificatePath() const; 00071 CPKIFPathValidationResultsPtr GetPathValidationResults() const; 00072 CPKIFCertificatePtr GetTSACertificate() const; 00073 CPKIFTimePtr GetTSADateTime() const; 00074 00075 private: 00077 CPKIFTimestampVerifier(const CPKIFTimestampVerifier& copy); 00079 CPKIFTimestampVerifier& operator=(const CPKIFTimestampVerifier& rhs); //added 4/6/2004 00080 00081 enum {thisComponent = TOOLKIT_TSP_TIMESTAMP_VERIFIER}; 00082 00083 struct CPKIFTimestampVerifierImpl *m_impl; 00084 }; 00085 DECLARE_SMART_POINTERS(CPKIFTimestampVerifier); 00086 #endif //__TIMESTAMPVERIFIER_H__