Validity.cpp

Go to the documentation of this file.
00001 
00009 #include "Validity.h"
00010 #include "PKIFTime.h"
00011 
00013 
00014 struct CPKIFValidityImpl
00015 {
00016   CPKIFTimePtr m_notBefore;
00017   CPKIFTimePtr m_notAfter;
00018 };
00019 
00021 
00029 CPKIFValidity::CPKIFValidity()
00030   :m_impl (new CPKIFValidityImpl)
00031 {
00032 }
00034 
00041 //CPKIFValidity::CPKIFValidity(const CACX509V3Validity validity)
00042 //  :m_impl (new CPKIFValidityImpl)
00043 //{
00044 //  CPKIFTimePtr tmpNB(new CPKIFTime(validity.notBefore));
00045 //  m_impl->m_notBefore = tmpNB;
00046 //  CPKIFTimePtr tmpNA(new CPKIFTime(validity.notAfter));
00047 //  m_impl->m_notAfter = tmpNA;
00048 //}
00049 CPKIFValidity::CPKIFValidity(
00051     const CPKIFTimePtr &notBefore, 
00053     const CPKIFTimePtr &notAfter)
00054   :m_impl (new CPKIFValidityImpl)
00055 {
00056     CPKIFTimePtr tmpNB(new CPKIFTime(notBefore->GetTime()));
00057     m_impl->m_notBefore = tmpNB;
00058     CPKIFTimePtr tmpNA(new CPKIFTime(notAfter->GetTime()));
00059     m_impl->m_notAfter = tmpNA;
00060 }
00061 
00062 
00063 // commented out - 8/21/2004
00064 // CPKIFValidity::CPKIFValidity(const CPKIFValidity& validity)
00065 // {
00066 // }
00067 
00075 CPKIFValidity::~CPKIFValidity()
00076 {
00077     if(m_impl)
00078     {
00079         delete m_impl;
00080         m_impl = 0;
00081     }
00082 }
00083 
00092 CPKIFTimePtr CPKIFValidity::notBefore() const
00093 {
00094     return m_impl->m_notBefore;
00095 }
00104 CPKIFTimePtr CPKIFValidity::notAfter() const
00105 {
00106     return m_impl->m_notAfter;
00107 }

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