- if (ErrorCode == CURLE_SSL_CACERT ||
- ErrorCode == CURLE_PEER_FAILED_VERIFICATION ||
- ErrorCode == CURLE_SSL_CONNECT_ERROR){
-
- // Invalid SSL certificate so bring up a dialog to the user
- // explaining what has happened and the options available.
-
- // Stop all the timers.
-
- frmMainPtrGet->PauseAllTimers();
-
- int SSLResult;
-
-#if defined(__APPLE__)
-
- // Bring up the trust panel and display the SSL certificate dialog.
-
- SSLResult = DisplayTrustPanel(ConnHandle.GetTrustObject(), AccountNameFriendly);
-
- // Update the SSL account with the trust object.
-
- if (SSLResult != NSOKButton){
-
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnHandle.GetTrustObject());
- iter->second = 2;
- break;
-
- } else {
-
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetTrustObject());
-
- }
-
-#elif defined(__WIN32__)
-
- BOOL ModifiedCertificateData;
- CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(&ConnHandle, (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, ConnHandle.GetCertificateContextPointer());
- iter->second = 2;
- break;
-
- } else {
-
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateContextPointer());
-
- }
+ bool ExitLoop = FALSE;
+
+ while (ExitLoop == FALSE){
+
+ if (ConnObjectIter->second->SSLVerify() == COSSL_UNABLETOVERIFY){
+
+ frmMainPtrGet->PauseAllTimers();
+
+#if defined(__APPLE__)
+#elif defined(__WIN32__)