ColleagueSelectionPanel.cpp

Go to the documentation of this file.
00001 
00010 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && defined(PKIFRESOURCES_ALLOW_GCC_PRAGMA)
00011     #pragma implementation "ColleagueSelectionPanel.cpp"
00012 #endif
00013 
00014 //Pick up PKIF windows SDK configuration macros instead of WX's 
00015 #include "PKIFdll.h"
00016 // For compilers that support precompilation, includes "wx/wx.h".
00017 #include "wx/wxprec.h"
00018 
00019 #ifdef __BORLANDC__
00020     #pragma hdrstop
00021 #endif
00022 
00023 #include "ColleagueSelectionPanel.h"
00024 #include "PKIFCryptUtils.h"
00025 
00026 #include "PKIFReversiblePathBuilder.h"
00027 #include "PKIFCryptoPP.h"
00028 #include "PKIFCryptoPPRaw.h"
00029 #ifdef _WIN32
00030 #include "PKIFBCryptGuard.h"
00031 #include "PKIFCNGCAPI.h"
00032 #include "PKIFCNGCAPIRaw.h"
00033 #endif
00034 #include "PKIFNSSCertUpdate.h"
00035 #include "PKIFNSSCRLUpdate.h"
00036 #include "PKIFNSSRepository.h"
00037 #include "PKIFNSSTrustStore.h"
00038 #include "PKIFNSSHelper.h"
00039 #include "PKIFNSS.h"
00040 #include "PKIFNSSRaw.h"
00041 
00042 
00043 using namespace boost;
00044 // WDR: class implementations
00045 
00046 //----------------------------------------------------------------------------
00047 // CPKIFColleagueSelectionPanel
00048 //----------------------------------------------------------------------------
00049 
00050 // WDR: event table for CPKIFColleagueSelectionPanel
00051 
00052 BEGIN_EVENT_TABLE(CPKIFColleagueSelectionPanel,wxPanel)
00053     EVT_BUTTON( ID_BUTTON_NSSDB_BROWSE, CPKIFColleagueSelectionPanel::OnBrowseToNssDB )
00054 END_EVENT_TABLE()
00062 CPKIFColleagueSelectionPanel::CPKIFColleagueSelectionPanel( wxWindow *parent, wxWindowID id,
00063     const wxPoint &position, const wxSize& size, long style ) :
00064     wxPanel( parent, id, position, size, style )
00065 {
00066     // WDR: dialog function ColleagueSelectionPanel for CPKIFColleagueSelectionPanel
00067     ColleagueSelectionPanel( this, TRUE ); 
00068 
00069     #if !defined(WIN32)
00070     //GetCheckCapiCertcrlHkcu()->Enable(false);
00071     //GetCheckCapiCertcrlHklm()->Enable(false);
00072     //GetCheckCapiTrustAnchorHklm()->Enable(false);
00073     //GetCheckCapiTrustAnchorHkcu()->Enable(false);
00074     GetCheckCapiHkcuStored()->Enable(false);
00075     GetCheckCapiHklmStored()->Enable(false);
00076     GetCheckCapiRawmisc()->Enable(false);
00077 
00078     GetStaticCapiRaw()->Enable(false);
00079     GetCheckCapiRawmisc()->Enable(false);
00080     GetStaticCapiHkcuStored()->Enable(false);
00081     GetStaticCapiHklmStored()->Enable(false);
00082     //GetStaticCapiHkcu()->Enable(false);
00083     //GetStaticCapiHklm()->Enable(false);
00084     //GetCheckCapiCertcrlHkcu()->Enable(false);
00085     //GetCheckCapiCertcrlHklm()->Enable(false);
00086 
00087     #endif
00088     
00089     #if defined(WIN32) || defined(_WIN32)
00090     //GetStaticCapiHkcu()->SetCheckBox(GetCheckCapiCertcrlHkcu());
00091     //GetStaticCapiHklm()->SetCheckBox(GetCheckCapiCertcrlHklm());
00092     GetStaticCapiRaw()->SetCheckBox(GetCheckCapiRawmisc());
00093     GetStaticCapiHkcuStored()->SetCheckBox(GetCheckCapiHkcuStored());
00094     GetStaticCapiHklmStored()->SetCheckBox(GetCheckCapiHklmStored());
00095     #endif
00096     GetStaticNssRaw()->SetCheckBox(GetCheckNssRawmisc());
00097     GetStaticNssStored()->SetCheckBox(GetCheckNssStored());
00098     //GetStaticNssSr()->SetCheckBox(GetCheckNssCertcrl());
00099     GetStaticCppRaw()->SetCheckBox(GetCheckCppRaw());
00100     GetStaticCppStored()->SetCheckBox(GetCheckCppStored());
00101 
00102     //GetCheckReverse()->Show(FALSE);
00103     //GetCheckForward2()->Show(FALSE);
00104 
00105     if(!CPKIFNSSHelper::NSSAvaliable()) 
00106     {
00107         GetCheckNssRawmisc()->Enable(false);
00108         GetCheckNssStored()->Enable(false);
00109         GetStaticNssRaw()->Enable(false);
00110         GetStaticNssStored()->Enable(false);
00111         GetTextNssDbdir()->Enable(false);
00112         GetDirLookUpButton()->Enable(false);
00113     }
00114 }
00122 bool CPKIFColleagueSelectionPanel::Validate()
00123 {
00124     return TRUE;
00125 }
00126 
00127 // WDR: handler implementations for CPKIFColleagueSelectionPanel
00128 
00136 void CPKIFColleagueSelectionPanel::OnBrowseToNssDB( wxCommandEvent &event )
00137 {
00138     const wxString& chosen = wxDirSelector(wxT("Select the NSS database directory"));
00139 
00140     GetTextNssDbdir()->SetValue(chosen);
00141 }
00149 void CPKIFColleagueSelectionPanel::LoadCryptoSettings()
00150 {
00151     CPKIFCryptoMediator2* cm = m_m->GetMediator<CPKIFCryptoMediator2>();
00152     if(NULL == cm) return;
00153 
00154     std::vector<IPKIFColleaguePtr> c;
00155     cm->GetColleagues(c);
00156 
00157     #if defined(WIN32) || defined(_WIN32)
00158     CPKIFCAPIRawPtr capiRaw;
00159     CPKIFCAPI2Ptr capiStoredHkcu;
00160     CPKIFCAPI2Ptr capiStoredHklm;
00161     CPKIFCNGCAPIRawPtr capiNGRaw;
00162     CPKIFCNGCAPIPtr capiNGStoredHkcu;
00163     CPKIFCNGCAPIPtr capiNGStoredHklm;
00164     CPKIFBCryptGuard cngGuard;
00165     bool useCNG = cngGuard.IsCNGAvailable();
00166     #endif
00167     CPKIFNSSRawPtr nssRaw;
00168     CPKIFNSSPtr nssStored;
00169 
00170     CPKIFCryptoPPRawPtr cppRaw;
00171     CPKIFCryptoPPPtr cppStored;
00172 
00173     std::string nssDBDir;
00174     if(IsNSSDBInitialized())
00175     {
00176         nssDBDir = GetCurrentNSSDBDir();
00177         GetDirLookUpButton()->Disable();
00178         GetTextNssDbdir()->SetEditable(false);
00179 
00180     }
00181     std::vector<IPKIFColleaguePtr>::iterator pos;
00182     std::vector<IPKIFColleaguePtr>::iterator end = c.end();
00183     for(pos = c.begin(); pos != end; ++pos)
00184     {   
00185     
00186         if(NULL != dynamic_pointer_cast<CPKIFNSSRaw, IPKIFColleague>(*pos))
00187             nssRaw = dynamic_pointer_cast<CPKIFNSSRaw, IPKIFColleague>(*pos);
00188         else if(NULL != dynamic_pointer_cast<CPKIFNSS, IPKIFColleague>(*pos))
00189             nssStored = dynamic_pointer_cast<CPKIFNSS, IPKIFColleague>(*pos);
00190         else if(NULL != dynamic_pointer_cast<CPKIFCryptoPPRaw, IPKIFColleague>(*pos))
00191             cppRaw = dynamic_pointer_cast<CPKIFCryptoPPRaw, IPKIFColleague>(*pos);
00192         else if(NULL != dynamic_pointer_cast<CPKIFCryptoPP, IPKIFColleague>(*pos))
00193             cppStored = dynamic_pointer_cast<CPKIFCryptoPP, IPKIFColleague>(*pos);
00194         #if defined(WIN32) || defined(_WIN32)
00195         else if(NULL != dynamic_pointer_cast<CPKIFCAPIRaw, IPKIFColleague>(*pos))
00196             capiRaw = dynamic_pointer_cast<CPKIFCAPIRaw, IPKIFColleague>(*pos);
00197         else if(NULL != dynamic_pointer_cast<CPKIFCAPI2, IPKIFColleague>(*pos))
00198         {
00199             CPKIFCAPI2Ptr tmp = dynamic_pointer_cast<CPKIFCAPI2, IPKIFColleague>(*pos);
00200             int regLoc = tmp->GetRegLoc();
00201 
00202             if(CERT_SYSTEM_STORE_CURRENT_USER == regLoc)
00203                 capiStoredHkcu = tmp;
00204             else if(CERT_SYSTEM_STORE_LOCAL_MACHINE == regLoc)
00205                 capiStoredHklm = tmp;
00206             
00207         }
00208         else if(NULL != dynamic_pointer_cast<CPKIFCNGCAPIRaw, IPKIFColleague>(*pos))
00209             capiNGRaw = dynamic_pointer_cast<CPKIFCNGCAPIRaw, IPKIFColleague>(*pos);
00210         else if(NULL != dynamic_pointer_cast<CPKIFCNGCAPI, IPKIFColleague>(*pos))
00211         {
00212             CPKIFCNGCAPIPtr tmp = dynamic_pointer_cast<CPKIFCNGCAPI, IPKIFColleague>(*pos);
00213             int regLoc = tmp->GetRegLoc();
00214 
00215             if(CERT_SYSTEM_STORE_CURRENT_USER == regLoc)
00216                 capiNGStoredHkcu = tmp;
00217             else if(CERT_SYSTEM_STORE_LOCAL_MACHINE == regLoc)
00218                 capiNGStoredHklm = tmp;
00219             
00220         }
00221         #endif
00222 
00223     }
00224 
00225     GetCheckNssStored()->SetValue(NULL != nssStored);
00226     GetCheckNssRawmisc()->SetValue(NULL != nssRaw);
00227     GetCheckCppStored()->SetValue(NULL != cppStored);
00228     GetCheckCppRaw()->SetValue(NULL != cppRaw);
00229     GetTextNssDbdir()->SetValue(wxString(nssDBDir.c_str(),wxConvUTF8));
00230     #if defined(WIN32) || defined(_WIN32)
00231     if(!useCNG)
00232     {
00233         GetCheckCapiHkcuStored()->SetValue(NULL != capiStoredHkcu);
00234         GetCheckCapiHklmStored()->SetValue(NULL != capiStoredHklm);
00235         GetCheckCapiRawmisc()->SetValue(NULL != capiRaw);
00236     } 
00237     else
00238     {
00239         GetCheckCapiHkcuStored()->SetValue(NULL != capiNGStoredHkcu);
00240         GetCheckCapiHklmStored()->SetValue(NULL != capiNGStoredHklm);
00241         GetCheckCapiRawmisc()->SetValue(NULL != capiNGRaw);
00242     }
00243     #endif
00244 
00245     
00246     GetTextNssDbdir()->SetValue(wxString(nssDBDir.c_str(),wxConvUTF8));
00247 }
00248 
00249 //void CPKIFColleagueSelectionPanel::LoadStorageAndRetrievalSettings()
00250 //{
00251 //    CPKIFCacheMediator2* sm = m_m->GetMediator<CPKIFCacheMediator2>();
00252 //    if(NULL == sm) return;
00253 //
00254 //    std::vector<IPKIFColleaguePtr> c;
00255 //    sm->GetColleagues(c);
00256 //
00257 //  #if defined(WIN32) || defined(_WIN32)
00258 //    CPKIFCAPICertUpdate2Ptr capiCertUpHKCU;
00259 //    CPKIFCAPICRLUpdate2Ptr capiCrlUpHKCU;
00260 //    CPKIFCAPIRepository2Ptr capiRepHKCU;
00261 //    CPKIFCAPICertUpdate2Ptr capiCertUpHKLM;
00262 //    CPKIFCAPICRLUpdate2Ptr capiCrlUpHKLM;
00263 //    CPKIFCAPIRepository2Ptr capiRepHKLM;
00264 //    CPKIFCAPITrustStore2Ptr capiTAHKCU;
00265 //    CPKIFCAPITrustStore2Ptr capiTAHKLM;
00266 //  CPKIFCAPITrustRootCRLRepository2Ptr capiTACRLCU;
00267 //  CPKIFCAPITrustRootCRLRepository2Ptr capiTACRLLM;
00268 //  #endif
00269 //    CPKIFNSSCertUpdatePtr nssCertUp;
00270 //    CPKIFNSSCRLUpdatePtr nssCrlUp;
00271 //    CPKIFNSSRepositoryPtr nssRep;
00272 //    CPKIFNSSTrustStorePtr nssTA;
00273 //
00274 //    CPKIFCRLDPRetrievalPtr crlDP;
00275 //
00276 //    SimpleCertCachePtr simpleCert;
00277 //    SimpleCRLCachePtr simpleCRL;
00278 //  SimpleRootStorePtr simpleRoot;
00279 //
00280 //  std::string nssDBDir;
00281 //  if(IsNSSDBInitialized())
00282 //  {
00283 //      nssDBDir = GetCurrentNSSDBDir();
00284 //      GetDirLookUpButton()->Disable();
00285 //      GetTextNssDbdir()->SetEditable(false);
00286 //  }
00287 //
00288 //    std::vector<IPKIFColleaguePtr>::iterator pos;
00289 //    std::vector<IPKIFColleaguePtr>::iterator end = c.end();
00290 //    for(pos = c.begin(); pos != end; ++pos)
00291 //    {
00292 //      
00293 //        if(NULL != dynamic_pointer_cast<SimpleCertCache, IPKIFColleague>(*pos))
00294 //        {
00295 //            simpleCert = dynamic_pointer_cast<SimpleCertCache, IPKIFColleague>(*pos);
00296 //        }
00297 //      #if defined(WIN32) || defined(_WIN32)
00298 //        else if(NULL != dynamic_pointer_cast<CPKIFCAPICertUpdate2, IPKIFColleague>(*pos))
00299 //        {
00300 //            CPKIFCAPICertUpdate2Ptr tmp = dynamic_pointer_cast<CPKIFCAPICertUpdate2, IPKIFColleague>(*pos);
00301 //            const char* store = tmp->GetStore();
00302 //            int regLoc = tmp->GetRegLoc();
00303 //            if(0 == strcmp(store, g_defCACCAPIStore))
00304 //            {
00305 //                if(CERT_SYSTEM_STORE_CURRENT_USER == regLoc)
00306 //                    capiCertUpHKCU = tmp;
00307 //                else if(CERT_SYSTEM_STORE_LOCAL_MACHINE == regLoc)
00308 //                    capiCertUpHKLM = tmp;
00309 //            }
00310 //        }
00311 //        else if(NULL != dynamic_pointer_cast<CPKIFCAPICRLUpdate2, IPKIFColleague>(*pos))
00312 //        {
00313 //            CPKIFCAPICRLUpdate2Ptr tmp = dynamic_pointer_cast<CPKIFCAPICRLUpdate2, IPKIFColleague>(*pos);
00314 //            const char* store = tmp->GetStore();
00315 //            int regLoc = tmp->GetRegLoc();
00316 //            if(0 == strcmp(store, g_defCACCAPIStore))
00317 //            {
00318 //                if(CERT_SYSTEM_STORE_CURRENT_USER == regLoc)
00319 //                    capiCrlUpHKCU = tmp;
00320 //                else if(CERT_SYSTEM_STORE_LOCAL_MACHINE == regLoc)
00321 //                    capiCrlUpHKLM = tmp;
00322 //            }
00323 //        }
00324 //        else if(NULL != dynamic_pointer_cast<CPKIFCAPIRepository2, IPKIFColleague>(*pos))
00325 //        {
00326 //            CPKIFCAPIRepository2Ptr tmp = dynamic_pointer_cast<CPKIFCAPIRepository2, IPKIFColleague>(*pos);
00327 //            const char* store = tmp->GetStore();
00328 //            int regLoc = tmp->GetRegLoc();
00329 //            if(0 == strcmp(store, g_defCACCAPIStore))
00330 //            {
00331 //                if(CERT_SYSTEM_STORE_CURRENT_USER == regLoc)
00332 //                    capiRepHKCU = tmp;
00333 //                else if(CERT_SYSTEM_STORE_LOCAL_MACHINE == regLoc)
00334 //                    capiRepHKLM = tmp;
00335 //            }
00336 //        }
00337 //        else if(NULL != dynamic_pointer_cast<CPKIFCAPITrustStore2, IPKIFColleague>(*pos))
00338 //        {
00339 //            CPKIFCAPITrustStore2Ptr tmp = dynamic_pointer_cast<CPKIFCAPITrustStore2, IPKIFColleague>(*pos);
00340 //            const char* store = tmp->GetStore();
00341 //            int regLoc = tmp->GetRegLoc();
00342 //            if(0 == strcmp(store, g_defCACCAPITrustStore))
00343 //            {
00344 //                if(CERT_SYSTEM_STORE_CURRENT_USER == regLoc)
00345 //                    capiTAHKCU = tmp;
00346 //                else if(CERT_SYSTEM_STORE_LOCAL_MACHINE == regLoc)
00347 //                    capiTAHKLM = tmp;
00348 //            }
00349 //        }
00350 //        else if(NULL != dynamic_pointer_cast<CPKIFCAPITrustRootCRLRepository2, IPKIFColleague>(*pos))
00351 //        {
00352 //          CPKIFCAPITrustRootCRLRepository2Ptr tmp = dynamic_pointer_cast<CPKIFCAPITrustRootCRLRepository2, IPKIFColleague>(*pos);
00353 //            const char* store = tmp->GetStore();
00354 //            int regLoc = tmp->GetRegLoc();
00355 //            if(0 == strcmp(store, g_defCACCAPITrustStore))
00356 //            {
00357 //                if(CERT_SYSTEM_STORE_CURRENT_USER == regLoc)
00358 //                    capiTACRLCU = tmp;
00359 //                else if(CERT_SYSTEM_STORE_LOCAL_MACHINE == regLoc)
00360 //                    capiTACRLLM = tmp;
00361 //            }
00362 //            
00363 //        }
00364 //      #endif
00365 //        else if(NULL != dynamic_pointer_cast<SimpleCRLCache, IPKIFColleague>(*pos))
00366 //        {
00367 //            simpleCRL = dynamic_pointer_cast<SimpleCRLCache, IPKIFColleague>(*pos);
00368 //        }
00369 //        else if(NULL != dynamic_pointer_cast<SimpleRootStore, IPKIFColleague>(*pos))
00370 //        {
00371 //            simpleRoot = dynamic_pointer_cast<SimpleRootStore, IPKIFColleague>(*pos);
00372 //        }
00373 //        else if(NULL != dynamic_pointer_cast<CPKIFNSSRepository, IPKIFColleague>(*pos))
00374 //        {
00375 //            nssRep = dynamic_pointer_cast<CPKIFNSSRepository, IPKIFColleague>(*pos);
00376 //        }
00377 //        else if(NULL != dynamic_pointer_cast<CPKIFNSSCRLUpdate, IPKIFColleague>(*pos))
00378 //        {
00379 //            nssCrlUp = dynamic_pointer_cast<CPKIFNSSCRLUpdate, IPKIFColleague>(*pos);
00380 //        }
00381 //        else if(NULL != dynamic_pointer_cast<CPKIFNSSCertUpdate, IPKIFColleague>(*pos))
00382 //        {
00383 //            nssCertUp = dynamic_pointer_cast<CPKIFNSSCertUpdate, IPKIFColleague>(*pos);
00384 //        }
00385 //        else if(NULL != dynamic_pointer_cast<CPKIFCRLDPRetrieval, IPKIFColleague>(*pos))
00386 //        {
00387 //            crlDP = dynamic_pointer_cast<CPKIFCRLDPRetrieval, IPKIFColleague>(*pos);
00388 //        }
00389 //        else if(NULL != dynamic_pointer_cast<CPKIFNSSTrustStore, IPKIFColleague>(*pos))
00390 //        {
00391 //            nssTA = dynamic_pointer_cast<CPKIFNSSTrustStore, IPKIFColleague>(*pos);
00392 //        }
00393 //    }
00394 //  #if defined(WIN32) || defined(_WIN32)
00395 //    GetCheckCapiCertcrlHkcu()->SetValue(NULL != capiRepHKCU);
00396 //    GetCheckCapiCertcrlHklm()->SetValue(NULL != capiRepHKLM);
00397 //    GetCheckCapiTrustAnchorHklm()->SetValue(NULL != capiTAHKLM);
00398 //    GetCheckCapiTrustAnchorHkcu()->SetValue(NULL != capiTAHKCU);
00399 //  #endif
00400 //    GetCheckNssCertcrl()->SetValue(NULL != nssRep || NULL != nssCrlUp || NULL != nssCertUp);
00401 //    GetCheckSimpleCert()->SetValue(NULL != simpleCert);  
00402 //    GetCheckSimpleCrl()->SetValue(NULL != simpleCRL);
00403 //  GetCheckTrustAnchors()->SetValue(NULL != simpleRoot);
00404 //    GetCheckRetrieveFromCrldp()->SetValue(NULL != crlDP);
00405 //    GetCheckNssTrustAnchors()->SetValue(NULL != nssTA);
00406 //  GetTextNssDbdir()->SetValue(nssDBDir.c_str());
00407 //}
00408 
00409 //void CPKIFColleagueSelectionPanel::LoadPathProcessingSettings()
00410 //{
00411 //    CPKIFPathProcessingMediator2* pm = m_m->GetMediator<CPKIFPathProcessingMediator2>();
00412 //    if(NULL == pm) return;
00413 //
00414 //    std::vector<IPKIFColleaguePtr> c;
00415 //    pm->GetColleagues(c);
00416 //
00417 //    CPKIFPathBuilder2Ptr fpb;
00418 //    CPKIFReversiblePathBuilderPtr rpb;
00419 //  CPKIFReversiblePathBuilderPtr fpb2;
00420 //    CPKIFPathValidator2Ptr pv;
00421 //    CPKIFPathBuildAndValidatePtr bav;
00422 //
00423 //    std::vector<IPKIFColleaguePtr>::iterator pos;
00424 //    std::vector<IPKIFColleaguePtr>::iterator end = c.end();
00425 //    for(pos = c.begin(); pos != end; ++pos)
00426 //    {
00427 //        if(NULL != dynamic_pointer_cast<CPKIFPathBuilder2, IPKIFColleague>(*pos))
00428 //            fpb = dynamic_pointer_cast<CPKIFPathBuilder2, IPKIFColleague>(*pos);
00429 //        else if(NULL != dynamic_pointer_cast<CPKIFReversiblePathBuilder, IPKIFColleague>(*pos))
00430 //      {
00431 //          CPKIFReversiblePathBuilderPtr tmpPB = dynamic_pointer_cast<CPKIFReversiblePathBuilder, IPKIFColleague>(*pos);
00432 //          if(PBD_REVERSE == tmpPB->GetDirection())
00433 //              rpb = tmpPB;
00434 //          else
00435 //              fpb2 = tmpPB;
00436 //      }
00437 //        else if(NULL != dynamic_pointer_cast<CPKIFPathValidator2, IPKIFColleague>(*pos))
00438 //            pv = dynamic_pointer_cast<CPKIFPathValidator2, IPKIFColleague>(*pos);
00439 //        else if(NULL != dynamic_pointer_cast<CPKIFPathBuildAndValidate, IPKIFColleague>(*pos))
00440 //            bav = dynamic_pointer_cast<CPKIFPathBuildAndValidate, IPKIFColleague>(*pos);
00441 //    }
00442 //
00443 //    GetCheckForward()->SetValue(NULL != fpb);
00444 //  GetCheckForward2()->SetValue(NULL != fpb2);
00445 //    GetCheckReverse()->SetValue(NULL != rpb);
00446 //    GetCheckLocalValidation()->SetValue(NULL != pv);
00447 //    GetCheckLocalBuildAndValidate()->SetValue(NULL != bav);
00448 //}
00449 //
00450 //void CPKIFColleagueSelectionPanel::LoadRevocationStatusSettings()
00451 //{
00452 //    CPKIFRevocationStatusMediator2* rm = m_m->GetMediator<CPKIFRevocationStatusMediator2>();
00453 //    if(NULL == rm) return;
00454 //
00455 //    std::vector<IPKIFColleaguePtr> c;
00456 //    rm->GetColleagues(c);
00457 //
00458 //    CPKIFX509CRLCheckerPtr crl;
00459 //    CPKIFOCSPCheckerPtr ocspAIA;
00460 //
00461 //    std::vector<IPKIFColleaguePtr>::iterator pos;
00462 //    std::vector<IPKIFColleaguePtr>::iterator end = c.end();
00463 //    for(pos = c.begin(); pos != end; ++pos)
00464 //    {
00465 //        if(NULL != dynamic_pointer_cast<CPKIFX509CRLChecker, IPKIFColleague>(*pos))
00466 //            crl = dynamic_pointer_cast<CPKIFX509CRLChecker, IPKIFColleague>(*pos);
00467 //        else if(NULL != dynamic_pointer_cast<CPKIFOCSPChecker, IPKIFColleague>(*pos))
00468 //        {
00469 //            CPKIFOCSPCheckerPtr tmp = dynamic_pointer_cast<CPKIFOCSPChecker, IPKIFColleague>(*pos);
00470 //            if(tmp->GetHost() == (std::string*)NULL && tmp->GetURL() == (std::string*)NULL)
00471 //                ocspAIA = tmp;
00472 //        }
00473 //    }
00474 //
00475 //    GetCheckOcspAia()->SetValue(NULL != ocspAIA);
00476 //    GetCheckProcessCRLs()->SetValue(NULL != crl);
00477 //}
00478 
00486 void CPKIFColleagueSelectionPanel::OnInitDialog(wxInitDialogEvent& event)
00487 {
00488     if(NULL == m_m) return;
00489 
00490     LoadCryptoSettings();
00491     //LoadStorageAndRetrievalSettings();
00492     //LoadPathProcessingSettings();
00493     //LoadRevocationStatusSettings();
00494 }
00502 void CPKIFColleagueSelectionPanel::SetInitialMediator(IPKIFMediatorPtr& m)
00503 {
00504     m_m = m;
00505 }

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