From e41a3ab9dc4b2d35eaf76faf1a4160dd180e16e7 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 14 Aug 2016 23:30:26 +0100 Subject: [PATCH] Updated SSL structs and ConnectionObject --- source/common/sslcertstructs.h | 20 ++++++++++++++++--- source/connobject/ConnectionObject.h | 3 ++- source/tests/classes/FakeConnectionObject.cpp | 4 ++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/source/common/sslcertstructs.h b/source/common/sslcertstructs.h index 1b5bb43..9f93509 100644 --- a/source/common/sslcertstructs.h +++ b/source/common/sslcertstructs.h @@ -16,11 +16,12 @@ // You should have received a copy of the GNU General Public License along // with Xestia Address Book. If not, see -#include - #ifndef __COMMON_SSLCERTSTRUCTS_H__ #define __COMMON_SSLCERTSTRUCTS_H__ +#include +#include +#include struct SSLCertData{ @@ -32,9 +33,22 @@ struct SSLCertCollection{ int SuccessCode = 0; - //std::map SSLCollection; std::map SSLCollection; }; +struct SSLCertDataString{ + + std::multimap CertData; + +}; + +struct SSLCertCollectionString{ + + int SuccessCode = 0; + + std::map SSLCollection; + +}; + #endif \ No newline at end of file diff --git a/source/connobject/ConnectionObject.h b/source/connobject/ConnectionObject.h index 4ba84b8..d0bd1ce 100644 --- a/source/connobject/ConnectionObject.h +++ b/source/connobject/ConnectionObject.h @@ -81,8 +81,9 @@ class ConnectionObject{ virtual bool IsTaskCompleted() {}; virtual COConnectResult Connect(bool DoAuthentication) {}; + virtual void BypassSSLVerification(bool EnableBypass) {}; - virtual std::string GetDefaultPrefix() {}; + virtual COServerResponse GetDefaultPrefix(std::string *ServerPrefix) {}; virtual COServerResponse AddContact(std::string Location, std::string Data) {}; virtual COServerResponse EditContact(std::string Location, std::string Data) {}; virtual COServerResponse DeleteContact(std::string Location, std::string EntityTag) {}; diff --git a/source/tests/classes/FakeConnectionObject.cpp b/source/tests/classes/FakeConnectionObject.cpp index 7eaffbb..9cb84ad 100644 --- a/source/tests/classes/FakeConnectionObject.cpp +++ b/source/tests/classes/FakeConnectionObject.cpp @@ -175,4 +175,8 @@ bool FakeConnectionObject::AbleToLogin(){ bool FakeConnectionObject::HasValidResponse(){ return ValidResponse; +} + +bool FakeConnectionObject::IsSelfSigned(){ + return SSLSelfSigned; } \ No newline at end of file -- 2.39.5