Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
CalDAV: WIP CalDAV support
[xestiacalendar/.git] / source / objects / CalDAV / CalDAV.h
index 148f2d0..7ca237a 100644 (file)
@@ -30,6 +30,7 @@
 #include "../../common/colour.h"
 #include "../../common/text.h"
 #include "../../common/uuid.h"
+#include "../../common/sslcertstructs.h"
 
 using namespace std;
 
@@ -126,6 +127,17 @@ struct CalDAVSendData{
        int seek = 0;
 };
 
+// Objects to move to a ConnectionObject-like interface in the future.
+
+enum COSSLVerified {
+       COSSL_UNITTESTFAIL = -1,
+       COSSL_VERIFIED,
+       COSSL_VERIFIED_USER,
+       COSSL_UNABLETOVERIFY,
+       COSSL_NOTAPPLICABLE,
+       COSSL_NORESULT
+};
+
 class CalDAV{
 
        private:
@@ -150,6 +162,9 @@ class CalDAV{
                string serverData = "";
                string serverHeader = "";
        
+               COSSLVerified SSLVerified;
+               bool EnableSSLBypass = false;
+               bool SSLSelfSigned = false;
        public:
                CalDAV();
                ~CalDAV();
@@ -189,13 +204,28 @@ class CalDAV{
                string GetCalendarHome(string userPrincipalURI);
                
                CalDAVServerResult GetEntryETag(string *calendarEntryHREF, string *eTagValue);
-       
+
+               COSSLVerified SSLVerify();
+               void BypassSSLVerification(bool EnableBypass);
+               
+#if defined(__APPLE__)
+    
+               SecTrustRef BuildSSLCollection();
+    
+#elif defined(__WIN32__)
+
+               PCCERT_CONTEXT BuildSSLCollection();
+
+#else
+               SSLCertCollectionString BuildSSLCollection();
+
+#endif
 };
 
 // Subroutines that are used with the 
 // CalDAVConnectionData struct.
 
-bool CalDAVObjectValidSettings(CalDAVConnectionData *connData);
-string BuildServerAddress(CalDAVConnectionData *connData, string uriAddress);
+//bool CalDAVObjectValidSettings(CalDAVConnectionData *connData);
+//string BuildServerAddress(CalDAVConnectionData *connData, string uriAddress);
 
 #endif
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy