diff options
| author | Paul Buetow <paul@buetow.org> | 2010-11-21 17:01:59 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2010-11-21 17:01:59 +0000 |
| commit | b891420946d5269cc326d67555c6aab3db41a01a (patch) | |
| tree | f6c5e7d6dbf18ec8c0ea9ec0b037251df46b4cbb /yhttpd/src/sock/sslsock.h | |
| parent | a537e8323d932125232c305f9573daef89aef0df (diff) | |
added yhttpd and ycurses trunk versions
Diffstat (limited to 'yhttpd/src/sock/sslsock.h')
| -rw-r--r-- | yhttpd/src/sock/sslsock.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/yhttpd/src/sock/sslsock.h b/yhttpd/src/sock/sslsock.h new file mode 100644 index 0000000..f5358cc --- /dev/null +++ b/yhttpd/src/sock/sslsock.h @@ -0,0 +1,41 @@ +#include "../incl.h" + +#ifdef OPENSSL +#ifndef SSLSOCK_H +#define SSLSOCK_H + +#include "sock.h" + +#include <openssl/rsa.h> +#include <openssl/crypto.h> +#include <openssl/x509.h> +#include <openssl/pem.h> +#include <openssl/ssl.h> +#include <openssl/err.h> + +using namespace std; + +class sslsock : public sock +{ +private: + SSL_CTX* p_ctx; + string s_certificate_path; + string s_privatekey_path; + map<int,void*> map_certs; + +public: + + sslsock( ); + ~sslsock( ); + + int _send(socketcontainer *p_sock, const char *sz, int len); + int _read(socketcontainer *p_sock, char *sz, int len); + int _close(socketcontainer *p_sock); + void _main_loop_init(); + bool _main_loop_do_ssl_stuff(int &i_new_sock); + socketcontainer* _create_container(int& i_sock); + int _make_server_socket(int i_port); +}; + +#endif +#endif |
