RevokedInfo.cpp
Go to the documentation of this file.00001
00009 #include "RevokedInfo.h"
00010 #include "CRLReason.h"
00011
00012 #include "ASN1Helper.h"
00013 #include "OCSP.h"
00014
00015 #include "ToolkitUtils.h"
00016
00017 #include "PKIFX509Extensions2.h"
00018 using namespace std;
00019
00021 struct CPKIFRevokedInfoImpl
00022 {
00023 CPKIFStringPtr m_revocationTime;
00024 CPKIFCRLReasonPtr m_crlReason;
00025 };
00027
00035 CPKIFRevokedInfo::CPKIFRevokedInfo(void)
00036 :m_impl (new CPKIFRevokedInfoImpl)
00037 {
00038 LOG_STRING_DEBUG("CPKIFRevokedInfo::CPKIFRevokedInfo(void)", TOOLKIT_OCSP_ASN, 0, this);
00039 }
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 CPKIFRevokedInfo::CPKIFRevokedInfo(
00064 const char* time,
00066 const int reason)
00067 :m_impl (new CPKIFRevokedInfoImpl)
00068 {
00069 LOG_STRING_DEBUG("CPKIFRevokedInfo::CPKIFRevokedInfo(RevokedInfo& ri", TOOLKIT_OCSP_ASN, 0, this);
00070
00071 CPKIFStringPtr tmpStr(new std::string(time));
00072
00073
00074 if(reason >= 0)
00075 {
00076 CPKIFCRLReasonPtr crlReason(new CPKIFCRLReason(reason));
00077 }
00078 }
00086 CPKIFRevokedInfo::~CPKIFRevokedInfo(void)
00087 {
00088 LOG_STRING_DEBUG("CPKIFRevokedInfo::~CPKIFRevokedInfo(void)", TOOLKIT_OCSP_ASN, 0, this);
00089
00090 delete m_impl;
00091 m_impl = NULL;
00092 }
00100 const char* CPKIFRevokedInfo::GetRevocationTime() const
00101 {
00102 return NULL;
00103 }
00111 void CPKIFRevokedInfo::SetRevocationTime(
00113 CPKIFStringPtr& str)
00114 {
00115 m_impl->m_revocationTime = str;
00116 }
00124 CPKIFCRLReasonPtr CPKIFRevokedInfo::GetRevocationReason() const
00125 {
00126 return m_impl->m_crlReason;
00127 }
00135 void CPKIFRevokedInfo::SetRevocationReason(
00137 CPKIFCRLReasonPtr& crlReason)
00138 {
00139 m_impl->m_crlReason = crlReason;
00140 }
00141