X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fwebcit.h;h=7eff9c1ca53aedaccb98912df3d7302ff616bc85;hp=afb3c9d7b406bfe2c203642de0b2556166e869ca;hb=b9af9a3fafd99a3fb81cb09f01390531ffe6f29d;hpb=14bee768fb27483b355d98feef2a96de81d75017 diff --git a/webcit/webcit.h b/webcit/webcit.h index afb3c9d7b..7eff9c1ca 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -227,17 +227,21 @@ struct wcsession { int outside_frameset_allowed; /* nonzero if current req is allowed * outside of the main frameset */ char last_chat_user[SIZ]; -#ifdef HAVE_OPENSSL - SSL *ssl; -#endif }; #define extract(dest,source,parmnum) extract_token(dest,source,parmnum,'|') #define num_parms(source) num_tokens(source, '|') +/* Per-session data */ #define WC ((struct wcsession *)pthread_getspecific(MyConKey)) extern pthread_key_t MyConKey; +/* Per-thread SSL context */ +#ifdef HAVE_OPENSSL +#define THREADSSL ((SSL *)pthread_getspecific(ThreadSSL)) +extern pthread_key_t ThreadSSL; +#endif + struct serv_info serv_info; extern char floorlist[128][SIZ]; extern char *axdefs[]; @@ -456,7 +460,9 @@ void spawn_another_worker_thread(void); void init_ssl(void); void endtls(void); void ssl_lock(int mode, int n, const char *file, int line); -int starttls(void); +int starttls(int sock); extern SSL_CTX *ssl_ctx; +int client_read_ssl(char *buf, int bytes, int timeout); +void client_write_ssl(char *buf, int nbytes); #endif