PolicyQualifier.cpp

Go to the documentation of this file.
00001 
00009 #include "PolicyQualifier.h"
00010 #include "Buffer.h"
00011 #include "OID.h"
00012 #include "ASN1Helper.h"
00013 
00014 #include "PKIX1Implicit88.h"
00015 #include "PKIX1Explicit88.h"
00016 
00018 
00019 struct CPKIFPolicyQualifierImpl
00020 {
00021     CPKIFOIDPtr m_qualifierOID;
00022     CPKIFBufferPtr m_buffer;
00023 };
00024 
00026 
00034 CPKIFPolicyQualifier::CPKIFPolicyQualifier()
00035   :m_impl (new CPKIFPolicyQualifierImpl)
00036 {
00037 }
00045 CPKIFOIDPtr CPKIFPolicyQualifier::QualifierID() const 
00046 {
00047     return m_impl->m_qualifierOID;
00048 }
00056 CPKIFBufferPtr CPKIFPolicyQualifier::Qualifier() const 
00057 {
00058     return m_impl->m_buffer;
00059 }
00067 //CPKIFPolicyQualifier::CPKIFPolicyQualifier(
00068 //  //! [in] Reference to an internal structure representation of the extension containing information 
00069 //  //! used to construct the object
00070 //  const CACX509V3PolicyQualifierInfo* ext)
00071 //  :m_impl (new CPKIFPolicyQualifierImpl)
00072 //{
00073 //  CPKIFOIDPtr tmp(new CPKIFOID(ext->policyQualifierId.subid, ext->policyQualifierId.numids));
00074 //  m_impl->m_qualifierOID = tmp;
00075 //
00076 //  CPKIFBufferPtr tmpBuf(new CPKIFBuffer(ext->qualifier.data, ext->qualifier.numocts));
00077 //  m_impl->m_buffer = tmpBuf;
00078 //}
00079 CPKIFPolicyQualifier::CPKIFPolicyQualifier(
00081     const CPKIFBufferPtr& polQ)
00082   :m_impl (new CPKIFPolicyQualifierImpl)
00083 {
00084     CACASNWRAPPER_CREATE(CACX509V3PolicyQualifierInfo, objPDU);
00085     objPDU.Decode(polQ->GetBuffer(), polQ->GetLength());
00086 
00087     CPKIFOIDPtr tmp(new CPKIFOID(objPDU->policyQualifierId.subid, objPDU->policyQualifierId.numids));
00088     m_impl->m_qualifierOID = tmp;
00089 
00090     CPKIFBufferPtr tmpBuf(new CPKIFBuffer(objPDU->qualifier.data, objPDU->qualifier.numocts));
00091     m_impl->m_buffer = tmpBuf;
00092 }
00093 
00094 //commented out - 8/21/2004
00095 //CPKIFPolicyQualifier::CPKIFPolicyQualifier(const CPKIFPolicyQualifier& ext)
00096 //{
00097 //}
00098 
00106 CPKIFPolicyQualifier::~CPKIFPolicyQualifier()
00107 {
00108     if(m_impl)
00109     {
00110         delete m_impl;
00111         m_impl = 0;
00112     }
00113 }

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