diff options
author | bju <bju@maxi.fritz.box> | 2014-01-22 02:04:59 +0100 |
---|---|---|
committer | bju <bju@maxi.fritz.box> | 2014-01-22 02:04:59 +0100 |
commit | 96c14c6b7ee52d1a556d6bc0cd78caf959d66eec (patch) | |
tree | ffce3289cb334dfc3bc32a7fc6811af9050cadbd /vdr-vdrmanager/serversock.h | |
parent | 2676b99b3a7cae3ea8ebe827ac20684a90a84d07 (diff) | |
download | vdr-manager-96c14c6b7ee52d1a556d6bc0cd78caf959d66eec.tar.gz vdr-manager-96c14c6b7ee52d1a556d6bc0cd78caf959d66eec.tar.bz2 |
http://projects.vdr-developer.org/issues/1267:
- some fixes on client side certificate validation
- added SSL server side support to the plugin
Diffstat (limited to 'vdr-vdrmanager/serversock.h')
-rw-r--r-- | vdr-vdrmanager/serversock.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vdr-vdrmanager/serversock.h b/vdr-vdrmanager/serversock.h new file mode 100644 index 0000000..53eec62 --- /dev/null +++ b/vdr-vdrmanager/serversock.h @@ -0,0 +1,35 @@ +/* + * extendes sockets + */ + +#ifndef _VDRMON_SERVERSOCK +#define _VDRMON_SERVERSOCK + +#include <unistd.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <openssl/ssl.h> +#include <string> + +#include "clientsock.h" + +#define SSL_NO_RETRY 0 +#define SSL_RETRY_READ 1 +#define SSL_RETRY_WRITE 2 + +using namespace std; + +class cVdrmanagerServerSocket : public cVdrmanagerSocket +{ +private: + int port; + SSL_CTX * sslCtx; +public: + cVdrmanagerServerSocket(); + virtual ~cVdrmanagerServerSocket(); + bool Create(int port, const char * password, bool forceCheckSvdrp, int compressionMode, const char * certFile, const char * keyFile); + cVdrmanagerClientSocket * Accept(); + int GetPort(); +}; + +#endif |