00001 00010 #ifndef __CERTREPLY_H__ 00011 #define __CERTREPLY_H__ 00012 00013 #include "PKIFSCVPDLL.h" 00014 #include "IPKIFHasExtensions.h" 00015 00016 // forward declarations 00017 struct CPKIFCertReplyImpl; 00018 00019 FD_LIST_PTR(CPKIFValidationPolicy); 00020 FD_LIST_PTR(CPKIFTime); 00021 FD_LIST_PTR(CPKIFGeneralName); 00022 FD_LIST_PTR(CPKIFCertReference); 00023 FD_LIST_PTR(CPKIFReplyWantBack); 00024 FD_LIST_PTR(CPKIFReplyCheck); 00025 00026 00046 class PKIFSCVP_API CPKIFCertReply : public IPKIFHasExtensions 00047 { 00048 public: 00049 CPKIFCertReply(); 00050 CPKIFCertReply(const CPKIFBufferPtr&); 00051 virtual ~CPKIFCertReply(void); 00052 00053 //req field 00054 void SetCertRef(CPKIFCertReferencePtr& cert); 00055 const CPKIFCertReferencePtr GetCertRef() const; 00056 00057 //optional field 00058 void SetReplyStatus(int replyStatus); 00059 const int GetReplyStatus() const; 00060 00061 //req field 00062 void SetReplyValTime(CPKIFTimePtr& replyValTime); 00063 const CPKIFTimePtr GetReplyValTime() const; 00064 00065 //req field 00066 void SetReplyChecks(CPKIFReplyCheckListPtr& replyChecks); 00067 void GetReplyChecks(CPKIFReplyCheckListPtr& replyChecks) const; 00068 00069 //req field 00070 void SetReplyWantBacks(CPKIFReplyWantBackListPtr& replyWantBacks); 00071 void GetReplyWantBacks(CPKIFReplyWantBackListPtr& replyWantBacks) const; 00072 00073 //optional field 00074 void SetValErrors(CPKIFOIDListPtr& errors); 00075 void GetValErrors(CPKIFOIDListPtr& errors) const; 00076 00077 //optional field 00078 void SetNextUpdate(CPKIFTimePtr& nextUpdate); 00079 const CPKIFTimePtr GetNextUpdate() const; 00080 00081 //convenience function to allow quick failure in the SCVP server, i.e., if the server does not 00082 //implement support for extensions 00083 bool ExtensionsPresent() const; 00084 00085 template <class T> boost::shared_ptr<T> GetExtension(); 00086 void GetExtensionByOID(const CPKIFOID& oid, CPKIFX509ExtensionPtr& ref); 00087 void GetEncodedExtensions (CPKIFBufferPtr& buf); 00088 00089 private: 00091 CPKIFCertReply(const CPKIFCertReply& copy); 00093 CPKIFCertReply& operator=(const CPKIFCertReply& rhs); 00094 00095 struct CPKIFCertReplyImpl *m_impl; 00096 }; 00097 DECLARE_SMART_POINTERS(CPKIFCertReply); 00098 typedef std::vector<CPKIFCertReplyPtr, PKIFAlloc<CPKIFCertReplyPtr> > CPKIFCertReplyList; 00099 DECLARE_SMART_POINTERS(CPKIFCertReplyList); 00100 00101 #endif //__CERTREPLY_H__