summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/sock.h
diff options
context:
space:
mode:
authorbju <bju@maxi.fritz.box>2013-04-21 19:52:23 +0200
committerbju <bju@maxi.fritz.box>2013-04-21 19:52:23 +0200
commit75516dd3d04aa9a8f61adfb882d5d78b9267b613 (patch)
tree16fa0c2a14407da99419ce2ccf73165fbb653ee1 /vdr-vdrmanager/sock.h
parent6ee80ab4953b8a7d95133ebb08f064948c072873 (diff)
downloadvdr-manager-75516dd3d04aa9a8f61adfb882d5d78b9267b613.tar.gz
vdr-manager-75516dd3d04aa9a8f61adfb882d5d78b9267b613.tar.bz2
implemented server side
Diffstat (limited to 'vdr-vdrmanager/sock.h')
-rw-r--r--vdr-vdrmanager/sock.h10
1 files changed, 9 insertions, 1 deletions
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 <sys/types.h>
#include <sys/socket.h>
#include <string>
+#include <openssl/ssl.h>
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