From 5649d4b0df11db1547a707aed5a0a9ac3e80faab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kou=C5=99il?= Date: Tue, 17 Jan 2012 20:11:12 +0000 Subject: [PATCH] define a per-connection context for the particular authN mechs --- emi.canl.canl-c/src/canl_locl.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/emi.canl.canl-c/src/canl_locl.h b/emi.canl.canl-c/src/canl_locl.h index 7b40cf5..090f5be 100644 --- a/emi.canl.canl-c/src/canl_locl.h +++ b/emi.canl.canl-c/src/canl_locl.h @@ -90,35 +90,39 @@ typedef struct _io_handler int sock; ossl_ctx *s_ctx; principal_int *princ_int; + struct authn_mech { + CANL_AUTH_MECHANISM type; + void *ctx; + } authn_mech; } io_handler; typedef struct canl_mech { CANL_AUTH_MECHANISM mech; - void *context; + void *global_context; canl_err_code (*initialize) - (void); + (void **); canl_err_code (*client_init) - (glb_ctx *); + (glb_ctx *, void *); canl_err_code (*server_init) - (glb_ctx *); + (glb_ctx *, void *); canl_err_code (*connect) - (glb_ctx *, io_handler *, struct timeval *, const char *); + (glb_ctx *, void *, io_handler *, struct timeval *, const char *); canl_err_code (*accept) - (glb_ctx *, io_handler *, struct timeval *); + (glb_ctx *, void *, io_handler *, struct timeval *); canl_err_code (*close) - (glb_ctx *, io_handler *); + (glb_ctx *, void *, io_handler *); canl_err_code (*read) - (glb_ctx *, io_handler *, void *, size_t, struct timeval *); + (glb_ctx *, void *, io_handler *, void *, size_t, struct timeval *); canl_err_code (*write) - (glb_ctx *, io_handler *, void *, size_t, struct timeval *); + (glb_ctx *, void *, io_handler *, void *, size_t, struct timeval *); } canl_mech; extern struct canl_mech canl_mech_ssl; -- 1.8.2.3