diff options
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -4,6 +4,7 @@ #include <stddef.h> #include <stdint.h> #include <time.h> +#include <openssl/ssl.h> #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 { |