#include "../vcard/vcard34conv.h"
#include "../vcard/vcard.h"
-#ifndef FRMACTIVITYMGR_H
-#define FRMACTIVITYMGR_H
-
DEFINE_EVENT_TYPE(ACTMGR_RESUMEPROC);
DEFINE_EVENT_TYPE(ACTMGR_TOGGLECONN);
DEFINE_EVENT_TYPE(ACTMGR_STARTTIMER);
std::map<wxString,FileSyncData> *SCListData = NULL;
while (ExitLoop == FALSE){
-
- ServerContactList = ConnHandle.GetContactList(SyncTokenLoad.ToUTF8());
- SSLCertCollection certcol = ConnHandle.GetCertificateData();
-
- // Create a pointer for the std::map<wxString,FileSyncData>.
-
- SCListData = &ServerContactList.ListData;
// Check if any errors have occured whilst getting the data.
- int ErrorCode = ConnHandle.GetResultCode();
+ int ErrorCode = ConnHandle.SSLVerifyTest();
- if (ErrorCode != 0){
+ if (ErrorCode != CURLE_OK){
- if (ErrorCode == 60 || ErrorCode == 51){
+ 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.
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"));
+ }
+
#else
// Setup the data to be sent in the wxPostEvent command.
bool ContinueProcess = AccDir.GetFirst(&AccDirFilename, wxEmptyString, wxDIR_DEFAULT);
+ ServerContactList = ConnHandle.GetContactList(SyncTokenLoad.ToUTF8());
+ SSLCertCollection certcol = ConnHandle.GetCertificateData();
+
+ // Create a pointer for the std::map<wxString,FileSyncData>.
+
+ SCListData = &ServerContactList.ListData;
+
// Process the server data.
if (SCListData != NULL){
}
-}
-
-#endif
\ No newline at end of file
+}
\ No newline at end of file
// with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
#include "frmEditAccount.h"
-#include "frmInvalidSSLCertificate.h"
-#include "carddav/carddav.h"
-#include "common/svrblist.h"
frmEditAccount::frmEditAccount( wxWindow* parent )
:
#if defined(__APPLE__)
SSLResult = DisplayTrustPanel(&CDavObj);
-
+
+#elif defined(__WIN32__)
+
+ BOOL ModifiedCertificateData;
+ CRYPTUI_VIEWCERTIFICATE_STRUCTW CertificateData = BuildCertificateData(&CDavObj, (HWND)this->GetHandle());
+
+ if (!CryptUIDlgViewCertificate(&CertificateData, &ModifiedCertificateData)){
+ wxMessageBox(_("An error occured while trying to open the certificate dialog."), _("Error opening Certificate Information dialog"));
+ return;
+ }
+
+ if (ModifiedCertificateData == FALSE){
+ wxMessageBox(_("Unable to get server prefix without a valid SSL certificate."), _("Error getting server prefix"));
+ return;
+ }
+
#else
frmInvalidSSLCertificate *frmICPtr = new frmInvalidSSLCertificate(this);