summaryrefslogtreecommitdiffstats
path: root/types.h
diff options
context:
space:
mode:
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 {