X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Factmgr%2FfrmActivityMgr.cpp;h=a2168e210b126a30314e4891b6e27bc1a9f457ef;hb=ce6b921249b87bb62df485af240697ba81cd409d;hp=ec4700c6516a2cf7e37c6bca2d71f845c9129b51;hpb=2c8998278759b5bf6fc3bcf75afd289c214b6c84;p=xestiaab%2F.git diff --git a/source/actmgr/frmActivityMgr.cpp b/source/actmgr/frmActivityMgr.cpp index ec4700c..a2168e2 100644 --- a/source/actmgr/frmActivityMgr.cpp +++ b/source/actmgr/frmActivityMgr.cpp @@ -330,7 +330,54 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + BOOL ModifiedCertificateData = false; + CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(ConnObjectIter->second, (HWND)frmMainPtrGet->GetHandle()); + + if (!CryptUIDlgViewCertificate(&CertificateData, &ModifiedCertificateData)) { + wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog")); + } + + if (ModifiedCertificateData == false) { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #else bool UsingSSLBypass = false; @@ -436,11 +483,11 @@ void frmActivityMgr::ProcessTasksThread() #if defined(__APPLE__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetTrustObject()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #elif defined(__WIN32__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateContextPointer()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #else @@ -465,8 +512,6 @@ void frmActivityMgr::ProcessTasksThread() break; } - std::cout << ETagGetResponse.EntityTag << std::endl; - ETagDBPtr->UpdateETag(ContactFilename, ETagGetResponse.EntityTag, ETagGetResponse.EntityTag); iter->second = 4; @@ -527,7 +572,54 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + BOOL ModifiedCertificateData = false; + CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(ConnObjectIter->second, (HWND)frmMainPtrGet->GetHandle()); + + if (!CryptUIDlgViewCertificate(&CertificateData, &ModifiedCertificateData)) { + wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog")); + } + + if (ModifiedCertificateData == FALSE) { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #else bool UsingSSLBypass = false; @@ -795,7 +887,54 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + BOOL ModifiedCertificateData = false; + CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(ConnObjectIter->second, (HWND)frmMainPtrGet->GetHandle()); + + if (!CryptUIDlgViewCertificate(&CertificateData, &ModifiedCertificateData)) { + wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog")); + } + + if (ModifiedCertificateData == false) { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #else bool UsingSSLBypass = false; @@ -901,11 +1040,11 @@ void frmActivityMgr::ProcessTasksThread() #if defined(__APPLE__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetTrustObject()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #elif defined(__WIN32__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateContextPointer()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #else @@ -1024,7 +1163,54 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + BOOL ModifiedCertificateData = false; + CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(ConnObjectIter->second, (HWND)frmMainPtrGet->GetHandle()); + + if (!CryptUIDlgViewCertificate(&CertificateData, &ModifiedCertificateData)) { + wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog")); + } + + if (ModifiedCertificateData == false) { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #else bool UsingSSLBypass = false; @@ -1111,6 +1297,19 @@ void frmActivityMgr::ProcessTasksThread() ConnectResponse = ConnObjectIter->second->Connect(true); + if (ConnectResponse == COCONNECT_OK){ + + ExitLoop = true; + break; + + } else { + + ExitLoop = true; + iter->second = 2; + break; + + } + ExitLoop = true; break; @@ -1126,11 +1325,11 @@ void frmActivityMgr::ProcessTasksThread() #if defined(__APPLE__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetTrustObject()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #elif defined(__WIN32__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateContextPointer()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #else @@ -2076,4 +2275,4 @@ void frmActivityMgr::UpdateStatusLabel(wxCommandEvent& event){ } -} \ No newline at end of file +}