diff options
author | Simon Rettberg | 2014-09-09 18:07:48 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-09-09 18:07:48 +0200 |
commit | bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32 (patch) | |
tree | 0bad2dc5bb0112940272b22a31f5dc4a0e8b2840 /types.h | |
parent | Bail out on startup if an AD server is not reachable (diff) | |
download | ldadp-bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32.tar.gz ldadp-bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32.tar.xz ldadp-bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32.zip |
Add OpenSSL-Support (Client<->Proxy)
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 { |