CACCertificatePath.cpp
Go to the documentation of this file.00001
00009 #include "PKIFCertificatePath.h"
00010 #include "ToolkitUtils.h"
00011 #include "CRL.h"
00012 #include "components.h"
00013 #include "IPKIFTrustAnchor.h"
00014
00015 #include <iterator>
00016
00017
00019 struct CPKIFCertificatePathImpl
00020 {
00021 CPKIFCertificatePtr m_target;
00022 CPKIFCertificateNodeList m_path;
00023 IPKIFTrustAnchorPtr m_root;
00024
00025 CPKIFCertificatePathStatePtr m_state;
00026 CPKIFPathSettingsPtr m_settings;
00027 CPKIFBuilderStatisticsPtr m_stats;
00028 CPKIFCRLList m_crlList;
00029 };
00031
00040 CPKIFCertificatePath::CPKIFCertificatePath(void)
00041 :m_impl (new CPKIFCertificatePathImpl)
00042 {
00043 LOG_STRING_DEBUG("CPKIFCertificatePath::CPKIFCertificatePath()", TOOLKIT_PATH_MISC, 0, this);
00044 }
00052 CPKIFCertificatePath::~CPKIFCertificatePath(void)
00053 {
00054 LOG_STRING_DEBUG("CPKIFCertificatePath::~CPKIFCertificatePath()", TOOLKIT_PATH_MISC, 0, this);
00055
00056 delete m_impl;
00057 m_impl = 0;
00058 }
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00084 void CPKIFCertificatePath::SetTarget(
00087 const CPKIFCertificatePtr& cert)
00088 {
00089 m_impl->m_target = cert;
00090 }
00100 void CPKIFCertificatePath::GetTarget(
00103 CPKIFCertificatePtr& cert)const
00104 {
00105 cert = m_impl->m_target;
00106 }
00107
00108
00121 void CPKIFCertificatePath::SetPath(
00123 const CPKIFCertificateNodeList& path)
00124 {
00125 m_impl->m_path.clear();
00126 copy(path.begin(), path.end(), back_inserter(m_impl->m_path));
00127 }
00139 void CPKIFCertificatePath::GetPath(
00141 CPKIFCertificateNodeList& path)const
00142 {
00143 path.clear();
00144 copy(m_impl->m_path.begin(), m_impl->m_path.end(), back_inserter(path));
00145 }
00146
00147
00156 void CPKIFCertificatePath::SetState(
00158 const CPKIFCertificatePathStatePtr& state)
00159 {
00160 m_impl->m_state = state;
00161 }
00170 void CPKIFCertificatePath::GetState(
00172 CPKIFCertificatePathStatePtr& state)const
00173 {
00174 state = m_impl->m_state;
00175 }
00176
00177
00186 void CPKIFCertificatePath::SetTrustRoot(
00188 const IPKIFTrustAnchorPtr& root)
00189 {
00190 m_impl->m_root = root;
00191 }
00199 void CPKIFCertificatePath::GetTrustRoot(
00201 IPKIFTrustAnchorPtr& root)const
00202 {
00203 root = m_impl->m_root;
00204 }
00205
00206
00220 void CPKIFCertificatePath::SetPathSettings(
00222 const CPKIFPathSettingsPtr& settings)
00223 {
00224 m_impl->m_settings = settings;
00225 }
00235 void CPKIFCertificatePath::GetPathSettings(
00237 CPKIFPathSettingsPtr& settings)const
00238 {
00239 settings = m_impl->m_settings;
00240 }
00241
00242
00250 void CPKIFCertificatePath::SetBuilderStats(
00252 const CPKIFBuilderStatisticsPtr& stats)
00253 {
00254 m_impl->m_stats = stats;
00255 }
00263 void CPKIFCertificatePath::GetBuilderStats(
00265 CPKIFBuilderStatisticsPtr& stats)const
00266 {
00267 stats = m_impl->m_stats;
00268 }
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279