summaryrefslogtreecommitdiffstats
path: root/types.h
diff options
context:
space:
mode:
authorSimon Rettberg2014-09-09 18:07:48 +0200
committerSimon Rettberg2014-09-09 18:07:48 +0200
commitbbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32 (patch)
tree0bad2dc5bb0112940272b22a31f5dc4a0e8b2840 /types.h
parentBail out on startup if an AD server is not reachable (diff)
downloadldadp-bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32.tar.gz
ldadp-bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32.tar.xz
ldadp-bbdf2fba7b9ae0fa97aa164bcf84c1b88df38f32.zip
Add OpenSSL-Support (Client<->Proxy)
Diffstat (limited to 'types.h')
-rw-r--r--types.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/types.h b/types.h
index 692042a..71cd36d 100644
--- a/types.h
+++ b/types.h
@@ -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 {