diff options
Diffstat (limited to 'server/reds.h')
-rw-r--r-- | server/reds.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/server/reds.h b/server/reds.h index 3b2795d7..61ad6914 100644 --- a/server/reds.h +++ b/server/reds.h @@ -18,14 +18,49 @@ #ifndef _H_REDS #define _H_REDS +#include "mem.h" + #include <stdint.h> #include <openssl/ssl.h> #include <sys/uio.h> +#if HAVE_SASL +#include <sasl/sasl.h> +#endif + #define __visible__ __attribute__ ((visibility ("default"))) typedef struct RedsStream RedsStream; +#if HAVE_SASL +typedef struct RedsSASL { + sasl_conn_t *conn; + + /* If we want to negotiate an SSF layer with client */ + int wantSSF :1; + /* If we are now running the SSF layer */ + int runSSF :1; + + /* + * Buffering encoded data to allow more clear data + * to be stuffed onto the output buffer + */ + const uint8_t *encoded; + unsigned int encodedLength; + unsigned int encodedOffset; + + SpiceBuffer inbuffer; + + char *username; + char *mechlist; + char *mechname; + + /* temporary data during authentication */ + unsigned int len; + char *data; +} RedsSASL; +#endif + struct RedsStream { int socket; SpiceWatch *watch; @@ -35,6 +70,10 @@ struct RedsStream { int shutdown; SSL *ssl; +#if HAVE_SASL + RedsSASL sasl; +#endif + SpiceChannelEventInfo info; /* private */ |