From: Daniel KouĊ™il Date: Tue, 17 Jan 2012 20:11:12 +0000 (+0000) Subject: define a per-connection context for the particular authN mechs X-Git-Tag: emi-canl-c_R_1_0_0_0~51 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=5649d4b0df11db1547a707aed5a0a9ac3e80faab;p=jra1mw.git define a per-connection context for the particular authN mechs --- 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;