X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2FCalDAV%2FCalDAV.h;h=7ca237a5988ed98a903f70c6316bb448be7b535c;hb=7ac592fd401bd3a5e8c346827c63b34899a17e64;hp=148f2d07728b9b50278c5a3822a6cb99afc5c79d;hpb=28f3ef896d323eb07dbc74bfb6e71c364295105a;p=xestiacalendar%2F.git diff --git a/source/objects/CalDAV/CalDAV.h b/source/objects/CalDAV/CalDAV.h index 148f2d0..7ca237a 100644 --- a/source/objects/CalDAV/CalDAV.h +++ b/source/objects/CalDAV/CalDAV.h @@ -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