CVResponse.h

Go to the documentation of this file.
00001 
00010 #ifndef __CVRESPONSE_H__
00011 #define __CVRESPONSE_H__
00012 
00013 #include "PKIFSCVPDLL.h"
00014 #include "IPKIFHasExtensions.h"
00015 
00016 // forward declarations
00017 struct CPKIFCVResponseImpl;
00018 
00019 FD_LIST_PTR(CPKIFValidationPolicy);
00020 FD_LIST_PTR(CPKIFTime);
00021 FD_LIST_PTR(CPKIFGeneralName);
00022 FD_SMART_PTR(CPKIFCertReply);
00023 FD_SMART_PTR(CPKIFResponseStatus);
00024 FD_SMART_PTR(CPKIFRequestReference);
00025 FD_LIST_PTR(CPKIFCertReply);
00026 
00050 class PKIFSCVP_API CPKIFCVResponse: public IPKIFHasExtensions
00051 {
00052 public:
00053     CPKIFCVResponse();
00054     virtual ~CPKIFCVResponse(void);
00055 
00056     //Default version is 1
00057     int GetVersion() const;
00058     void SetVersion(int v);
00059 
00060     //req field
00061     void SetConfigurationID(int confID);
00062     const int GetConfigurationID() const;
00063 
00064     //req field
00065     void SetProducedAt(CPKIFTimePtr& producedAt);
00066     const CPKIFTimePtr GetProducedAt() const;
00067 
00068     //req field
00069     void SetResponseStatus(CPKIFResponseStatusPtr& responseStatus);
00070     const CPKIFResponseStatusPtr GetResponseStatus() const;
00071 
00072     //optional field
00073     void SetRequestorRef(CPKIFGeneralNameListPtr& requestorRef);
00074     void GetRequestorRef(CPKIFGeneralNameListPtr& requestorRef) const;
00075 
00076     //optional field
00077     void SetRequestorName(CPKIFGeneralNameListPtr& requestorName);
00078     void GetRequestorName(CPKIFGeneralNameListPtr& requestorName) const;
00079 
00080     //optional field
00081     void SetReplyObjects(CPKIFCertReplyListPtr& replyObjects);
00082     void GetReplyObjects(CPKIFCertReplyListPtr& replyObjects) const;
00083 
00084     //optional field
00085     void SetNonce(CPKIFBufferPtr& nonce); 
00086     const CPKIFBufferPtr GetNonce() const;
00087 
00088     //optional field
00089     void SetRequestReference(CPKIFRequestReferencePtr& nonce); 
00090     const CPKIFRequestReferencePtr GetRequestReference() const;
00091 
00092     //optional field
00093     void SetValidationPolicy(CPKIFValidationPolicyPtr& validationPolicy);
00094     const CPKIFValidationPolicyPtr GetValidationPolicy() const;
00095 
00096     //optional field
00097     void SetServerContextInfo(CPKIFBufferPtr& serverContextInfo);
00098     const CPKIFBufferPtr GetServerContextInfo() const;
00099 
00100     //optional field
00101     void SetRequestorText(CPKIFStringPtr& nonce); 
00102     const CPKIFStringPtr GetRequestorText() const;
00103 
00104 
00105     //convenience function to allow quick failure in the SCVP server, i.e., if the server does not 
00106     //implement support for extensions
00107     bool ExtensionsPresent() const;
00108 
00109     template <class T> boost::shared_ptr<T> GetExtension();
00110     void GetExtensionByOID(const CPKIFOID& oid, CPKIFX509ExtensionPtr& ref);
00111     void GetEncodedExtensions (CPKIFBufferPtr& buf);
00112     bool AreThereAnyUnprocessedCriticalExtensions();
00113 
00114     CPKIFBufferPtr Encode() const;
00115     void Decode(CPKIFBufferPtr& msg);
00116 
00117 private:
00119     CPKIFCVResponse(const CPKIFCVResponse& copy);
00121     CPKIFCVResponse& operator=(const CPKIFCVResponse& rhs);
00122 
00123     struct CPKIFCVResponseImpl *m_impl;
00124 };
00125 DECLARE_SMART_POINTERS(CPKIFCVResponse);
00126 
00127 #endif // __CVRESPONSE_H__

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