00001 00011 #ifndef __IPKIFSECURITYSUITABILITY_H__ 00012 #define __IPKIFSECURITYSUITABILITY_H__ 00013 00014 //PKIF includes 00015 #include "PKIFdll.h" 00016 #include "PKIFERSLib.h" 00017 00018 FD_SMART_PTR(CPKIFTime); 00019 FD_SMART_PTR(CPKIFCertificate); 00020 FD_SMART_PTR(CPKIFCRL); 00021 FD_SMART_PTR(CPKIFSignerInfo); 00022 FD_SMART_PTR(CPKIFAlgorithmIdentifier); 00023 FD_SMART_PTR(CPKIFOID); 00024 00031 class PKIFERS_API IPKIFSecuritySuitability 00032 { 00033 public: 00034 IPKIFSecuritySuitability(void); 00035 virtual ~IPKIFSecuritySuitability(void); 00036 00037 //Get/Set time of interest value used by suitability checking functions 00038 virtual void SetTimeOfInterest(const CPKIFTimePtr& toi) = 0; 00039 virtual CPKIFTimePtr GetTimeOfInterest() const = 0; 00040 00041 //******************************************************************************* 00042 // Suitability checking functions 00043 //******************************************************************************* 00044 //convenience functions for checking the algorithms present in some commonly used 00045 //types of objects. these can automatically check constraints. 00046 virtual bool AreAlgorithmsInCertificateSuitable(const CPKIFCertificatePtr& cert) const = 0; 00047 virtual bool AreAlgorithmsInCrlSuitable(const CPKIFCRLPtr& crl) const = 0; 00048 virtual bool AreAlgorithmsInSignerInfoSuitable(const CPKIFSignerInfoPtr& si) const = 0; 00049 00050 //primitive functions for checking algorithm suitability 00051 virtual bool IsAlgorithmSuitable(const CPKIFAlgorithmIdentifierPtr& ai) const = 0; 00052 virtual bool IsAlgorithmSuitable(const CPKIFOIDPtr& ai) const = 0; 00053 00054 private: 00056 IPKIFSecuritySuitability(const IPKIFSecuritySuitability& copy); 00058 IPKIFSecuritySuitability& operator=(const IPKIFSecuritySuitability& rhs); 00059 00060 }; 00061 DECLARE_SMART_POINTERS(IPKIFSecuritySuitability); 00062 typedef std::vector<IPKIFSecuritySuitabilityPtr, PKIFAlloc<IPKIFSecuritySuitabilityPtr> > IPKIFSecuritySuitabilityList; 00063 DECLARE_SMART_POINTERS(IPKIFSecuritySuitabilityList); 00064 00065 #endif 00066