From bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 9 Sep 2014 18:07:48 +0200 Subject: Add OpenSSL-Support (Client<->Proxy) --- types.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'types.h') diff --git a/types.h b/types.h index 692042a..71cd36d 100644 --- a/types.h +++ b/types.h @@ -4,6 +4,7 @@ #include #include #include +#include #define ADDRLEN 40 #define BINDLEN 250 @@ -29,19 +30,25 @@ typedef struct { typedef struct { void (*callback)(void *data, int haveIn, int haveOut, int doCleanup); int fd; + // + SSL_CTX *sslContext; // Listening for SSL connections, NULL otherwise } epoll_listen_t; typedef struct { void (*callback)(void *data, int haveIn, int haveOut, int doCleanup); int fd; - int padding; + // + BOOL bound; // Client did successful ldap bind + BOOL sslAccepted; // SSL_accept done? + BOOL kill; // Should the connection be killed? + BOOL writeBlocked; // An SSL_write returned WANT_*, so we must not reallocate the current send buffer // Send buffer (me to client) size_t sbPos, sbFill, sbLen; + SSL *ssl; // NULL if not encrypted char *sendBuffer; // Dynamically allocated, might or might not get huge // Recv buffer (client's request) size_t rbPos; char readBuffer[REQLEN]; // Static, queries > 4000 bytes simply not supported - BOOL bound; } epoll_client_t; typedef struct { -- cgit v1.2.3-55-g7522