00001 00009 #include "PolicyMapping.h" 00010 #include "OID.h" 00011 #include "ASN1Helper.h" 00012 #include "PKIX1Implicit88.h" 00013 #include "PKIX1Explicit88.h" 00014 00016 00017 struct CPKIFPolicyMappingImpl 00018 { 00019 CPKIFOIDPtr m_issuerDomain; 00020 CPKIFOIDPtr m_subjectDomain; 00021 }; 00022 00024 00032 CPKIFPolicyMapping::CPKIFPolicyMapping() 00033 :m_impl (new CPKIFPolicyMappingImpl) 00034 { 00035 } 00043 //CPKIFPolicyMapping::CPKIFPolicyMapping( 00044 // //! [in] Reference to an internal structure representation of the extension containing 00045 // //! information used to construct the object 00046 // const CACX509V3PolicyMappings_element* ext) 00047 // :m_impl (new CPKIFPolicyMappingImpl) 00048 //{ 00049 // CPKIFOIDPtr tmp(new CPKIFOID(ext->issuerDomainPolicy.subid, ext->issuerDomainPolicy.numids)); 00050 // m_impl->m_issuerDomain = tmp; 00051 // CPKIFOIDPtr tmp2(new CPKIFOID(ext->subjectDomainPolicy.subid, ext->subjectDomainPolicy.numids)); 00052 // m_impl->m_subjectDomain = tmp2; 00053 //} 00054 CPKIFPolicyMapping::CPKIFPolicyMapping( 00056 const CPKIFOID& issuerDomainPolicy, 00058 const CPKIFOID& subjectDomainPolicy) 00059 :m_impl (new CPKIFPolicyMappingImpl) 00060 { 00061 CPKIFOIDPtr tmp(new CPKIFOID(issuerDomainPolicy)); 00062 m_impl->m_issuerDomain = tmp; 00063 CPKIFOIDPtr tmp2(new CPKIFOID(subjectDomainPolicy)); 00064 m_impl->m_subjectDomain = tmp2; 00065 } 00073 CPKIFPolicyMapping::~CPKIFPolicyMapping() 00074 { 00075 if(m_impl) 00076 { 00077 delete m_impl; 00078 m_impl = 0; 00079 } 00080 } 00088 CPKIFOIDPtr CPKIFPolicyMapping::IssuerDomain() const 00089 { 00090 return m_impl->m_issuerDomain; 00091 } 00099 CPKIFOIDPtr CPKIFPolicyMapping::SubjectDomain() const 00100 { 00101 return m_impl->m_subjectDomain; 00102 } 00103