From 75516dd3d04aa9a8f61adfb882d5d78b9267b613 Mon Sep 17 00:00:00 2001 From: bju Date: Sun, 21 Apr 2013 19:52:23 +0200 Subject: implemented server side --- vdr-vdrmanager/sock.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'vdr-vdrmanager/sock.h') diff --git a/vdr-vdrmanager/sock.h b/vdr-vdrmanager/sock.h index 0234afc..94da4b2 100644 --- a/vdr-vdrmanager/sock.h +++ b/vdr-vdrmanager/sock.h @@ -8,6 +8,7 @@ #include #include #include +#include using namespace std; @@ -17,6 +18,7 @@ protected: int sock; const char * password; bool forceCheckSvdrp; + bool useSSL; protected: cVdrmanagerSocket(); bool IsPasswordSet(); @@ -26,6 +28,7 @@ public: int GetSocket(); bool MakeDontBlock(); const char * GetPassword(); + void LogSSLError(); }; class cVdrmanagerClientSocket : public cVdrmanagerSocket @@ -36,6 +39,7 @@ private: bool disconnected; int client; bool login; + SSL * sslContext; public: cVdrmanagerClientSocket(const char * password); virtual ~cVdrmanagerClientSocket(); @@ -51,15 +55,19 @@ public: bool WritePending(); bool IsLoggedIn(); void SetLoggedIn(); + bool InitSSL(SSL_CTX * sslContext); }; class cVdrmanagerServerSocket : public cVdrmanagerSocket { +private: + SSL_CTX * sslContext; public: cVdrmanagerServerSocket(); virtual ~cVdrmanagerServerSocket(); - bool Create(int port, const char * password, bool forceCheckSvdrp); + bool Create(int port, const char * password, bool forceCheckSvdrp, bool useSSL, const char * pemFile); cVdrmanagerClientSocket * Accept(); + bool InitSSL(const char * pemFile); }; #endif -- cgit v1.2.3